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.

Changing the System output audio device in Unreal Engine (C++)

0 votes

I'm trying to write an audio core using Wwise which can emit sounds to specific audio devices on a windows System but can't find a simple way to set this in the UE4 integration. Is there an intended way to change the hardware audio device output of an event in the UE4 implementation?

In Wwise authoring, this is simple: you can go to Audio / Audio Preferences and set hardware devices for master buses. Assigning different events to those buses has them output from the desired audio device. However, when loaded and played in UE4, all events go to the system default audio device regardless of their bus. 

The SDK provides very straightforward ways of doing this (here's a guide:  https://www.audiokinetic.com/fr/library/edge/?source=SDK&id=integrating_secondary_outputs.html) using AddOutput ( https://www.audiokinetic.com/fr/library/edge/?source=SDK&id=namespace_a_k_1_1_sound_engine_a0ebeb52530b9871d9b66b5fa3bce192f.html ).

Unfortunately, despite UE4's implementation fully including the SDK and all of the .h / .cpp files, any direct calls to Ak :: SoundEngine crashes the engine. They warn here that the only script that can make those calls is AkAudio:  https://www.audiokinetic.com/fr/library/edge/?source=UE4&id=using_cpp.html .

There has to be some way in the UE4 implementation to do this, otherwise it really should be added as soon as possible. Without it I see two options for Unreal C ++ projects that require this:

- Extend the AkAudio script to work with UE4's objects and find a way to properly use AddOutput on their Listener equivalent. 

- Bypass the Implementation entirely, as if the project were a custom C ++ that can use the SDK. This has all sorts of issues with conflicting dependencies (mostly due to <windows.h> and <winnt.h>). Not to mention, that's complete overkill for something that can be done in a couple clicks and a drop-down inside of Wwise authoring. 

If extending AkAudio is the only way, some tips on how exactly to go about this would be great. I'm having trouble working out exactly how Wwise SDK Listeners are treated in the engine and where AddOutput could fit in.

asked Feb 27 in General Discussion by Angel R. (100 points)

Please sign-in or register to answer this question.

...