My App plays mp4 using AVPlayer, when my application finish launching, it interrupt the iPod music, although I have set the audio session to allow mix with others in
<
Finally, I figure out what's wrong.
AudioSessionInitialize(NULL, NULL, NULL, NULL);
UInt32 sessionCategory = kAudioSessionCategory_AmbientSound;
AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(sessionCategory), &sessionCategory);
UInt32 allowMixWithOthers = true;
AudioSessionSetProperty(kAudioSessionProperty_OverrideCategoryMixWithOthers, sizeof(allowMixWithOthers), &allowMixWithOthers);
AudioSessionSetActive(true);
AudioSessionSetActive must be called after AudioSessionSetProperty, it works fine now.