Issue with multiple gun shots

Hello there!

I’m having a problem with gunshots sounds. We have quite big amount of different guns in our 3rd person RPG, and each of them has its own gunshot sound event with equal high priority. We have the shooting system when shot sounds are played without looping, being spawned every moment while pressing the Shoot button. However, despite their equal priorities, every time when several characters shooting simultaneously, one gun shot sounds supress another and I have audible pauses during the shooting. I set the number of channels in engine_config file to 1024 hoping that such number will let all the sounds work simultaneously, but that didn’t help.
Please explain how should I work this out.

Best regards

Are they all single shot weapons, or are there automatic weapons too? For automatic weapons triggering a new event instance for every shot is very wasteful.

See what the instance limit handling of the weapon sounds is in each event (virtualize? steal quietest? Steal furthest? Note: Virtualize fails to work if the Spatializer has any 2D mix applied). On the mixer group level you can se the rule to Steal Oldest but that can lead to problems if shots triggering further away cut closer shots short.

How many characters are there in the scenes shooting in a usual setting? You may need to come up with a more optimized, prudent way of triggering the shot sounds.

Thanks for your reply!

This issue can be obviously seen with automatic guns. However, I think it happen with all kinds of weapons (one shot pistols, shotguns, etc.). Max instances value is 15 for each sound. Stealing works for oldest sounds, for events and for groups, and likely the problem that you’ve mentioned as “that can lead to problems if shots triggering further away cut closer shots short” is happening.

Will changing of stealing mode from Oldest to Virtualize (or which one?) help? And how much the using of looping within one event will improve the behaviour of gun shot sounds simultaneously playing? I’ve checked this behaviour after migrating from FMOD Designer (yes, until the recent time we have still been using this one :)) with several NPCs, as our game is multiplayer online one and there may be a lot of players shooting at once.

If your issue is that audible event instances are being stolen, switching to a different stealing mode may well help - though of course, without actually seeing your game in play, it’s impossible to say for sure.

You can read about the different stealing modes and their effects in the Stealing and Virtualization section of the FMOD Studio User Manual. Switching to Virtualize or Quietest seems most likely to provide improved results, though again, without knowing your game’s unique needs, I can’t be sure which is the best option.

Yes, it wouldn’t help. As described in the Virtual Voices whitepaper in the FMOD API User Guide, maxchannels just determines the total number of voices, including both software and virtual voices. In your case, though, it sounds like the number of software voices is being exceeded.

Software voices are audible voices, and the maximum number of them a game needs is usually in the range of 32-128. It is very unlikely that a game will need more than this, as humans can only discern a small number of distinct simultaneous voices; if you find yourself exceeding the limit, it is likely that your game is producing sounds that players cannot notice, and which should be culled or stolen.