Disable AGC and highpass filter on iOS


#1

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.


Does iOS preprocess microphone data on modern iPhones?
#2

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

 

 


#3

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


#4

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.

 


#5

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.

 

Thanks!

Steve


#6

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

Link