[Python-Dev] submitted patch to linuxaudiodev

Christopher Lee clee@v1.wustl.edu
Sat, 31 Mar 2001 09:08:15 -0600 (CST)


I'm a long-time listener/first-time caller and would like to know what I
should do to have my patch examined.  I've included a description of the
patch below.

Cheers,

-chris

-----------------------------------------------------------------------------
[reference: python-Patches #412553]

Problem:

test_linuxaudiodev.py  failed with "Resource temporarily busy message"
(under the cvs version of python)

Analysis:

The lad_write() method attempts to write continuously to /dev/dsp (or 
equivalent); when the audio buffer fills, write() returns an error code and
errorno is set to EAGAIN, indicating that the device buffer is full.  The
lad_write() interprets this as an error and instead of trying to write
again returns NULL.

Solution:

Use select() to check when the audio device becomes writable and test for
EAGAIN after doing a write().  I've submitted patch #412553 that implements
this solution. (use python21-lihnuxaudiodev.c-version2.diff).  With this
patch, test_linuxaudiodev.py passes.  This patch may also be relevant for
the python 2.0.1 bugfix release.


System configuration:

linux kernel 2.4.2 and 2.4.3 SMP on a dual processor i686 with the
soundblaster live value soundcard.