This is driving me insane, I have an iPhone app with background music playing from the iPod app, when I play a sound I want to duck the background music until the sound finishes playing. So I leave my audio session inactive until I need to play the sound, and when I play the sound I set the kAudioSessionProperty_OtherMixableAudioShouldDuck property and then activate the session. When the sound stops I deactivate the session to allow the background music to return to normal volume. This ducks the sound but appears to stop the background music playing.
It appears that if I set kAudioSessionProperty_OtherMixableAudioShouldDuck then the kAudioSessionProperty_OverrideCategoryMixWithOthers flag is cleared somewhere in the system and vice versa. It looks like you need both of these set to get the desired behaviour, but whichever I set last overrides the other and turns it off.
Does anyone have any ideas whats going on here, any advice would be greatly appreciated?