# Unity Audio + FMOD Audio on PS5

**URL:** <https://qa.fmod.com/t/unity-audio-fmod-audio-on-ps5/21567>\
**Category:** Unity\
**Created:** [May 2, 2024, 1:57pm UTC](https://qa.fmod.com/t/unity-audio-fmod-audio-on-ps5/21567 "2024-05-02T13:57:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JSMallard](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@JSMallard](https://qa.fmod.com/u/JSMallard)\
**Post date:** [May 2, 2024, 1:57pm UTC](https://qa.fmod.com/t/unity-audio-fmod-audio-on-ps5/21567/1 "2024-05-02T13:57:52Z")

</div>

Hello,

I’m working on a PSVR port using FMOD, but we want to run haptics through unity audio to match our other platforms. We’ve had a lot of Initialization errors. Does running Unity Audio alongside FMOD on PS5/PSVR2 typically require any particular code? I imagine we are messing some things up since the two might share resources.

I want to check the PS5 sub-forum, but am waiting to get the verified account from my team. Thanks!

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [May 8, 2024, 2:23am UTC](https://qa.fmod.com/t/unity-audio-fmod-audio-on-ps5/21567/2 "2024-05-08T02:23:53Z")

</div>

> [@JSMallard](#):
>
> Does running Unity Audio alongside FMOD on PS5/PSVR2 typically require any particular code? I imagine we are messing some things up since the two might share resources.

You will likely need to use `FMOD_PS5_AT9Configure` to disable AT9 codec allocations for the FMOD System, which should stop any issues caused by resource contention. For more information, take a look at the PS5 Specific chapter of the Core API Reference in the docs included with the PS5 FMOD Engine installer.

---

<div class="post-metadata">

**Author:** ![JSMallard](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@JSMallard](https://qa.fmod.com/u/JSMallard)\
**Post date:** [May 15, 2024, 1:55am UTC](https://qa.fmod.com/t/unity-audio-fmod-audio-on-ps5/21567/3 "2024-05-15T01:55:28Z")

</div>

Thank you! This did work and allows unity audio to run in parallel with fmod. We are still working through the particulars. Are there any known issues with the use of FMOD.PORT\_INDEX.FLAG\_VR\_CONTROLLER?

When passing a userid and that flag as in the (public) scripting examples, I get an error:

`[FMOD] AudioOut_OpenPort : portIndex must not be FMOD_PORT_INDEX_NONE when portType is FMOD_PORT_TYPE_VIBRATION`

This uses a vibration port as the bus in that case. I’m investigating on my end, but was curious if anyone has used this implementation and run into trouble. FMOD 2.02.21 and Unity 2022.3.24f1

---

<div class="post-metadata">

**Author:** ![JSMallard](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@JSMallard](https://qa.fmod.com/u/JSMallard)\
**Post date:** [May 17, 2024, 2:20am UTC](https://qa.fmod.com/t/unity-audio-fmod-audio-on-ps5/21567/4 "2024-05-17T02:20:46Z")

</div>

Disregard this! Some notes for anyone stumbling upon this.

The solution above does work! I did this by including the call in runtimemanager, but you can also use the callback handler here: [FMOD - Scripting Examples | Callback Handler](https://www.fmod.com/docs/2.02/unity/examples-callback-handler.html)

This error is pretty much benign.

`[FMOD] AudioOut_OpenPort : portIndex must not be FMOD_PORT_INDEX_NONE when portType is FMOD_PORT_TYPE_VIBRATION`

You will get this on init because this port does not exist on VR, but passing the correct id as a portindex with the flag as show in the port scripting examples will work.

We made this all work by running our unity audio clips through fmod as a programmer sound. Then sent that to the vibration port on PSVR. If you run into an issue, it’s more likely to be something in your code rather than anything in fmod api.
