I’ve written a ObjC plugin to let me display, select, and play the playlists that are on the player’s ipod while they are in my game. I’m not using the built in modal view that Apple supplies because I think it’s a piece of crap. I’m doing it more low level so that I can make it all match my game.
But I’ve run into an annoying problem that I cannot solve and am hoping for some help.
If I launch my game and go into the internal iPod playlist browser, select some playlists, and hit play, the playlists all play wonderfully. The in-game music fades out pretty nice, too. However, the sound effects stop! And they won’t come back when I stop the iPod music player. (I’ve tried using both the “iPodMusicPlayer” and “applicationMusicPlayer” types of MPMusicPlayerController).
If I start playing music before I launch my game, launch my game, and then go into my internal iPod playlist browser and select some playlists, everything works great. The sound effects still function.
I suspect that maybe there is some conflict with MPMusicPlayerController and OpenAL? I tried enabling/disabling audio using UnitySetAudioSessionActive(bool) at various places as experiments, but that didn’t fix anything.
Any ideas?
Thanks!