Making audio come out of both PC speakers as well as PS5 Controller (vibration/speaker) on Windows

Hi,
Just wanted to know if the PS5 Controller vibration system (advanced vibration) can be made to work on PC with the speakers.

I have set the controller’s scePadSetVibrationMode to advanced, and setting the audio device of the PC to PS5 Controller makes the advanced vibration feature work.

My question is how to make the audio come out of PC speakers as well as PS5 controller.
Any code example would be much appreciated and will be happy to provide more info regarding this.

Thanks!

It isn’t possible to output to two separate devices from the same FMOD system. The only solution would be to load two FMOD systems outputting to two separate devices, however this will require loading all events and samples twice.

Pretty please, do I understand it correctly that it is still not possible to play simultaneously audio from PC and vibrations from a PS/5 controller using a single instance of FMOD? Thanks!

It is possible to output on both a PS5 controller and your speakers by setting up Returns on the controller Ports and Sends on your Events in FMOD Studio. This goes for the PS5 controller speaker as well.
This screenshot shows returns on the Vibration and Speaker Ports, and the Weapons/Machine Gun event with a Send to the Vibration Return:


Now whenever the Weapons/Machine Gun event is played, audio will be sent both to the main output and the controller vibration output.

1 Like

Thank you for your response! Just to double-check, please: A combo [sounds out of a PC] + [vibrations out of a PS/5 controller] can be handled by a single instance of FMOD? Because some time ago Richard wrote:

Thanks!

One more question, related to this, please: The FMOD PS/5 documentation recommends the following structure of code to run the vibrations via the controller:

// Using Studio API
SceUserServiceUserId user0;
sceUserServiceGetInitialUser(&user0);

FMOD::Studio::Bus *con0;
system->getBus("port:/your_controller_port_name", &con0);

con0->setPortIndex(user0);

On PC, there is no sceUserServiceGetInitialUser. We don’t have any binaries of it. The only API we have is the Pad Library for PC Games 1.1 (ScePad). Where should we get appropriate the SceUserServiceUserId value? I can’t find any function which would do such a thing.

Thanks much!

I overlooked the “PC” part of your question. You cannot output to both your PC speakers and a PS5 controller on Windows without using 2 system objects. Apologies for the misinformation.

You will need to load the controller output plugin located in “C:\Program Files\FMOD SoundSystem\FMOD Studio {version}\plugins\fmod_output_controller.dll” using System::loadPlugin, and set the output to your plugin handle. You can then pass in FMOD_PORT_INDEX_NONE to Studio::Bus::setPortIndex, and any output ports setup in Studio will now output to the controller.

unsigned int handle;
result = system->loadPlugin("fmod_output_controller.dll", &handle);
ERRCHECK(result);
result = system->setOutputByPlugin(handle);
ERRCHECK(result);
result = bus->setPortIndex(FMOD_PORT_INDEX_NONE);
ERRCHECK(result);
1 Like

Thank you, Jeff, much appreciated!

Hello Jeff,

I am currently looking to integrate DualSense haptic feedback to our game on PC but I can’t find the dedicated dll fmod_output_controller.dll in the path you gave.

Is it still relevant or the method changed ?

Cheers

This was missing from the FMOD Studio install for a couple of versions. We put it back in for our latest release- please try installing FMOD Studio 2.02.16 and it should be in “C:\Program Files\FMOD SoundSystem\FMOD Studio 2.02.16\plugins\fmod_output_controller.dll”.
Please let me know if you run into any issues, and please keep in mind that use of the fmod_output_controller.dll outptut plugin will mean all audio gets routed to that.

Thanks for your quick reply, I found the dll in version 2.02.16.
But after running the bit of code you gave in earlier posts (loading the plugin, and setting the port Index) I ran into an error while setting the port Index to FMOD_PORT_INDEX_NONE

[TYPE]:         AudioDriverFModStudio.cpp(5787) : A command issued was not supported by this object.  Possibly a plugin without certain callbacks specified. (0)

Thanks

Getting FMOD_ERR_UNSUPPORTED from Bus::setPortIndex suggests the call was not made on a port. Can you please confirm that you are trying to set the port index on a port and not a group, return, vca etc? This sort of port setup for example:
image
Would require these calls:

FMOD::Studio::Bus* bus;
result = system->getBus("port:/Port", &bus);
ERRCHECK(result);
result = bus->setPortIndex(FMOD_PORT_INDEX_NONE);
ERRCHECK(result);
1 Like

Hi Jeff! I was looking for information on how to set up ports in FMOD to test some events with my DualSense for vibration and the speaker. The routing and port sends are the same as yours, but I can’t hear anything from the speaker on my DualSense (the vibration is working). For the Output Device, I selected the FMOD Controller Output, assuming it was the output that would make the DualSense work. Is there any configuration that might be incorrect, or do I need to take any additional steps to test the events with my controller?

It looks like FMOD Controller Output currently only supports vibration ports unfortunately. I have created a task to support controller speaker ports as well.

1 Like

Thank you very much for the response, Jeff, I’ll stay tuned for any updates!