According to the documentation AVAudioSessionModeVideoChat-
When this mode is used, the tonal alignment of devices is optimized for voice, and the set of valid audio routes is reduced only to those suitable for video chat.
Thus, the system reduces the default sensitivity to audio output and input routes suitable for this mode.
I use setMode for AVAudioSessionModeVideoChat, so the application / system will automatically recognize and adapt to hardware integration (wired and bluetooth headset) on the fly. But it seems that setting this mode to video chat significantly reduces the sensitivity of the built-in microphone and, therefore, the sound is recorded in low pitch. My target application users will be mostly in a noisy environment.
Is there a way to increase the sensitivity of input and output to the maximum and at the same time use the AVAudioSessionModeVideoChatmode?
Below is the code used to install AudioSession in my application ...
if (![[[AVAudioSession sharedInstance] category] isEqualToString:AVAudioSessionCategoryPlayAndRecord]) {
[[AVAudioSession sharedInstance] setActive:NO error:&error];
[[AVAudioSession sharedInstance] setActive:YES error:&error];
NSLog(@"setActive error = %@", error);
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:&error];
NSLog(@"setCategory error = %@", error);
[[AVAudioSession sharedInstance] setMode:AVAudioSessionModeVideoChat error:&error];
NSLog(@"setMode error = %@", error);
}
Testing environment details: -
Checked device: iPad mini retina 4G and iPad 2
iOS: 7.0.3
Testing with a device built into speakers and microphones.
source