[Openal] Blocking Audio Capture
stefan-wieland.koegel at stud.tu-ilmenau.de
Tue May 5 02:17:05 PDT 2009
i am using OpenAL to capture Audio from the microphone. This works quite
well, the only thing that bothers me, is that I have to poll the number
of available samples.
This is so cpu intensive. There must be some other way. Isnt there a
blocking call, which returns a previous specified number of samples in a
buffer. Or some kind of callback construction.
So far I have not found something like inside the OpenAL source.
Does anyone know if there exists such a thing? Or has anyone done this
before and can tell me what approach I can use?
Here is what I do:
while (tNumSamplesAvail < tCaptureSamples-1)
//Get number of captured samples
if (tNumSamplesAvail < tCaptureSamples-1)
alcCaptureSamples(mCaptureDevice, (ALCvoid *)pBuffer,
I hate to use "usleep". Actively waiting is not very sophisticated.
Thanks in advance.
More information about the Openal