We are using the extension for spatialized audio with FMOD on Quest. When too many sounds play (like 90), the sounds, which are oneshots, will stay in the lifecycle as active, and cannot be released, this then causes successive sound effects not to play and get stuck as well. The only workaround we have for this is to block sounds from playing if too many are already active. It would be good if the lifecycle resolved properly.
A few questions:
- What version of FMOD for Unity are you using?
- Are you using the Studio API to play Events, or the Core API to play Sounds?
- In FMOD for Unity’s settings, can I get you to set the logging level to “Log”, enable API error logging, and post a log where the issue occurs?
- We are using 2.02.21 on Unity 2022.3.36f1
- Using the Studio API
Here is the log: fmod_overload-3-25.log - Google Drive
Thanks for the log.
The issue you’re running into is likely caused by a combination of two things:
- Your event instances not being released, or never reach their end even when
release()
has been called on them - As a result of the event instances not releasing, you’re either hitting an event instance limit set on an event or a bus, or your voice count is hitting the max voice counts set in FMOD for Unity’s Settings → Platform Specific
For the first point, you need to make sure the event instances have had release()
called on them - oneshots played with RuntimeManager.PlayOneShot()
are set to release. If the instances persist despite being released, it’s likely that the event is either set to persistent in the event macro section of the deck in Studio, or has no natural end (i.e. there’s always content that it will play in the future, it loops forever, etc.). I’d recommend making sure that neither of these things are occurring for the event instances in question.
For the second point, if resolving the first point doesn’t fix the issue, you may need to either increase the event’s max instances, or the bus instance limit if either of them have been set to low values. If the channel count is the issue, not the event instance count, you should increase the max real and virtual voice counts in FMOD for Unity’s settings, as mentioned previously.