I am trying to record and play audio in a universal application. AVAudioSession Configuration:
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error: nil];
UInt32 category = kAudioSessionCategory_PlayAndRecord;
AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(category), &category);
This works great for devices with a built-in microphone. But on the third-generation iPod, I experience occasional unwanted behavior. Sometimes everything works fine, and sometimes it only happens when headphones with a built-in microphone are connected. In this case, it is impossible to listen to sound in the application without headphones.
source
share