MPMusicPlayerController kills RemoteIO on iPhone Speaker route
MPMusicPlayerController kills RemoteIO on iPhone Speaker route
- Subject: MPMusicPlayerController kills RemoteIO on iPhone Speaker route
- From: Rob Rampley <email@hidden>
- Date: Sat, 31 Mar 2012 13:45:17 +0800
Hello all,
I have an application that uses RemoteIO for input-output processing (PlayAndRecord category) and also includes an MPMusicPlayerController.
The weird thing: On iPhone only, when RemoteIO is running and the iPhone Speaker is the audio destination, starting playback in the MPMusicPlayerController will result in a kAudioSessionBeginInterruption event and my RemoteIO is shutdown. The iPod music (MPMusicPlayerController) continues to play.
It seems that on iPhone, with the Speaker route, RemoteIO and MPMusicPlayerController cannot both play? On iPad I have had no problem running both RemoteIO and MPMusicPlayerController. On iPhone, if I plug something (headphones, speakers, etc) into the headset jack, everything works just fine as well and both streams will run. It seems to only be an issue on iPhone, if Speaker is the destination.
I override the AudioSession output to the iPhone speaker (kAudioSessionProperty_OverrideCategoryDefaultToSpeaker) when Receiver output is detected, this is done to be a more natural expectation for the user. The iPod player seems to also do this.
I also set the property kAudioSessionProperty_OverrideCategoryMixWithOthers to true. This allows the iPod player to (presumably) play along.
I wrote some test code to restart my RemoteIO session later, and that will in turn cause the MPMusicPlayerController to stop playing. Thus indicating that the speaker destination may be exclusive?
I've also tried with both the 'iPodMusicPlayer' and 'applicationMusicPlayer' members of MPMusicPlayerController, there were no differences in the above results between the two.
Any advice certainly appreciated,
- Rob
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden