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: using AddOutput ( ).

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: .

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, 2020 in General Discussion by Angel R. (100 points)

1 Answer

0 votes

I've created an article about implementing secondary outputs in Unreal. I think, it could help!

answered Apr 29, 2020 by Ed K. (300 points)