Hello,
Currently working on a small RTS game here :
I have some issue concerning the sound setup.
I would like to keep a 3D sound then I added a Sound Emitter component on each mobs and structures.
Well it does work but…
… When a dozen of mobs are killed at the same time, the sound is increase x10 and it kills device speakers.
Is there some good advise in this case?
How should I limit the level?
Thank you! :o
You could make a Audio Manager which acts as the middle man. The units tell the manage to play via AudioManager.PlayClip(clip, position) etc.
The audio manage then can do some fancy stuff such as apply pitch variations so sounds dont always sound identical, as well limit the amount of audio that plays at one time, or even prioritises it, so if the limit is eg 10, it will play the 10 most important audio clips or only 2 identical clips can play at the same time etc.
yeah I think you are right…
I finally go for a 2D sound…
Made a class per type of sound to be sure they have their own Source…
Finally will do the (clip,position) thing you speak about or maybe simply test if the asset is into the Camera frustum.
Well that is already a good optimization to remove the audio source from each mobs and structure…
Thank for the tip o_<