mattgallagher / AudioStreamer

A streaming audio player class (AudioStreamer) for Mac OS X and iPhone.
http://cocoawithlove.com
1.93k stars 553 forks source link

Using AudioStreamer prevents AVAudioRecorder from working #38

Open mknippen opened 13 years ago

mknippen commented 13 years ago

Use case:

User is playing audio. Audio is stopped. Streamer is destroyed. User goes to record, fails in the prepareToRecord method. No clear message is given. This is only true on device, tested on 4.3 and latest iOS5 beta.

I would be willing to supply code if needed.

ajmsoftwares commented 12 years ago

yes , confirmed

t3rra commented 12 years ago

I solved that issue by changing

UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback;

to

UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback | kAudioSessionCategory_PlayAndRecord;

in AudioStreamer.m (line # ~775). By the way, thank developer for this cool library! It definitely shortened my development time :) Thank you.

mknippen commented 12 years ago

yes, I ended up changing to just the kAudioSessionCategory_PlayAndRecord and it worked great.

Thank You, Matthew

On May 8, 2012, at 6:31 PM, t3rra wrote:

I solved that issue by changing

UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback;

to

UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback | kAudioSessionCategory_PlayAndRecord;

in AudioStreamer.m (line # ~775). By the way, thank developer for this cool library! It definitely shortened my development time :) Thank you.


Reply to this email directly or view it on GitHub: https://github.com/mattgallagher/AudioStreamer/issues/38#issuecomment-5589329