Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

4.6+ Sound Interruption - Siri, Alarm, Call - doesn't resume on focus

Discussion in 'iOS and tvOS' started by LightStriker, Jun 4, 2015.

  1. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,716
    We have a major issue - Unity 4.6.4/4.6.5, both mono or IL2CPP - where once the app is interrupted by external source such as Siri, an Alarm or a phone call, upon returning to the app, there is no sound.

    AudioListener.pause is false.
    AudioListener.volume is 1.
    AudioSettings.dspTime is stuck and is not increasing anymore following the interruption. We found no way to "unstuck" it.

    Following Apple guideline, this could be a submission blocker.

    Bug : http://fogbugz.unity3d.com/default.asp?701940_rps5ppprv03f47b2
     
    Last edited: Jun 4, 2015
  2. Deleted User

    Deleted User

    Guest

    We encountered the same issue but we use FMOD as external libraries. We first of all thought that FMOD was involved.
    We try a lot a smart and stupid things, we only "solve" the problem by adding a sleeping time on application resume.

    - (void)applicationDidBecomeActive:(UIApplication*)application
    {
    printf_console("-> applicationDidBecomeActive()\n");

    // Add a delay to avoid SIRI issue.... Ugly workaround
    [NSThread sleepForTimeInterval:0.1f];

    ...
    }

    Did you find something useful?
     
  3. Pablo-Isidro

    Pablo-Isidro

    Joined:
    Apr 1, 2015
    Posts:
    5
    Hello,

    We have the same problem using Unity 5.2.1f1 and xCode 7.0.1

    If we open Siri inside the app and then close Siri, the sound do not resume. We've checked that the mix and volume are ok.

    If we open and close the notification tray after the above situation the sounds works again. It seems to be an Unity-iOS / iOS9 bug.

    Do anyone knows if there is a Unity-Side solution without getting into native?

    Thanks
     
  4. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    Hi, do you reproduce this on Unity 5.3? If yes, could you please submit a bug report with a reproduction project attached; we would like to look into this issue. Thanks!
     
  5. GivingTales

    GivingTales

    Joined:
    Mar 20, 2015
    Posts:
    1
    This is still an issue using 5.3.4p4. We have encountered this in our app after interrupting it with Siri. Sometimes (like around 10% of trials) there is a small visible UI lag after coming back to Unity and the audio dsp stops updating until the next app lose/gain focus event. Did you receive a bug report already? (Unfortunately, I cannot send in the project I'm working on.) The "[NSThread sleepForTimeInterval:0.1f];" workaround seems to be working so far.
     
  6. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    Unfortunately no bug report has been submitted yet.
     
  7. dtamas80

    dtamas80

    Joined:
    Oct 29, 2015
    Posts:
    2
    I have the same issue, but I have android phone. I tried to use OnApplicationPause method and debug what happend but nothing helped.
     
  8. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,716
    Many bugs have been submitted, but closed under "cannot reproduce". Which is odd, since I personally submitted a stripped down project that we were able to repro the bug 100% of the time on all iOS device.
     
  9. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    @LightStriker Could you post your bug number here? I'll ping QA to re-investigate.
     
  10. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,716