Commit Graph

10 Commits

Author SHA1 Message Date
Oswald Buddenhagen
ae5c4aad9b add xrun handling to the examples
it's very primitive, but it shows adequately what can happen and what to
do about it minimally (that is, complain and move on).
2024-02-06 00:39:15 +01:00
Oswald Buddenhagen
8ea9470454 fix draining/closing, take 2
commit 8abf06be introduced a pause() prior to draining, in an attempt
to work around clearly broken pulseaudio client behavior for capture
streams (drain() is supposed to imply a stop).

but as the workaround was also applied to playback streams, it would
cause nasty "clicks", as the stream would (obviously) stop before being
resumed for draining.

but draining is actually pointless for capture streams, as we're closing
right afterwards, so the samples are lost anyway.

what's more, destructors are not supposed to wait for anything, so
draining in alsapcm_dealloc() was wrong to start with. so we remove it.
note that this is a minor behavior change, which is reflected by the
adjustment of the playback test to have an explicit close() at the end.

finally, close() was also affected by the pulseaudio bug (which was not
addressed before), so there we make draining exclusive to playback
streams.
2023-03-02 00:35:02 +01:00
Lars Immisch
df889b94ef Don't use setrate etc. in samples. 2020-07-09 21:22:06 +02:00
Lars Immisch
dc51fa75b5 Make tests more robust, use devices or card indices. 2017-02-22 23:55:17 +01:00
Lars Immisch
7b9d9828e6 Move towards python 3 2015-05-08 13:27:30 +02:00
larsimmisch
fc3517b00e This is release 0.4; it was tested with python2.5 and python3.0 (rc2 &
3)


git-svn-id: svn://svn.code.sf.net/p/pyalsaaudio/code/trunk@29 ec2f30ec-7544-0410-870e-f70ca00c83f0
2008-11-29 03:29:13 +00:00
larsimmisch
5c2a006553 Ported to Python3.0
Converted documentation to Sphinx.

Added playwav.py



git-svn-id: svn://svn.code.sf.net/p/pyalsaaudio/code/trunk@25 ec2f30ec-7544-0410-870e-f70ca00c83f0
2008-11-25 20:12:56 +00:00
larsimmisch
8fa9d27a88 Import from divmod. Added css. Original log message:
r1585 | casper | 2005-07-09 23:26:15 +0200 (Sat, 09 Jul 2005) | 3 lines

Last checkin before version 0.2





git-svn-id: svn://svn.code.sf.net/p/pyalsaaudio/code/trunk@12 ec2f30ec-7544-0410-870e-f70ca00c83f0
2008-01-24 12:22:41 +00:00
larsimmisch
dc68788ebf Import from divmod. Original log message:
r833 | casper | 2004-10-05 21:43:58 +0200 (Tue, 05 Oct 2004) | 1 line

Completed mixer read/write support. Docs to follow



git-svn-id: svn://svn.code.sf.net/p/pyalsaaudio/code/trunk@4 ec2f30ec-7544-0410-870e-f70ca00c83f0
2008-01-24 11:22:37 +00:00
larsimmisch
47795bcc72 Import from divmod. Original log message:
r820 | anthony | 2004-10-04 15:28:33 +0200 (Mon, 04 Oct 2004) | 2 lines

Import of PyAlsaAudio, by Casper Wilstrup (cwi@unispeed.dk)



git-svn-id: svn://svn.code.sf.net/p/pyalsaaudio/code/trunk@2 ec2f30ec-7544-0410-870e-f70ca00c83f0
2008-01-24 11:20:35 +00:00