There's an Oculus VRC that requires audio to _always_ be outputted via the Rift headphones no mater what the Windows Output is set to (unless toggled by an in-app setting)
"App must target the audio device selected in the "Audio Output in VR" setting in the Oculus app."
I cant find any way to tell Wwise what device to use from inside Unity.
(this is cross posted from the oculus forum as I've not had any answers there either :( )
- Wwise 2017.2.0
- Unity Integration Bundle: 2017.2.0.947
- Unity 2017.3.0f3
- OVR Plugin 1.22
We're not using the OculusSpatializer plugin for wwise, but our audio director is happy with the way the game sounds and we successfully pass VRC.PC.Audio.2 (Audio specialization).
The only two pieces of relevant info I can find on the internet are in this post from January:
Feedback from our internal team:
"...it’s implemented under the hood and Unity automatically targets the Rift audio device. Unity redirects their audio to the Rift by default. If you use a third-party audio subsystem such as Wwise or FMOD, the latest version also does this. If you're using another audio system, they need to follow the guide [linked above]."
I'm not sure if "latest version" refers to Wwise, Unity or OVR, but everything we're using (afaik) is latest as of January this year.
and in this doc page:
Unity 5 and Wwise
To configure Wwise to use to configured audio device in Unity 5, pass the user-configured audio device name/GUID (set in the Oculus app) into the function AkSoundEngine.GetDeviceIDFromName(), located in AkInitializer.cs.
To get the audio device GUID from libOVR, you must include the Oculus Utilities unitypackage, which exposes that string through the class OVRManager.
The following function should be called before AkSoundEngine.Init(...):
But we're on Unity 2017, so the code snippet doesn't work, and (I think) shouldn't be necessary anymore.
Neither of these sources has helped get me closer to solving the problem. Since there's so little info around, and because Wwise say their tool has been used in hundreds of games, it feels like it must be something that's (usually) automatically handled but somehow we've missed a step of flicked a switch off somewhere that no-one else does.
If anyone has any info on how we can move on with this, or even how to debug it a bit more, it would be very gratefully received!
I updated everything (Unity, wwise, wwise-unity, oculus, ovrplatform) to the latest available version but still get the same behaviour.
I've also tried this in place of the code snippet from the docs:
string audioDevice = OVRManager.audioOutId;
uint audioOutId = AkSoundEngine.GetDeviceIDFromName(audioDevice);
initSettings.settingsMainOutput.idDevice = audioOutId;
(just dropped into akSoundEngineController.Init(...) at line 150).
This results in no sound output at all, but
is the only other accessible reference to a device id that I could find