I got a strange issue. My code works great on both iOS 5&6 but when running on iOS 7 I get empty buffers on the AudioQueue callback.
Possible relevant code:
@Idan your answer is correct and working but it only shows warning if app minimun deployment target is iOS 7. For iOS 7 we can do something like this:
NSError *audioSessionError;
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
[audioSession setCategory:AVAudioSessionCategoryPlayAndRecord error:&audioSessionError];
if(audioSessionError)
{
NSLog(@"AVAudioSession error setting category:%@",audioSessionError);
}
else
{
[audioSession setActive:YES error:&audioSessionError];
if(audioSessionError)
NSLog(@"AVAudioSession error activating: %@",audioSessionError);
}