SoundFX cutting out

We are working on a game, where we have a few sound effects playing at the same time, up to 3 or 4 in some sections. We noticed that sometimes it will skip an effect. For example, while collecting 3 coins it will play the effect for the 1st and 3rd coin, but not the 2nd. This happens in both the editor and the device, so not sure it is a performance issue.

Are there any known limitations with sounds? All our sounds are mono, most are 2D (falloff set to linear on the 3D ones). We use 16bit, 44kHz… is that too much?

Any help/insight regarding sounds would be greatly appreciated!
thx
-marc

There doesnt seem to be any documentation about it but there has to be a limit to the number of sounds that can play at one time. Now if the coin sounds are important you can try setting it a priority of 0, and try setting the background noises to 128

Yeah, we tried playing with priorities, but it doesn’t seem to help… for example an explosion sound (which has a higher priority than the coins) is sometimes suppressed while the coin sound before that is still playing. I guess we’ll seek an audience with the Unity gurus next week :slight_smile:

did you have any luck fixing this issue ?
we have the same issue… sometimes sounds don’t play, or glitch out half way through. with audible noise/error.

Possibly new sounds are being played over sounds that are already playing… but it doesn’t seem like there enough sounds playign at the same time for this to be the case…
and also considering that a glitch can be heard… that suggests its not beign over-written, but that an error is happenign during playback.

seems to happen with both compressed and uncompressed audio

Hi guys,
Can you report this as a bug? and attach a small project reproducing this.

cheers,
Søren

If you haven’t already, try playing with the “pitch” editor option, also if you can make all event type sounds as 2D, and only have your music as 3D with its source parented to the camera…
Hope this helps
~K

ok found some things which improve (but doesn’t fix all cases)

if you are doing this in your playsound function…
Destroy(soundObject, sound.length);

This seems unreliable, and try adding 5 or 10 seconds ot sound.length to get better results.
also there is a sound.priority 0=highest 255=lowest which might help things.

Sorry, but how should this help at all?

Actually, in the documentation, it states that 0 = lowest priority and 255 is the highest. From the tool-tip in the editor:

I know this is an old thread but I want to correct the last post for future readers. Lower numbers are higher priority as johnnyhilly originally said.