Search Unity

Audio PostLateUpdate.UpdateAudio -> AudioManager.Update takes 40ms on empty scene

Discussion in 'Audio & Video' started by ImperativeGames, Apr 22, 2018.

  1. ImperativeGames

    ImperativeGames

    Joined:
    Dec 11, 2016
    Posts:
    34
    Up to 100ms, actually, didn't want to sound like clickbait.
    Doesn't matter if I have AudioSource in the scene. CPU - Core i-5 8600K. Unity version is 2017.4.1f1.
    Any ideas?
     

    Attached Files:

    Last edited: Apr 22, 2018
    Docaroo likes this.
  2. Docaroo

    Docaroo

    Joined:
    Nov 7, 2017
    Posts:
    82
    I'm almost positive I know what is causing this for you so let me ask - how many audio mixers/controller groups do you have in the project? I have discovered a huge issue with Unity and audio mixers in that if you have loads of them (even inactive with no audiosources) it will cause a huge drain on the CPU.

    I found this feedback post: https://feedback.unity3d.com/suggestions/mixer-performance-issue

    And I have since logged it as a bug with Unity too so it get's looked at.

    I recently joined a game where we have over 1,000 mixers already and have been trying to solve our 50% CPU usage on audio. When I just deleted 80% of the mixers down to like 200 the performance was exponentially better. From 30ms processing delays down to 0.5 ms. It seems like there is a critical number of mixers somewhere around 3-500 or so where the performance completely tanks.

    I'd recommend going with as few mixers as you can! Hope this helps!
     
  3. Steamc0re

    Steamc0re

    Joined:
    Nov 24, 2014
    Posts:
    144
    I am getting 1000ms spikes on AudioManager.Update..... with ZERO mixers. How did you profile this? Or was it just a guess at mixers and you went from there?