Whenever I start an AVCaptureSession running with the microphone as an input it cancels whatever background music is currently running (iPod music for instance). If I comme
I had the same problem and used this in my app and it worked:
UInt32 audioRouteOverride = kAudioSessionCategory_AmbientSound;
AudioSessionSetProperty (kAudioSessionProperty_AudioCategory,sizeof (audioRouteOverride),&audioRouteOverride);
I was able to record video and audio and at the same time play a sound out of the speakers.
Is the background music a looping track? -- if so you could make it a system sound and tell it to re-play when it finishes playing. The reason being you can only have tracks up to 30 seconds as a system sound.
Don't know if it helps -- but thats one approach :)
Cheers,
Michael
Try setting kAudioSessionProperty_OverrideCategoryMixWithOthers as seen in https://stackoverflow.com/a/7426406/16572