Improve documentation

This commit is contained in:
Lars Immisch
2017-02-25 01:37:29 +01:00
parent a53782652a
commit b612b73188
8 changed files with 35 additions and 20 deletions

View File

@@ -110,25 +110,32 @@ And then as root: --- ::
Testing
*******
First of all, run::
$ python test.py
Make sure that :code:`aplay` plays a file through the soundcard you want, then
try::
This is a small test suite that mostly performs consistency tests. If
it fails, please file a `bug report
<https://github.com/larsimmisch/pyalsaaudio/issues>`_.
$ python playwav.py <filename.wav>
If :code:`aplay` needs a device argument, like
:code:`aplay -D hw:CARD=sndrpihifiberry,DEV=0`, use::
$ python playwav.py -d hw:CARD=sndrpihifiberry,DEV=0 <filename.wav>
To test PCM recordings (on your default soundcard), verify your
microphone works, then do::
$ python recordtest.py <filename>
$ python recordtest.py -d <device> <filename>
Speak into the microphone, and interrupt the recording at any time
with ``Ctl-C``.
Play back the recording with::
$ python playbacktest.py <filename>
$ python playbacktest.py-d <device> <filename>
There is a minimal test suite in :code:`test.py`, but it is
a bit dependent on the ALSA configuration and may fail without indicating
a real problem.
If you find bugs/problems, please file a `bug report
<https://github.com/larsimmisch/pyalsaaudio/issues>`_.

View File

@@ -298,7 +298,7 @@
</div>
<div class="footer">
&copy; Copyright 2008-20017, Casper Wilstrup, Lars Immisch.
Last updated on Feb 24, 2017.
Last updated on Feb 25, 2017.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@@ -141,7 +141,7 @@
</div>
<div class="footer">
&copy; Copyright 2008-20017, Casper Wilstrup, Lars Immisch.
Last updated on Feb 24, 2017.
Last updated on Feb 25, 2017.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

Binary file not shown.

View File

@@ -106,7 +106,7 @@
</div>
<div class="footer">
&copy; Copyright 2008-20017, Casper Wilstrup, Lars Immisch.
Last updated on Feb 24, 2017.
Last updated on Feb 25, 2017.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@@ -131,23 +131,31 @@ ship with ALSA kernels.</p>
</div>
<div class="section" id="testing">
<h1>Testing<a class="headerlink" href="#testing" title="Permalink to this headline"></a></h1>
<p>First of all, run:</p>
<div class="highlight-python"><div class="highlight"><pre>$ python test.py
<p>Make sure that <tt class="code docutils literal"><span class="pre">aplay</span></tt> plays a file through the soundcard you want, then
try:</p>
<div class="highlight-python"><div class="highlight"><pre>$ python playwav.py &lt;filename.wav&gt;
</pre></div>
</div>
<p>If <tt class="code docutils literal"><span class="pre">aplay</span></tt> needs a device argument, like
<tt class="code docutils literal"><span class="pre">aplay</span> <span class="pre">-D</span> <span class="pre">hw:CARD=sndrpihifiberry,DEV=0</span></tt>, use:</p>
<div class="highlight-python"><div class="highlight"><pre>$ python playwav.py -d hw:CARD=sndrpihifiberry,DEV=0 &lt;filename.wav&gt;
</pre></div>
</div>
<p>This is a small test suite that mostly performs consistency tests. If
it fails, please file a <a class="reference external" href="https://github.com/larsimmisch/pyalsaaudio/issues">bug report</a>.</p>
<p>To test PCM recordings (on your default soundcard), verify your
microphone works, then do:</p>
<div class="highlight-python"><div class="highlight"><pre>$ python recordtest.py &lt;filename&gt;
<div class="highlight-python"><div class="highlight"><pre>$ python recordtest.py -d &lt;device&gt; &lt;filename&gt;
</pre></div>
</div>
<p>Speak into the microphone, and interrupt the recording at any time
with <tt class="docutils literal"><span class="pre">Ctl-C</span></tt>.</p>
<p>Play back the recording with:</p>
<div class="highlight-python"><div class="highlight"><pre>$ python playbacktest.py &lt;filename&gt;
<div class="highlight-python"><div class="highlight"><pre>$ python playbacktest.py-d &lt;device&gt; &lt;filename&gt;
</pre></div>
</div>
<p>There is a minimal test suite in <tt class="code docutils literal"><span class="pre">test.py</span></tt>, but it is
a bit dependent on the ALSA configuration and may fail without indicating
a real problem.</p>
<p>If you find bugs/problems, please file a <a class="reference external" href="https://github.com/larsimmisch/pyalsaaudio/issues">bug report</a>.</p>
</div>
@@ -215,7 +223,7 @@ with <tt class="docutils literal"><span class="pre">Ctl-C</span></tt>.</p>
</div>
<div class="footer">
&copy; Copyright 2008-20017, Casper Wilstrup, Lars Immisch.
Last updated on Feb 24, 2017.
Last updated on Feb 25, 2017.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

View File

@@ -99,7 +99,7 @@
</div>
<div class="footer">
&copy; Copyright 2008-20017, Casper Wilstrup, Lars Immisch.
Last updated on Feb 24, 2017.
Last updated on Feb 25, 2017.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
</div>
</body>

File diff suppressed because one or more lines are too long