How can I prevent AudioClip's from stacking?

Audio stacking is when the same sound is played more than once at the same time. In some cases it will result in increased volume and in other cases, it can cause phasing artifacts. It can happen if more than one script plays the same sound at once. Does Unity provide any tools to prevent stacking?

AudioClip doesn’t have a playLimit property or anything of the sort that I could see. Do I have to write my own audio manager to do this?

You can use the isPlaying property of AudioSource.

if (!source.isPlaying) {
  source.Play();
}

http://unity3d.com/support/documentation/ScriptReference/AudioSource-isPlaying.html

I think best solution is to add all audio sources to “AudioMixer” then make a group for sounds that are played at the same time. And simply add efect on top called “Normalize” with default setting everything should work as intended

you have to actually do same as wat steakpinball told but in a different approach… have all the audio sources in an array and check if any of them plays the particular sound, if not then play this instance!!!

var audioArray:AudioSource;

function Play():boolean
{

   for(i=0;i<audioArray.Length;i++)
    {
         if(audioArray*.isPlaying)*

{

return false;
}
}

source.Play();
return true;
}
i cant find any other easy way arround

Usually I implement a List of clip names, clear it up on every frame, and every time, when I try to play some clip, I check, do this clip`s name contained in List, if not - put this name to list and play clip, else - do nothing.