Search Unity

Audio Stuck Partial Wakelock: AudioMix

Discussion in 'Audio & Video' started by g8minhquan, Sep 7, 2018.

  1. g8minhquan

    g8minhquan

    Joined:
    Jun 18, 2014
    Posts:
    36
    (I posted this question on the Android forum but then realize that it should better be here)
    On Google Play's Android Vitals page, it shows that my game has some Stuck Partial Wake Lock issues with the tag "AudioMix"
    As I understand, it means that my game sometimes still plays music even when in background.
    Do you know what could be the reason causing this?

    Thanks in advance :)
     
  2. pcanniff

    pcanniff

    Joined:
    Jun 11, 2018
    Posts:
    1
    Hi g8minhquan,

    We are having a similar issue and have had a number of engineers trying to solve it. It might be best for us to communicate our similarities to see if we can pinpoint a cause ourselves.

    I have multiple titles running across Unity 5.6.5 to 2017.4 that are experiencing AudioMix in Vitals. We are near threshold. We have found enormous amounts of resources pointing to AudioFlinger (Androids old audio decoder) being the cause of the lock. What we don't know is what our games are doing to trigger it.
    https://android.googlesource.com/platform/frameworks/av/+/6fa2018^^2^^!/

    We noticed the growth and spike during our GDPR builds which are using a Native Plugin to display native android assets. No sound though.

    Our game is experiencing this most on start-up, or reproduced when the user/tester locks the device on the splash screen/GDPR policy.

    We've found similar issues in Cocos caused by EventDispatcher, a fix from Corona SDK that helped other reports, and users attributing it to Lock Sounds on the device. Nothing so far as to why it's caused in Unity, however my assumptions now lead me to believe it was older versions of Unity not having enough support for Android 8.0/8.1 (Which is all Vitals covers and introduces a new Audio decoder) in their audio APIS. So far testing is showing better results of it going away in 2018.1, but unconfirmed.
     
    g8minhquan likes this.
  3. g8minhquan

    g8minhquan

    Joined:
    Jun 18, 2014
    Posts:
    36
    Yes we also have the issue on Android 8.0.0 and 8.1.0
    My team is also investigating but haven't found much info
    It's strange that my game has most of the issues since beginning of August, and we didn't update the game for quite a long time before that. I guess the issues might come from some 3rd party Ad networks when they have to change to comply with GDPR? Or maybe because Google Play didn't track this issue before that?
     

    Attached Files:

  4. g8minhquan

    g8minhquan

    Joined:
    Jun 18, 2014
    Posts:
    36
    Have you found a solution yet? Does upgrading to 2018.1 solve the problem?
     
  5. Le-Tuan-Son

    Le-Tuan-Son

    Joined:
    Jan 13, 2016
    Posts:
    12
    In our case, this issue happen frequently from Aug 6 - Aug 13 and from Aug 28 - Sep 16 (Now).
    Beside these days, this issue rarely happen.
     
  6. SolidAppsInc

    SolidAppsInc

    Joined:
    Aug 16, 2018
    Posts:
    1
    We are having the same issue, any updates on the matter?
     
  7. g8minhquan

    g8minhquan

    Joined:
    Jun 18, 2014
    Posts:
    36
    We've updated Unity to 2018.2 and the problem seems gone
     
  8. Leonid

    Leonid

    Joined:
    Aug 20, 2013
    Posts:
    35
    Updating project to 2018.2.20f1 from 2018.1.1f1 has not fixed the issue for me.
    Is there any other way to fix that?
    Or maybe the problem is in one of SDKs used in my project? (Unity GDPR, Unity Remote settings, Unity IAP 1.21, Appodeal, Photon Network, Google Play Games Services)?
     
  9. g8minhquan

    g8minhquan

    Joined:
    Jun 18, 2014
    Posts:
    36
    We highly suspect that it comes from ads. At least in our cases.
    So try to update the ad SDKS, i.e. Appodeal and all the ad network adapters
     
  10. jpsxno1

    jpsxno1

    Joined:
    Jul 19, 2015
    Posts:
    3
    We are having the same issue, has it been solved?