Re: MPMusicPlayerController kills RemoteIO on iPhone Speaker route
Re: MPMusicPlayerController kills RemoteIO on iPhone Speaker route
- Subject: Re: MPMusicPlayerController kills RemoteIO on iPhone Speaker route
- From: Rob Rampley <email@hidden>
- Date: Fri, 06 Apr 2012 12:13:16 +0800
Upon even further investigation, it seems that the issue is simply that the integrated MPMusicPlayerController is changing audio routes when play is engaged. Thus my RemoteIO PlayRecord session gets messed up with the new route change. In a way, this somewhat follows the Audio Routing documentation on Apple's site (eg. phone calls vs. iPOD Player, etc), however I guess I ended up being surprised that the embedded version (application player) would change the route of an existing RemoteIO session in my application.
At this point, it looks like there is no work around for this, so my only solution is to abandon MPMusicPlayerController, and write my own player of iPOD audio content, so I can keep my RemoteIO session routing intact.
- Rob
> On 2012/03/31, at 13:45, Rob Rampley wrote:
> 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