[Portaudio] Locking?
Ross Bencina
rbencina@iprimus.com.au
Wed, 16 May 2001 03:26:58 +1000
> Fuchs Hans wrote:
> > I'm using portaudio on win32. It works well. But is there no
lock-mechanism?
> > I need to be sure, that the callback function isn't called while my
program
> > is processing the buffers.
Hi Hans,
If you don't care about portability, you can use a CriticalSection in win32.
But as Phil said, using an atomic FIFO is the preferred method.
Phil Burk <philburk@softsynth.com> wrote:
> Also, I believe that the callback will not reenter itself in any of the
> implementations so if you process the buffer in the callback then you
> won't get called in the middle of processing.
Phil,
We should probably document that the callback will not be called
reentrantly(!) and make it an explicit requirement of all implementations.
Best wishes,
Ross.