Audio does not resume after iOS alarm interrupts app.How can I resume?

All audio in my app mutes when an alarm or timer or something else system related interrupts the app. Of course this is normal. However, the problem is that it does not return to normal once the dialog is dismissed.

Is this a bug, or is there something I need to implement to get my Audio to come back after being interrupted by the system?

EDIT:
So after some more testing this bug only appears on iOS 7. iOS 6 the audio resumes itself just fine. I don’t think it is that the sounds need to be restarted. I’ve confirmed this in 2 ways. No sounds that play later in the app work at all. Also, if I log the value of my sound.isPlaying, it says true.

Ok, Debug.Log("AudioListener.volume: " + AudioListener.volume); is reporting "1" all the time, both before and after the interruption. However, I did figure out that this bug only happens in certain scenes. Specifically the scenes where I am using Vuforia (Augmented Reality).

Are you tracking an image target while the audio is playing? In this case the audio would definitely pause when interrupted by an alarm.

tracking or no tracking, no sound will play after this occurs, even in new scenes.

2 Answers

2

You have to restart the audio after the interruption is over.

I can’t test this, but it might just mean doing this on your audio source objects.

void Start()
{
  audio.Play();
}

Same issue using Vuforia. Apparently its an IOS 7 thing. Any audio interruption Siri, phone call or alarm will take away the audio from he scene. Been trying to find a solution for 2 days!!!