Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Audio What does the SoundManager.Update do?

Discussion in 'Audio & Video' started by jlindskov, Aug 19, 2021.

  1. jlindskov

    jlindskov

    Joined:
    Feb 12, 2020
    Posts:
    6
    Hi,

    We are looking at optimizing the sound in our game and we are currently looking at the SoundManager.Update in PostLateUpdate in the profiler which currently is the most expensive thing we have audio-wise. The thing is that we aren't entirely sure on what this call is doing. AudioManager.Update seems to be responsible for the audiosources in the scene. Is the SoundManager.Update responsible for the audio mixer or is it doing something else? We tried to remove our Mixer and the SoundManager.Update still seems to take the same amount of CPU time. So does anyone have a clarification on why and what the call actually does?
     
  2. AFAIK Unity doesn't have SoundManager built-in class, so it is probably something either you wrote or you installed, therefore we don't know what it is and what it does. If you can post the source code of this class we can guess.
     
  3. jlindskov

    jlindskov

    Joined:
    Feb 12, 2020
    Posts:
    6
    upload_2021-8-23_9-55-25.png
    This is indeed a unity class. This is just running with 1 sound playing.
     
  4. Tak

    Tak

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    The sound manager is a native class within Unity that handles delayed loading and disposal of audio clips.
    If you have a project where you think it's taking too much time, particularly when you're not doing these things, please send it to us so that we can look at what's going on.

    https://unity3d.com/unity/qa/bug-reporting
     
    Claytonious and Lurking-Ninja like this.
  5. Hyp-X

    Hyp-X

    Joined:
    Jun 24, 2015
    Posts:
    431
    We run into the same issue as the original poster so I submitted a bugreport:

    (Case 1394948) SoundManager.Update takes CPU time when there's no audio work
     
    PutridEx likes this.