Unreal Engine 4 / VR - Initial Output Driver Name

Good evening,

Im developing a game under Unreal Engine 4 and for VR specifically.

It will work under SteamVR plugin making compatible with the Oculus Rift CV1 and HTC Vive.

My question is:

How can I setup FMOD to detect any of those connected headsets while VR Previewing or under packaged build? I have writen “Rift Audio” under “Initial Output Driver Name” and its working but only with Oculus Rift CV1 headset. It seems that only allows one device seted on it. Im looking to have the ability that Unreal Engine 4 detects automatically any of those connected headsets and work straight forward.

Any solution to this issue?

Thanks in advance.

Best regards.

By default, we will use the system default output device. You can manually override this in the FMOD UE4 settings, or you can set it at runtime which will allow you to detect multiple devices.
You will need to iterate through the list of devices to find the one you want to use, then set the driver to be the output. Something along the lines of:

int numDrivers = 0;
system->getNumDrivers(&numDrivers);

for (int i = 0; i < numDrivers; i++)
{
    char* name;
    result = system->getDriverInfo(0, name, 0, 0, 0, 0, 0);
    
    if (name.contains("Rift"))
    {
        system->setDriver(i);
    }
}

Hey Cameron, I’m experiencing a similar issue when submitting my vr game via the Oculus store. I’m using UE4 + FMOD. FMOD doesn’t know what the Rift audio settings are (either “Rift Headphones” or “use Windows Settings”)

How do I get FMOD to obey the Oculus Rift audio settings when the player can select between those two in the Oculus app?

See the top voted answer not this one.

Good day,

Thank you very much for the help.
I will try to test it and comment here if something doesnt go like expected.

Best regards.

The recommended way to detect the audio device is by following the guide at https://developer.oculus.com/documentation/pcsdk/latest/concepts/dg-vr-audio/
which uses the GUID of the device.

1 Like