- Added close methods to PCM and Mixer

- Avoid internal re-opening of PCM objects when parameters change.

- PCM objects can be opened by card id
- Mixer objects can be openend by card index
  (this is not consistent, but ALSA works this way)

- Adjusted and cleaned up documentation.



git-svn-id: svn://svn.code.sf.net/p/pyalsaaudio/code/trunk@26 ec2f30ec-7544-0410-870e-f70ca00c83f0
This commit is contained in:
larsimmisch
2008-11-28 00:43:12 +00:00
parent 5c2a006553
commit dfb89bde62
16 changed files with 770 additions and 1936 deletions

View File

@@ -1,6 +1,6 @@
***************
PyAlsaAudio
***************
************
Introduction
************
:Author: Casper Wilstrup
:Author: Lars Immisch
@@ -91,7 +91,7 @@ Note: the wrappers link with the alsasound library (from the alsa-lib package)
and need the ALSA headers for compilation. Verify that you have
/usr/lib/libasound.so and /usr/include/alsa (or similar paths) before building.
On Debian (and probably Ubuntu), make sure you have libasound2-dev installed.
*On Debian (and probably Ubuntu), install libasound2-dev.*
Naturally you also need to use a kernel with proper ALSA support. This is the
default in Linux kernel 2.6 and later. If you are using kernel version 2.4 you
@@ -105,3 +105,30 @@ To install, execute the following: --- ::
And then as root: --- ::
# python setup.py install
*******
Testing
*******
First of all, run::
$ python test.py
This is a small test suite that mostly performs consistency tests. If
it fails, please file a `bug report
<http://sourceforge.net/tracker/?group_id=120651>`_.
To test PCM recordings (on your default soundcard), verify your
microphone works, then do::
$ python recordtest.py <filename>
Speak into the microphone, and interrupt the recording at any time
with ``Ctl-C``.
Play back the recording with::
$ python playbacktest.py <filename>