kAudioSessionProperty_InputGainScalar default value?
kAudioSessionProperty_InputGainScalar default value?
- Subject: kAudioSessionProperty_InputGainScalar default value?
- From: Zachary Kulis <email@hidden>
- Date: Thu, 27 Oct 2011 17:01:20 -0400
iOS5 introduced a new audio session property called
'kAudioSessionProperty_InputGainScalar' that allows setting the gain
of the input device.
This property seems to work as expected - setting to 0 turns the
gain off, while setting to 1.0 sets the gain to its max value. The
thing that I can't figure out is how to set the input gain to its
default value after setting it to some other value.
For example, setting the input gain to any valid value seems to
permanently disable the automatic gain control. This would be fine
in 'measurement' mode, but per Apple's documentation, the 'default'
audio session mode should enable automatic gain adjustment of the
input signal. However, setting the mode to 'measurement', setting
the input gain to 1.0, and then setting the mode back to 'default'
does not reset/re-enable the AGC. In fact, the microphone signal
becomes completely saturated if the input gain is set to 1.0 and
'default' mode is enabled.
The documentation states:
"If no app
with an active audio session is using this property for a given
input source, the system restores the default input gain setting
for the input source."
Either I'm missing something, or Apple did not provide a way
to disable manual gain control (via the property) and re-enable the
AGC (via setting the audio session mode).
If anyone has any ideas of how to "reset" the input gain controller,
I'd be most grateful.
-Zach
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden