[Openal] Capture audio, send to output source

Darren Rook route66 at gmail.com
Tue Jul 29 18:15:39 PDT 2008


Thanks to Chris and Jason for the response.

Jason, thanks for pointing me to ASIO - I may switch to that.

> Just to be sure, are you using buffer queues with at least 2 or 3 buffers? How
> much are you reading in per buffer?

Here is my psuedo code (4 buffers):

if (New incoming samples)
{
   get them, process them, save them to an internal buffer.
}
if ((AL_SOURCE_STATE == AL_PLAYING) && (samples in internal buffer) &&
(AL_BUFFERS_PROCESSED>1))
{
  buffer internal buffer to AL_BUFFERS_PROCESSED (divided evenly among
processed buffers)
}
else if ((AL_SOURCE_STATE != AL_PLAYING) && (>= 100ms of samples in
internal buffer))
{
  buffer internal buffer to all 4 buffers (divided evenly)
  play buffers
}


More information about the Openal mailing list