Keeping the background music going during my audio session (iOS)
Keeping the background music going during my audio session (iOS)
- Subject: Keeping the background music going during my audio session (iOS)
- From: Shaun Guth <email@hidden>
- Date: Thu, 3 Feb 2011 21:00:38 -0800
I have background music (pandora or ipod, etc) playing music on my iOS4.0 device, and I would like it to continue playing while my application is running.
My application initializes an audio session using
kAudioSessionCategory_PlayAndRecord and
kAudioSessionProperty_OverrideCategoryMixWithOthers.
When the application starts, the music continues to play (albeit through the receiver instead of the speakers...). All is well.
However, if I introduce either of the following two properties:
kAudioSessionProperty_OverrideCategoryDefaultToSpeaker
kAudioSessionProperty_OverrideCategoryEnableBluetoothInput
Then the music stops playing as soon as the AudioSessionSetProperty function is called...
Can someone here enlighten me as to what's going on? Is there a best practice for how to always keep the user's music playing, no matter what my audio session might be doing?
-- Shaun
_______________________________________________
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