Unity Audio + FMOD Audio on PS5

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!

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.

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

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

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.