Playing audio to different virtual devices on PS4

We have a game where we have one VR player and one screen player. We play different audio to the players. On Windows this is handled through playing each players’ sound on a different audio device, but how should this be done on PS4? The getNumDrivers function returns only one driver even though we have headphones connected to the VR-set and/or the gamepad.
What is the best way to achieve this?

The PS4 only has one output driver, other audio devices can be routed to using the FMOD port API. Audio devices include the controller, headsets, or other personal devices.

The FMOD PS4 API download has this in the Platform Specific Starter Guide of the documentation.

Thank you, I found the relevant section of the documentation but I have a hard time getting it to work. The docs says to switch to Audio3D output mode by calling System::setOutput before initializing, so in the RuntimeManager I added:
lowlevelSystem.setOutput(FMOD.OUTPUTTYPE.AUDIO3D);
right before the call to studioSystem.initialize, but if I do the initialization fails with the following error:

SystemNotInitializedException: FMOD Studio initialization failed : Calling initialize : ERR_PLUGIN : An unspecified error has been returned from a plugin.

Are you using any plugins? Possibly something that is conflicting with Audio3D?

setOutput returns an FMOD.RESULT which may help if that call is failing.

No, we are not using any plugins and anyway the error message comes from before those are loaded in the Unity integration (the error message says it is when calling initialize, which is the call to studioSystem.initialize - plugins are loaded right after that).
The FMOD.RESULT is part of the provided error message (ERR_PLUGIN)

Can you please send the logs through to support@fmod.com and I will look into this further for you.

I have same problem as you with using Oculus Quest.
Is there any solution for Oculus to change output driver?

I don’t think Oculus Quest has different audio outputs, which is probably why getNumDrivers only reports one. What driver are you trying to play audio through?

Do you meen “What kind of output device do you wanna use”?
I’m trying to use oculus’s standard speaker when connecting headphone through earphone jack.

You can iterate through the output devices to determine which is the correct device to use, see Oculus Setup scripting example.

I thought it is the script for oculus rift. Is it possible to use for oculus quest?

I don’t believe that the OVRManager.audioOutId is Oculus Rift specific, the API used is generic for Oculus devices (even though the variable is named “riftId” in the script).