syedhali/EZAudio — pull request #108 by hakanw (2014-10-08 07:40:55+00:00)
Title: don't turn on PlayAndRecord AVAudioSession until we need it

Today once the EZAudioPlayer is started, it asks for AVAudioSessionCategoryPlayAndRecord which disables the main speakers at the bottom of the iPhone (since those can't be used together with the mic) and also (AFAICS) asks for mic permission.

In this patch I am upgrading the session when the mic is initialized instead, and then when playback is stopped we go back to normal playback-only etc.