Hey there,
FMOD 2.03.02
Working on an open world game with a large amount of NPC’s. They emit a lot of different sounds and it’s important for the game but ever since the amount of NPCs doubled in the last week the problems have started:
NPC sounds are now either stuttering or not playing at all when you go past them. I have tried changing different stealing types and changing the max instances from 6 to 1 and it still causes issues.
In the Profiler you can see a lot of lifespans starting and then new instances starting immediately after all varying in length but most are short. still showing maximum 3 at once as that’s what I’ve most recently set the maximum to. but FMOD is creating lots of new ones consistently.
Weirdly this has no correlation to the stuttering of the sounds cutting in and out. some of the long lifespans the sound is still cutting in and out. As if the lifespan changing is a separate issue. I’ve tried this in both waveform and simulate. I’ve also been changing the priorities of NPCs as well from highest to lowest and it doesn’t change this.
This issue of increased NPCs has also caused other sounds in the world which have priority set to highest to completely disappear during gameplay. This issue only started once this happened. In code we upped the maximum voices to 120. This reduced the issue but we are shipping to multiple platforms and I’ve seen they have different voice counts. It was a way on confirming that the amount of NPCs spawning was related to the issue.
I’ve been optimizing the FMOD project by condensing multiple audio files into one file inside of different events to lower the voice count but still we have the issue and it all points back to the NPCs.
Under Instances total it peaks at: Active (total) 122 , Instances playing (total) 132 , All (total) 604
Under Voices (total): Voices all (total) 126 , Voices active (total) 37.
I can’t think of what else to try and I’m out of my depth, was considering maybe this is a coder problem to solve, so if anyone has anything I can try to solve this please let me know.