Version

    Other Documentation

menu_open
Wwise SDK 2021.1.14
Spatial Audio

Introduction

The Spatial Audio module exposes a number of services related to spatial audio, notably to:

  • compute image sources for Reflect for a given geometry;
  • model sound propagation from Rooms and Portals by controlling 3D busses;
  • model sound propagation across geometry; and,
  • conveniently access the raw API of Wwise Reflect.

Under the hood, it:

  • controls 3D busses by managing game objects and their properties (positions, auxiliary sends, obstruction, and occlusion);
  • controls (multi-) positions and aux sends of spatial audio game objects;
  • runs geometric sound reflection, diffraction and transmission algorithms; and
  • packages data for Wwise Reflect.

It is an SDK component that works hand in hand with the Wwise sound engine, as shown in the following flowchart.

SpatialAudioFlow

Spatial Audio Services

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 Wwise Reflect, or to compute geometric diffraction. Spatial Audio also exposes helper functions for accessing the raw API of Wwise Reflect directly (Using Raw Image Sources).

API Setup

The Spatial Audio functions and definitions can be found in SDK/include/AK/SpatialAudio/Common/. Its main functions are exposed in namespace AK::SpatialAudio.

Initialization

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: Spatial Audio only supports one top-level listener.

Spatial Audio Emitters

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:

  • To enable room reverberation, the sound must have game-defined auxiliary sends enabled in the General Settings tab.
  • To enable reflection processing, the sound must have an early reflection bus assigned in the General Settings tab.
  • To enable diffraction and transmission processing, the sound must have the Enable Diffraction and Transmission box ticked in the Positioning tab.

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.

Warning: Spatial Audio does not support 3D Position automation. Only the game object's actual position is used to calculate propagation paths.

Termination

Spatial Audio is terminated automatically when the Wwise sound engine is terminated.

See also

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise