Re: [linux-audio-dev] [simon_AT_arrowtheory.com: [Portaudio] ANN: dsptools-0.4.0]

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] [simon_AT_arrowtheory.com: [Portaudio] ANN: dsptools-0.4.0]
From: Andrew (Andy) W. Schmeder ("Andrew)
Date: Sun Mar 28 2004 - 06:21:00 EEST


On Sat, 2004-03-27 at 05:24, Tim Goetze wrote:
> i've decided not to mess with either python locking or its memory
> allocator. instead, an asynchronous scheme is employed: C++ RT audio
> callbacks write to a lock-free FIFO and signal there is sample data to
> process (this is done by writing a trigger to a UNIX pipe on which the
> python audio thread sleeps). a second FIFO holds the results of python
> audio processing. the callback code doesn't wait for the python DSP
> code to complete, instead it fetches processed data from the second
> FIFO right away and returns to Jack/PA/the LADSPA host/your native
> audio code. all this is possible without acquiring any locks.

For what its worth, I have written a python module for jack which works
almost exactly in this manner. (GPL; online at
http://www.a2hd.com/software).

In my implementation the audio buffer, on the Py end, is a numpy array
of type 'f'. When python is not able to keep up, either InputSyncError
or OutputSyncError will be raised by the process call (depending on
which FIFO had an underflow).

Unfortunately python does not appear to be sufficiently fast for any
significant realtime work, in my experience its far less useful than one
might imagine.

-- 
Andrew (Andy) W. Schmeder <andy_AT_a2hd.com>


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sun Mar 28 2004 - 06:37:35 EEST