How to handle simultaneous sound with Unity 5 Audio
H Alli, Unity creates an issue with sounds amplitude whenever the same clip is played several time at once. It makes it very loud and distorted. For example if multiple players are using the same gun, firing all of them at once would totally destroy the sound. There are several technique you could use such as ensuring not to play same clip at once and/on decrease the sound manually. All of which are nothing but dirty hack to remove this very common issue. However I was wondering if there was a simpler way to tackle this with Unity 5's new audio system.
If anyone knows anything, please do share your method. Thanks
Answer by Fluffy_Kaeloky · Dec 18, 2016 at 10:38 AM
Well, it seems normal to me that the same sound played multple time at the same time would be distorded, if only by the slight imprecision of each players.
As for correcting this issue, I would use a Singleton managing the Audio. The AudioManager would use audio GameObjects from a pool, once you reached your maximum SFX currently playing, or the same SFX, just ignore the request.
It is actually an issue with a lot of games (In a lot of games, if too much SFX sounds are playing, the others would just be ignored), not only Unity, it is also the jobs of designers to avoid that sort of problems.
That is exactly I do and I've already mentioned this. I was hoping to know if there was some new way to tackle this with Unity 5's new audio mixer.
Not that I know of, I'm no expert in audio tho. I'm also not exactly sure if it actually is a problem, I think the distortion actually is normal behaviour, did you try listening to a lot of same sounds in an audio proof room ? I can't say I did, but trying to play the same sound slightly at the same time in Audacity would feel distorded.