Wwise Authoring is currently not compatible with macOS Catalina. We recommend that you don't upgrade your operating system until further notice.

Community Q&A

Where Wwise users help each other out!

Audiokinetic's Community Q&A is the forum where Wwise users ask and answer questions within the Wwise community. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

Unity Integration | Oculus | Set WWise output device

0 votes
Hey there,

I'm running unity 2018.1.9f1, Oculus Utilities 1.27, WWise Unity Integration 2018.1.1.6727.1172, and WWise 2018.1.1. I'm struggling to change the WWise audio output from the default windows device to the Oculus chosen device. 
#if !OVRPLUGIN_UNSUPPORTED_PLATFORM
            string audioDevice = OVRManager.audioOutId;

            uint audioOutId = AkSoundEngine.GetDeviceIDFromName(audioDevice);

            ActivePlatformSettings.AkInitializationSettings.initSettings.settingsMainOutput.idDevice = audioOutId;
#endif

I've tried adding something along the lines of the above in the AkWwiseInitializationSettings.cs's InitializeSoundEngine function, before AkSoundEngine.Init gets called. However, it doesn't seem to work. 

Any tips? 

asked Oct 31, 2018 in General Discussion by Mike S. (240 points)

1 Answer

0 votes
 
Best answer
I ended up having to do something like this in the AkWwiseInitializationSettings.cs's InitializeSoundEngine function:
#if !OVRPLUGIN_UNSUPPORTED_PLATFORM
	    AkWindowsSettings akWindowsSettings = (AkWindowsSettings)(ActivePlatformSettings);
	    if (akWindowsSettings)
	    {
	        string audioDevice = OVRManager.audioOutId;
	        uint audioOutId = AkSoundEngine.GetDeviceIDFromName(audioDevice);
	        akWindowsSettings.UserSettings.m_MainOutputSettings.m_DeviceID = audioOutId;
        }
#endif
Additionally, I had to make sure OVRManager ran before AKInitialize in my script execution order.
And I noticed that AkSoundEngine.IsInitialized() was returning True, even if the sound engine wasn't initialized. So I had to do
if (AkSoundEngine.IsInitialized())
{
    AkSoundEngine.Term();
}
at the start of AkSoundEngineController.cs's Init method. 
answered Nov 1, 2018 by Mike S. (240 points)
selected Nov 2, 2018 by Mike S.
...