Disable AGC and highpass filter on iOS

iOS has automatic gain control and a high pass filter on the mic input. You may want to disable this if doing an audio app.

Adding this to the iOSAudioIODevice will disable it. 

setSessionUInt32Property(kAudioSessionProperty_Mode, kAudioSessionMode_Measurement);

And this will re-enable it.

setSessionUInt32Property(kAudioSessionProperty_Mode, kAudioSessionMode_Default);

It would be good if the AudioIODevice had a way to platform agnosticlly turn on or off any input processing.

1 Like

That would be very useful. Can we have this method, Jules?



Ok, I've added this now - feedback on whether it works on your devices would be appreciated!

1 Like

Excellent tip!

Can confirm the new Juce method works on an iPad 2 running iOS 6.1.3, and an iPad Mini (Retina) running iOS 7.1.1.


It would also be helpful to be able to select AVAudioSessionModeVideoRecording, which uses the top/front microphone instead of the bottom one...  This is very useful for audio recording audio apps as the top/front microphone uses directional noise reduction.




For the record, it’s AudioIODevice::setAudioPreprocessingEnabled()