Wwise SDK 2022.1.1
The Spatial Audio module exposes a number of services related to spatial audio, notably to:
Under the hood, it:
It is an SDK component that works hand in hand with the Wwise sound engine, as shown in the following flowchart.
Spatial Audio exposes 3 categories of services, described in their respective chapter:
Rooms and Portals are a simple, high-level geometry abstraction used for modeling propagation of sound emitters located in other rooms. Geometry uses triangles directly to compute image sources for simulating dynamic early reflections with Reflect, or to compute geometric diffraction. Spatial Audio also exposes helper functions for accessing the raw API of Reflect directly (Using Raw Image Sources).
The Spatial Audio functions and definitions can be found in SDK/include/AK/SpatialAudio/Common/. Its main functions are exposed in namespace
Initialize Spatial Audio using AK::SpatialAudio::Init().
When using spatial audio, a single game object must be explicitly assigned as the Spatial Audio Listener. To do so, call AK::SpatialAudio::RegisterListener(), passing in the ID of the desired listener. The game object must also be registered and assigned as a listener in the sound engine. For more information on Listeners in the Sound Engine, refer to Integrating Listeners.
|Warning: At the moment, Spatial Audio only supports one top-level listener.|
A game object becomes a Spatial Audio Emitter when it plays a sound that has one or more settings relating to spatial audio enabled in the authoring tool:
The position of a game object, be it an emitter or a listener, is passed to the sound engine using AK::SoundEngine::SetPosition. Spatial Audio will retrieve the position information directly from the Sound Engine to determine the source position for reflection and diffraction processing.
Spatial Audio is terminated automatically when the Wwise sound engine is terminated.