# GameCore - Insufficient Opus streams available error

**URL:** <https://qa.fmod.com/t/gamecore-insufficient-opus-streams-available-error/20305>\
**Category:** Unity\
**Tags:** unity\
**Created:** [June 12, 2023, 10:35am UTC](https://qa.fmod.com/t/gamecore-insufficient-opus-streams-available-error/20305 "2023-06-12T10:35:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![furyIvan](https://avatars.discourse-cdn.com/v4/letter/f/898d66/32.png) [@furyIvan](https://qa.fmod.com/u/furyIvan)\
**Post date:** [June 12, 2023, 10:35am UTC](https://qa.fmod.com/t/gamecore-insufficient-opus-streams-available-error/20305/1 "2023-06-12T10:35:27Z")

</div>

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:

```auto
[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!

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [June 13, 2023, 6:42am UTC](https://qa.fmod.com/t/gamecore-insufficient-opus-streams-available-error/20305/2 "2023-06-13T06:42:15Z")

</div>

Additional documentation can be found in the [FMOD Engine- Game Core](https://fmod.com/download#fmodengine) 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](https://qa.fmod.com/c/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](https://fmod.com/docs/2.02/api/white-papers-getting-started.html#using-decompressed-samples-vs-compressed-samples-vs-streams).

Setting higher values with `FMOD.GameCore.SetXApuStreamCount` will likely resolve the issue, otherwise changing your [encoding settings](https://fmod.com/docs/2.02/studio/getting-events-into-your-game.html#compression-and-encoding-settings) in FMOD Studio to something other than Opus, and only using [Opus encoding on some assets](https://fmod.com/docs/2.02/studio/managing-assets.html#custom-platform-encoding-settings) 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.

---

<div class="post-metadata">

**Author:** ![furyIvan](https://avatars.discourse-cdn.com/v4/letter/f/898d66/32.png) [@furyIvan](https://qa.fmod.com/u/furyIvan)\
**Post date:** [June 13, 2023, 2:48pm UTC](https://qa.fmod.com/t/gamecore-insufficient-opus-streams-available-error/20305/3 "2023-06-13T14:48:28Z")

</div>

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!
