[Openal] Capture audio, send to output source
Darren Rook
route66 at gmail.com
Tue Jul 29 19:20:03 PDT 2008
> You need to make sure you have enough in the internal buffer before putting it
> into the AL buffer, otherwise you could get small buffer like one buffer with
> 128 bytes, another with 192, another with 512, and another with 256..
> totalling around 1KB, which is smaller than the typical update size (so one
> sound card update will exhaust all the buffered data).
>
> Making sure you have 4 to 8KB per buffer should work fine. Something like:
Thanks for letting me know about the soundcard's update size/window, I
wasn't aware of this (I guess I was assuming OpenAL would handle
this). Here's the tricky thing - My microphone is sending me data at
8KHz rate - so my output rate is also 8KHz. 4KB buffer is 0.25
seconds, 8KB is 0.5 seconds. If I need to reduce latency, should I
increase the microphone's sample rate?
More information about the Openal
mailing list