I know unity has no native support for this, but how can I disable a certain audio source when the player is using their ipod?
I don’t take credit for this answer, I googled it.
// init audio session
AudioSessionInitialize ( NULL, NULL,
NULL, // You might want interruption callback here
NULL );
UInt32 session = kAudioSessionCategory_AmbientSound;
AudioSessionSetProperty (kAudioSessionProperty_AudioCategory, sizeof (session), &session);
AudioSessionSetActive (true);
// Detect if audio is playing
UInt32 isAudioPlaying;
UInt32 size = sizeof(isAudioPlaying);
AudioSessionGetProperty(kAudioSessionProperty_OtherAudioIsPlaying, &size, &isAudioPlaying);
if (!isAudioPlaying){
//start your music here - other music is not playing.
}