Problems with Audio Dropping on Highest Priority event

Hey all.

We seem to be experiencing an issue with our game where, when the game is very busy with many enemies spawning in waves for the player to defeat, that killing them in rapid succession causes our persistent on-going music event to drop out.

You can see that this event is set with its Priority at the ‘Highest’ value, one of maybe 2 events in the game that have this priority level set.

You can also see in our FMOD settings within Unity, our max real voice count is at 32, and virtual at 128.

The 32 is near capped most of the time during common gameplay, but we cant figure what would cause the music event to drop out very frequently in our builds, there is also this graph data from a profiler session.

You can see here that in terms of level, it is dropping out completely and for prolonged (seconds) periods.

We’re not sure what to troubleshoot exactly that could be causing this issue, most of the events across our entire project at the event level have voice count ‘Max Instances’ settings adjusted for the mix, but still our highest priority event keeps dropping out. Any hints would be greatly appreciated. :grinning:

1 Like

I would look at the stealing behaviour and max instance counts of your spamming events, and setup their stealing to be steal quietest or furthest, or virtualize them, and give them sensible max instances (how many of these events should be allowed to play at once)

See if that helps. It sounds like the amount playing is too many but fmod doesn’t know what rules to apply to reduce the amount playing

Hey Michael, thanks for chiming in. Perhaps it could be better, but max instance limiting is something we’ve been doing project wide since quite early on, most of the ‘spammable’ events get up to 3 - 4 voices max before they virtualize. I think its a fine suggestion, just not sure if that’s the problem exactly as its something that’s already been largely accounted for.

1 Like

Sorry for the delayed response- persistent events should be taking precedence in this scenario.
That said, from your screenshot, this music event doesn’t appear to have the Persistent property enabled, if I am understanding the setup correctly.

Could you please package this profiler session, with the “Banks” option ticked, and upload it to your FMOD Profile?

Hey Jeff! Thanks for the help.

I’ve uploaded a capture of that session from the screenshot to my profile, please let me know what you make of it. We are also in the midst of exploring some other solutions as well.

Cheers.

Thank you for sending that over. I can see the event in question is set to highest priority, and the event instance count remains at 1 throughout the capture- so the highest priority setting appears to be behaving correctly.
The voice count however is dropping down to 0 during these dropouts. Voices are the lower-level resource that are allocated to the event for audio playback, and these can still be virtual even if the Event isn’t, due to the software channel limit being hit when a large amount of voices are playing. You can read more about this in the Interaction with Core API Virtual Voice System section of our Virtual Voice doc.

Another consideration is the number of available streams- I imagine all of the audio assets in this background music event will be set to the streaming Loading Mode. If any of these spammy events are also using streams you can quickly exhaust your (often very limited) hardware streaming resources, resulting in existing streams cutting out even though you are nowhere near your software channel limit.

So, you have a few options to prevent this issue from occurring:

  • Increase you software channel limit with a call to System::setSoftwareChannels
  • Ensure no assets in your spammy events are set to the Streaming loading mode.
  • Further optimize the voice count and stealing behavior of your spammy sounds. I see the enemy_death and chaser_spawn events have high voice counts. If you are still getting dropouts after trying the the above, maybe think about how you can reduce the voice count in these events, such as bouncing a couple of different death/spawn variations in your DAW and using those in a single multi-instrument, rather than 5 multi instruments in a single event.

Hopefully that makes sense, please give one or more of those options a try and let me know if you still get dropouts.