[Openal] input level
Chris Robinson
chris.kcat at gmail.com
Sun Feb 8 14:25:58 PST 2009
On Sunday 08 February 2009 8:48:42 am angelo wrote:
> i was wondering if there is some OpenAL function to select the
> microphone input level from inside an application that use the library.
You mean the microphone gain/volume level? There isn't. It's not too difficult
to apply a volume adjustment on your own during capture, though. For example,
with 16-bit:
alcCaptureSamples(CaptureDevice, Buffer, NumSamples);
for(i = 0;i < NumSamples*Channels;i++)
((ALshort*)Buffer)[i] = ((ALshort*)Buffer)[i] * Gain;
where Gain is a multiplier value (1.0 is normal, 0.5 is half, 0.0 is silence).
More information about the Openal
mailing list