Hello!
We’re getting an error regarding FMOD in Xbox Series builds. In the FMOD project Xbox Series platform is set with default settings, built and set in the Unity project. While running the build we are getting the following errors every second:
[FMOD] Opus_SetupContext : Insufficient Opus streams available. Use FMOD_GameCore_SetXApuStreamCount to set a higher decodeCount.
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
FMODUnity.RuntimeUtils:DebugLogError(String) (at C:\*Project path*\*Project name*\Assets\Plugins\FMOD\src\RuntimeUtils.cs:574)
FMODUnity.RuntimeManager:DEBUG_CALLBACK(DEBUG_FLAGS, IntPtr, Int32, IntPtr, IntPtr) (at C:\*Project path*\*Project name*\Assets\Plugins\FMOD\src\RuntimeManager.cs:77)
The method that is mentioned in the error for setting “decode count” and “decode convert count”, is unclear to us and we cannot find which values are now used and which values should be set. We also searched Microsoft’s forums and documentation about Xapu API but unfortunately, it didn’t help us. We would appreciate it if you could help us to better understand the following error by pointing us to documentation or some guide about the mentioned method, or by explaining how to know the right decode count values.
Thank you for your time! Cheers!
Additional documentation can be found in the FMOD Engine- Game Core download. The doc for SetXApuStreamCount
can be found in “doc\FMOD API User Manual\core-api-platform-gamecore.html”. It is not very clear that you can find platform-specific information in the FMOD Engine download so I have created a task to improve discoverability.
I can’t discuss the XApu API in much detail here as this is a public forum post, but if you post in the Xbox Series X section of the forums we can discuss freely. The first argument of FMOD.GameCore.SetXApuStreamCount
is the number of hardware Opus decoders to reserve for streams and decompressed sounds, and the second argument is the number of hardware Opus decoders to reserve for compressed sounds. You can read more about different compression types here: White Papers | Getting Started.
Setting higher values with FMOD.GameCore.SetXApuStreamCount
will likely resolve the issue, otherwise changing your encoding settings in FMOD Studio to something other than Opus, and only using Opus encoding on some assets should resolve this error.
Please also ensure you have disabled Unity Audio so that Unity doesn’t try to acquire all of the available decoders.
Okay, both your explanation and docs link helped! We’ve increased FMOD.GameCore.SetXApuStreamCount
values and we’re not getting these errors anymore.
Unity Audio was disabled, but thanks for the tip!
Thanks for the help once again!
1 Like