Open 3D Engine AudioEngineWwise Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Audio::AudioSourceManager Class Reference

#include <AudioSourceManager.h>

Public Member Functions

void Shutdown ()
 
bool CreateSource (const SAudioInputConfig &sourceConfig)
 
void ActivateSource (TAudioSourceId sourceId, AkPlayingID playingId)
 
void DeactivateSource (AkPlayingID playingId)
 
void DestroySource (TAudioSourceId sourceId)
 
AkPlayingID FindPlayingSource (TAudioSourceId sourceId)
 

Static Public Member Functions

static AudioSourceManagerGet ()
 
static void Initialize ()
 

Detailed Description

Manager class for AudioInputSource. Manages lifetime of AudioInputSource objects as they are created, activated, deactivated, and destroyed. The lifetime of an Audio Input Source: CreateSource (loads resources) ActivateSource (once you obtain a playing Id) (Running, callbacks being received, also async loading input if enabled) DeactivateSource (once it's determined to be done playing) DestroySource (unloads resources)

Member Function Documentation

◆ ActivateSource()

void Audio::AudioSourceManager::ActivateSource ( TAudioSourceId  sourceId,
AkPlayingID  playingId 
)

Activates an AudioInputSource. Moves a source from the inactive state to an active state by assigning an AkPlayingID.

Parameters
sourceIdID of the source (returned by CreateSource).
playingIdA playing ID of the source that is now playing in Wwise.

◆ CreateSource()

bool Audio::AudioSourceManager::CreateSource ( const SAudioInputConfig &  sourceConfig)

CreateSource a new AudioInputSource. Creates an AudioInputSource, based on the SAudioInputConfig and stores it in an inactive state.

Parameters
sourceConfigConfiguration of the AudioInputSource.
Returns
True if the source was created successfully, false otherwise.

◆ DeactivateSource()

void Audio::AudioSourceManager::DeactivateSource ( AkPlayingID  playingId)

Deactivates an AudioInputSource. Moves a source from the active state back to an inactive state, will happen when an end event callback is recieved.

Parameters
playingIdPlaying ID of the source that ended.

◆ DestroySource()

void Audio::AudioSourceManager::DestroySource ( TAudioSourceId  sourceId)

Destroy an AudioInputSource. Destroys an AudioInputSource from the manager when it is no longer needed.

Parameters
sourceIdSource ID of the object to remove.

◆ FindPlayingSource()

AkPlayingID Audio::AudioSourceManager::FindPlayingSource ( TAudioSourceId  sourceId)

Find the Playing ID of a source. Given a Source ID, check if there are sources in the active state and if so, return their Playing ID.

Parameters
sourceIdSource ID to look for in the active sources.

The documentation for this class was generated from the following file: