In my app the user plays a sound by pressing a button. There are several buttons which can be played simultaneously. The sounds are played using AVAudioPlayer instances. I w
Was facing the same problem. Solved the problem by setting the AVAudioSession category to AVAudioSessionCategoryPlayback mode. This is my working code:
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
audioSession.delegate = self;
[audioSession setCategory:AVAudioSessionCategoryPlayback error:nil];
[audioSession setActive: YES error: nil];
Also make sure that the audio recording has been finished successfully by implementing:
-(void) audioRecorderDidFinishRecording:(AVAudioRecorder *)recorder successfully:(BOOL)flag
{
NSLog(@"Recording success:%@",flag ? @"YES" : @"NO");
}
And check that you have added
in your interface declaration.