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

please expose AddSecondaryOutput() to Unity once again (for secondary outputs on Windows)

0 votes

Hello,

We use Wwise for prototyping multiplayer games on an 8-monitor, 8-controller, 8-soundcard PC. This obviates the need to write any network code. We use Wwise to generate spatialized audio output for each of the 8 players individually on Windows under Unity.

To this end, we wrote an effect plugin that sits at the end of the effect chain on the secondary bus. This plugin captures incoming audio, resamples it and sends it to a WASAPI device endpoint that is selected based on the output ID of the plugin instance. We create 8 secondary outputs, and each output is mapped to exactly one listener. We manage the mapping of game objects to listeners at the gameplay level to obtain the desired routing (e.g. environment sounds are spatialized and go to all listeners, UI sounds only go to the listener of the player navigating menus, etc.).

Getting this to work on Windows required us to make use of merge-to-main secondary outputs, since the other secondary output types are either not implemented on Windows or do not cause the secondary output signal path to be instantiated.

This worked fine in Wwise 2016. However, in 2017.1, likely owing to the significant change in the way listeners are handled, AddSecondaryOutput() is marked as "TODO" in the SWIG wrapper in AkAudioEngine.cs (perhaps because of the need to marshal the array of listeners across the unmanaged boundary?). Feature request: we would love for AddSecondaryOutput() to be exposed to Unity once more.

Moreover, though we are able to initialize the engine with the proper options to enable merge-to-main routing of secondary outputs ("initSettings.settingsMainOutput.outputHierarchy = AkBusHierarchyFlags.AkBusHierarchy_Primary | AkBusHierarchyFlags.AkBusHierarchy_Secondary;" in AkInitializer.cs), without AddSecondaryOutput(), we are unable to verify whether any of the remaining values in AkAudioOutputType allow us to instantiate secondary output paths on Windows. I suspect AkOutput_Plugin is what we want here along with a sink plugin, but documentation seems sparse. I had tried using a sink plugin for the secondary outputs close to a year ago but met with failure before switching to an effect plugin. Unfortunately I can't recall what the issue was. If you have any thoughts on this matter, please feel free to share them.

Thank you for hearing us out!

Cheers,

  -Frédéric

asked Dec 22, 2017 in Feature Requests by Frederic H. (140 points)

1 Answer

+1 vote
 
Best answer

Hello Frederic,

This feature was brought back in 2017.1.5 which was released last February.

It is also part of Wwise 2017.2 in case you choose to upgrade.

Hope this helps!

answered Mar 20, 2018 by Gen (Audiokinetic) (880 points)
selected Apr 3, 2018 by Frederic H.
Thank you Gen! I will try this out soon. Cheers! :D
...