[Portaudio] stable snapshot candidate ready

Ross Bencina rossb-lists at audiomulch.com
Fri Mar 4 20:15:22 EST 2011


Tim Bunnell wrote:
>>>> while (Pa_IsStreamActive(this->stream)) Pa_Sleep(SLEEP_DUR);
>>>>
>>>> With SLEEP_DUR set to something small, this causes playback to
>>>> terminate before that last part of the original large buffer has
>>>> finished playing. If I increase SLEEP_DUR to, say, 100 msec, we get
>>>> the complete buffer. Is it possible that IsStreamActive will return
>>>> false before that final increment has actually finished playing? In
>>>> that case, should our callback wait until it literally has 0
>>>> additional samples to play before returning PaComplete?

Some points:

Your callback should always fill the entire buffer it is passed irrespective 
of what value it returns.

As Phil said, calling Pa_StopStream() should drain the buffer.

In any case, I doubt this behavior is a regression so it shouldn't halt the 
snapshot.

Tim if you let us know which HostAPI you're targetting I can review it here. 
I have a native bootcamp install of XP.

Thanks

Ross 



More information about the Portaudio mailing list