I am trying to upgrade from FMOD 2.01 to 2.03 but it’s causing bad stuttering that after a day of debugging I still can’t solve. There are quite a few issues:
a fast MultiInstrument (machine gun) is now stuttering rather than being smooth.
it also doesn’t stop when it is supposed to, seems to continue for up to a second.
some single-sample loops (using a loop region) are briefly cutting out when they repeat.
the first 50-100ms of some sounds (cannons) is cut off, causing their transients to disappear.
some voice lines are missing the start (I have not reproduced this personally but it has been reported to be as much as 1 second, not sure).
Personally I have reproduced everything other than 5, and here is a video of 3 happening, both working (FMOD 2.01) and stuttering (FMOD 2.03): https://www.youtube.com/watch?v=XfiWbPD2QA4
Screenshot of profiling session, note the dips in levels corresponding to stuttering, and the event itself. Very simple:
I am testing on Windows, as are other devs and testers all who have reported these issues. The game is Windows-only.
Unity version 2022.3. Strangely/interestingly the issues don’t happen when running the game from the editor, only when running the built game.
It’s a moderately graphically demanding 3D game.
Unity built-in audio is not disabled. Unfortunately it can’t be disabled, the game is quite large/complex and a full migration is not feasible.
There are 7 non-Master banks that are loaded at startup.
The total size of all banks is 170MB of which 120Mb is voice lines.
I have increased the voice limits to 1024/256.
Buffer size is set to auto.
None of the assets are streaming.
There are no changes between the 2.01 and 2.03 versions of the game other than of course the bank file migration (via studio, using version 2.03.7) and going through the upgrade wizard inside Unity.
This is what I’ve tried so far:
Increasing the voice limit to 1024/256. When I ran through the profiler we’re not even close to exceeding the voice limit but I increased this anyway and left it higher.
Increasing the buffer size made things super delayed of course, but it also didn’t help with the stuttering.
Disabling all parameter updates for other events.
Entirely disabling those other events.
Calling loadSampleData on the events before starting firing.
Disabling Unity audio (for the record… the game doesn’t run at all).
I have a modern mid-range gaming PC, but lowering graphical settings to absurdly low levels didn’t help either.
I can send you the profile in that screenshot if it helps.
Thanks Connor. I can track the failing EventInstance::release/setParameterByName calls down, I think it’s benign, just events having parameter values set on them after they’ve been destroyed, but fixing them is good either way.
I’d rather not change the event priority though - do you mean just as a test, or as as solution? I quickly tested it and doesn’t help, still stutters. But basically all events are high priority. Besides in the profile it looks like there are heaps of voices so why is FMOD culling the event at all? and why FMOD 2.03 only?
I just tried updating to 2.02 instead of 2.03 and the stuttering issue is there as well.
Another data point is that a mission with way fewer vehicles on it - and so way fewer events - does not seem to stutter.
edit: I tried putting a bus instance limit of 4 on the engines and it seems to have fixed the stuttering. It’s not a solution unfortunately (I just posted Group bus instance limiting for continuously playing events) and it’s still a mystery to me why this is working in FMOD 2.01 but not 2.02/2.03. It makes me a little nervous to update even if I do get the custom limiting code to work.