(Using Unity 2021.3.8f1 and FMOD Studio 2.02.27. The project I’m referring to is uploaded in my profile)
Hello, I’ve been working on a project for the last month that is of a bigger scope than other projects I’ve worked on with FMOD. Everything went quite alright as I had good programmers in my team who helped me with some of the implementations.
The only major issues that I encountered that led me to spend quite some time on these forums looking for answers were errors regarding buffer size. These are some examples of the errors I had:
[FMOD] AsyncCommandBuffer::growBuffer : Growing command buffer to 65536 bytes. Initial command buffer size can be tuned to avoid dynamic growth using Studio::System::setAdvancedSettings()
[FMOD] OutputWASAPI::mixerThread : Starvation detected in WASAPI output buffer!
These errors would lead to sounds not being played or to overall freezing of the game in the editor. The Profiler helped me see that almost all of the instances (like 120) were active at the same time.
To fix these I resorted to limiting the amount of Max instances for specific sounds and using Stealing. The problem with this is that, for example, limiting the max instances of the torches in the level and using Furthest for Stealing would cause some of them to not be played at all (which I wrongfully believed it would be updated every frame). Even after adding more sounds for the later parts of the game I had to limit the max instances in the mixer since it was causing the same buffer errors.
So, all of this makes me wonder, how do games with a greater scope deal with this? Our game consists of a single level and a gameplay time of around 20 minutes. How come a game of this scope is reaching it’s limits sound-wise? What am I doing wrong?
I couldn’t find information in the documentation that would tell me how to, for example, disable instances through distance from the listener or even update the “Furthest” Stealing to make it so that the player would never run into a torch without sound. Maybe I haven’t looked hard enough or missed it.
I’ve uploaded the project to my profile so it’s easily accessible alongside the FMOD project. I can point to any specific script where FMOD is being used if need be.
I would love to know how to be able to have all the sounds I’d like without depleting the buffer. I’ve been loving FMOD so far and would like to keep learning on how to tackle these sort of things.
Thanks to anyone who may help.