Hello!
I’ve been optimising over the last week or two as we had a build of the game due. We were running into issues with the music cutting out during a bike race. Figured it was the extra instances active during a race and so after profiling we found that the Virtual and Real Channels available were being hit, so we increased them both to maximum and tested again.
This time, the max channels were not being hit but the music still cut out.
We took out the AI racers audio and this time the music worked. It felt like we’d made room for it? But the max channels were not being reached.
Since then, I’ve done a bunch of optimisation and priority setting in FMOD and the music always works (thanks to priorities) and, from restricting max instances in various events, subevents and audio files, i’ve got it working quite well now.
But even still, there’s stuff that sounds like it’s cutting out, not due to max instances in fmod being met, but more like it’s hit the ceiling in Unity and is stealing events in the game.
For extra clarity, the FMOD settings in Unity have Virtual Channels set to 2048 and the Real Channels set to 256
in the FMOD profiler, I’m maxing out at about 100 Total Voices/70 Active Voices and a top score of 120 instances. This is the same in a build as it is in editor atm.
Anyone have any thoughts on this? Or further suggestions for ways I can profile this?
Thanks!
Tom
Hi,
What version of FMOD and Unity are you using?
Would it be possible to get the profiler recording uploaded to your profile with these settings:
Hi Connor!
I’ve uploaded my recent profiler sessions (i hope correctly) to my profile with those settings. Let me know if I did it wrong and i’ll do it again.
I’m using FMOD 2.02.17 and Unity 2022.3.6f1
1 Like
Hi,
Thank you for uploading that. Unfortunately, I am getting the warning that the package does not include any profiler sessions.
Could you try the following:
- With the selected profiler session right-click and select
Package Selection...
:
- Use the options listed above
- Upload the created package
Thanks.
Ah bugger… yep this one I’m uploading certainly does. Sorry about that. Should be up in a few minutes from posting this.
At 1:40, a race starts and it’s usually here that Unity spawns a bunch of objects and the audio clogs up a bit, sometimes to a strangling point. And like i said before, this is when the max amount of channels has not been hit. I’m hopefully just missing something obvious
1 Like
Hi,
Thank you for uploading that again. The issue might be that you are using stealing behaviors other than Virtualization
, other behaviors do not virtualize events rather the events are stopped: FMOD Studio | Advanced Topics - Stealing and Virtualization. Could you try changing the behavior to Virtualization
for all the events and let me know if this helps.
Oh cool! yeah, i’ve got them set to Quietest atm. i have a question though, will setting them to Virtualization still respect the FMOD event’s envelope when it’s triggered to activate?
Gonna set it up either way and test right now.
1 Like
Hi,
Yes, it will. Let me know how testing goes!
Hey! Yeah, it’s all working great! Performance is looking excellent!
Thank you kindly!
Cheers,
Tom
1 Like
Hey there,
Resurrecting this thread because it’s kind of happening again. A little differently though.
The game starts well but gradually the voices drop out until there’s nothing left. Races certainly push that process along. The profiler sessions show accumulating instances and stuff that’s short like one shots are being held for up to 20 minutes. There’s a build up and eventually there’s a burst of some UI noises that have been silent for the last 10 minutes or so.
I can’t work out why the events aren’t being released. Has anyone got any ideas?
Cheers,
Tom
Hi,
Could I get code snippets of how the events are being triggered? Is release or stop being called for those events? Would it be possible to get that profiler session uploaded to your profile?
Hey Connor, thanks for getting in touch.
I’ve uploaded a profiler to google drive and sent it to Jeff. I’ll get it uploaded to my profile asap and leave a message here when it’s up.
As far as I’m aware, the code is clean but maybe there’s something elsewhere that’s holding those events. Jeff asked the same questions so I’m putting it to the programmer and will report back today.
1 Like
Hey Connor,
Jeff is taking a look so no bother if you’re busy elsewhere.
here are the profile sessions from last week that
https://drive.google.com/drive/folders/1IMBZI2G1yRYfFFxMiGvVElqGe7xEJUUN?usp=sharing
1 is before any changes
2 is after fixing the looping bike emote that was stacking (due to being triggered like a one shot)
3 is in-engine rather than build and is after 1 and 2 and has had priority on Bike Dirt event put to Highest
1 Like
Resolved via email discussion. In this case the voice count was being limited by the vorbis codec settings, and changing the Default platform settings wasn’t having any effect.
This appears to be a bug with the FMOD Unity integration, with the Default settings being ignored in favor of the internal default codec maximum of 32.
A workaround is to add a relevant platform to the Platform Specific settings and override the vorbis count for that platform:
1 Like