Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Audio All audio slowing down for unknown reason

Discussion in '5.4 Beta' started by Digital-Dreams, Apr 26, 2016.

  1. Digital-Dreams

    Digital-Dreams

    Joined:
    Jul 5, 2012
    Posts:
    45
    As of b11 (and haven't been able to upgrade yet, but I haven't seen anything in the notes that seem related to this), we sometimes have all of our audio slowed down, while the rest of the game remains to run fine. We generally have about 10-30 clips looping (some muted), which we're beat-matching and remain in sync while they're slowed down. Sound effects are equally slowed.

    We never touch pitch anywhere, we never experienced this before touching 5.4. We can't reproduce it, it just happens sometimes. We've only noticed it on PC (multiple machines, if not all) so far (also developing for PS4 and XB1). Sometimes after being slow for a while, it goes back to normal speed again, but it also seems like it can last forever. Interestingly, going from ingame to the main menu (fresh scene, cleaning up resources etc), then continuing and loading where we left off, the audio is still slowed down. Completely restarting the game fixes it.

    Our Audio settings are set at Best Latency (because of the beat matching), and all of our music layers are 44100khz, have Preload Audio Data on (Load in Background off) and Mono with some being forced to Mono. We're not using any Audio Mixers.

    Did anyone encounter something like this?
     
  2. janm_unity3d

    janm_unity3d

    Unity Technologies

    Joined:
    Jun 12, 2012
    Posts:
    36
    When you say it's slowing down, do you mean that the pitch is slowed down too, or does it result in stuttering? Would be interesting for us to know if this is caused by excessive CPU load, which is something you can check in the Unity profiler's Audio pane. Are you using any expensive effects such as reverb or spatialization on the audio sources?
     
  3. Digital-Dreams

    Digital-Dreams

    Joined:
    Jul 5, 2012
    Posts:
    45
    Ah sorry, I didn't get an alert.

    The pitch is slowed/lower, there is stuttering too (but might just be how percussion-kinda things sound when slowed). You can see a dip in the audio's/dsp cpu graph happening. This was a short dip, I haven't had it run slow permanently anymore, but the dips often last 2-3 times as long as the one I'm uploading now. There's nothing else to see or changing in the game really, as it can happen when I've just been standing about.

    I did start using the Audio Mixer just now, but I'm not using any effects like Reverb or such, anywhere. Nearly all the audio is 2D. There's just one of two 3D audio sources/looping.

    Missing info in screenshot:
    Total sources: 50
    Playing sources: 11
    Paused sources: 39
    Audio Clip Count: 158
    Audio Voices: 11


    When the sound is steady, it takes:
    Total audio cpu 3.8%
    DSP CPU: 3.4%
     

    Attached Files:

    Last edited: Jun 12, 2016
  4. Digital-Dreams

    Digital-Dreams

    Joined:
    Jul 5, 2012
    Posts:
    45
    Also, I've had this happening once or twice when returning focus Unity, as if resources take a while to get allocated. It