Can my app be notified when another application starts/stops playing audio?
问题 My iOS game has music and sound effects. I'd like to let users listen to their own music in place of the game's background music. A simple solution is to add a new menu item that disables the game's background music. However, I'd like to avoid creating a new menu item unless I can be convinced that this approach is worse for the user. My current approach: Set the audio session category to AVAudioSessionCategoryAmbient to allow mixing of game audio with iPod (or other music app) playback. In