arrow_right Table of Contents

Other Documentation

Wwise SDK 2021.1.8

◆ RegisterListener()

AKSOUNDENGINE_API AKRESULT AK::SpatialAudio::RegisterListener ( AkGameObjectID  in_gameObjectID )

Assign a game object as the Spatial Audio listener. There can be only one Spatial Audio listener registered at any given time; in_gameObjectID will replace any previously set Spatial Audio listener. The game object passed in must be registered by the client, at some point, for sound to be heard. It is not necessary to be registered at the time of calling this function. If not listener is explicitly registered to spatial audio, then a default listener (set via AK::SoundEngine::SetDefaultListeners()) is selected. If the are no default listeners, or there are more than one default listeners, then it is necessary to call RegisterListener() to specify which listener to use with Spatial Audio.

in_gameObjectID Game object ID