Search Unity

Audio Sound cuts of or clips when using many audio sources with custom priorities

Discussion in 'Audio & Video' started by Wattosan, Mar 16, 2018.

  1. Wattosan

    Wattosan

    Joined:
    Mar 22, 2013
    Posts:
    460
    Hello,

    I've come across a problem where some sounds are simply not audible, and some cut off from time to time.
    This happens in a case where a lot of sound effects are played at the same time.

    I've categorized my sounds as the following:
    1) Announcement sfx = Priority 1
    2) Notification sfx = Priority 1
    3) Game Audio = Priority 2
    4) Hit effect = Priority 30
    5) Weapon hit effect = Priority 50
    6) Weapon fire = Priority 75
    7) Music = Priority 200

    The priority here is the variable of Audio Source.

    I use this setup for a multiplayer game, and I've had no problems while playing 1v1 or 2v2. However, playing 4v4, the whole system broke (or simply acted the way I set it up, but this is the wrong way to do it).

    The announcment and notification sfx worked very nice. No problems there. Always audible, clear, no cut offs.
    Weapon Fire effects were mostly not audible at all. Music worked terribly. For the whole match of 10 minutes, music cut off every second or two. This means, the player could not hear the music for 1-2 seconds. Then it would be audible again.

    Obviously the problem is in the priority setting. Next time I will try setting each audio source's priority to the same value, and see how that plays out.

    However, could someone explain what is exactly happening here? And what would be a good way to prioritize sounds, if at all?

    Thank you!
     
  2. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,305
    I'd try to increase number of real and/or virtual voices (audiomanager settings)