I have been using the AVAudioRecorder class to record the audio. But it wasnt allowing me to play it back. I had to restart the application to play it. I had to toil hard with it for a few hours before I found the culprit.
Thanks to this link. The problem was in my AVAudioSession Category which was set to AVAudioSessionCategoryRecord while it should have been AVAudioSessionCategoryPlayAndRecord.
