Question

As I previously found here.

If you start running an AVAssetReader while using a Remote I/O callback to play audio, starting the AVAssetReader will block the Remote I/O callback unless you allow iPod mixing with...

UInt32 audioCategory = kAudioSessionCategory_MediaPlayback;
AudioSessionSetProperty(kAudioSessionProperty_AudioCategory,sizeof(audioCategory),&audioCategory);

AudioSessionSetProperty(kAudioSessionProperty_OverrideCategoryMixWithOthers, sizeof (UInt32), &(UInt32) {1});

However I am finding that this prevents the use of Audio Remote Control calls as setup here.

So...

  • I need "MixWithOthers" ON to use an AVAssetReader
  • I need "MixWithOthers" OFF to use Audio Remote Controls

Does anyone know of how I can setup my AudioSession so I can use both?

Was it helpful?

Solution

This works now in iOS 5. The correct handling is to leave MixWithOthers OFF. The AVAssetReader will no longer stop the callbacks of your audio playback.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top