Switching audio output device (esp. for VR)

We’re having problems with fmod using the correct audio output device with VR. A lot of times the headset connects after the start of the application, including in the editor.

fmod seems to not handle this at all, unlike the rest of the Unity audio, which works fine.

Is this as designed? I ask because it’s a big pain for VR, and it’d really be nice if it auto-switched like Unity.

What’s the suggested way to handle switching output devices?

1 Like

After some more testing, I’ve concluded that it doesn’t matter if you start the Oculus app and connect the headset first, before running the Unity editor. It seems like there’s some device hand-off that happens later anyway.

Any suggestions on how to set up an output device switch? Or is this a bug?

By default FMOD will use the system default output device.

The best way to change the output device that FMOD uses is:

Thanks for the info! If the system default output device switches while the app is running, does it update? If so, there seems to be a bug because it doesn’t update when the device switches.

This is currently the way FMOD works, only if the device list has changed (eg. device removed or added) will FMOD update it’s device list.

See this thread for more information:

We are planning to add this behavior in the next major release, as it requires internal behavior changes.

Hello, is there any news regarding this issue? I am also working on a VR proyect and it’s something really important for VR, both Oculus and SteamVR change the windows audio output to the headset when launching the game, and currently if you launch the game directly from Steam before opening SteamVR for example, the windows audio output is changed after the game finished launching so fmod ends up with the last output windows had.

This has been added in version 2.01.00:

  • Core API - Win - FMOD_OUTPUT_DEVICELISTCHANGED_CALLBACK now responds to default device changes.

Hi guys.
I’m in the same position, trying to set Oculus as my main audio device (they demand it to publish with them).
Where should we use the getNumDrivers, getDriverInfo & setDriver?
Right now we are putting some of this code on the “FMOD.RESULT Initialize()” inside of the RuntimeManager but we are experimenting some errors.

You can do it before init if you are wanting to force it to a particular driver.


If this function is called after System::init, the current driver will be shutdown and the newly selected driver will be initialized / started.

What errors are you gettings?