utility 2026.1.9
A comprehensive C++ utilities library tailored for the development of modern desktop and extended reality (XR) applications.
Loading...
Searching...
No Matches
utility::sound::CommandData Union Reference

Payload associated with an AudioCommand. More...

#include <headers/utility/sound/audio_manager.hpp>

Public Attributes

math::Vector3F position
 New world-space position of the audio source.
 
float gain
 Gain multiplier applied to the source.
 
float pitch
 Playback pitch multiplier.
 
bool looping
 Indicates whether playback should loop.
 
ALuint bufferID
 OpenAL buffer identifier.
 

Detailed Description

Payload associated with an AudioCommand.

The active member depends on the value of AudioCommand::type.

The mapping is as follows:

  • AudioCommandType::SetPosition → position
  • AudioCommandType::SetGain → gain
  • AudioCommandType::SetPitch → pitch
  • AudioCommandType::SetLooping → looping
  • AudioCommandType::SetBuffer → bufferID

Commands that do not require additional data ignore this payload.

Definition at line 83 of file audio_manager.hpp.

Member Data Documentation

◆ bufferID

ALuint utility::sound::CommandData::bufferID

OpenAL buffer identifier.

Definition at line 107 of file audio_manager.hpp.

◆ gain

float utility::sound::CommandData::gain

Gain multiplier applied to the source.

Definition at line 92 of file audio_manager.hpp.

◆ looping

bool utility::sound::CommandData::looping

Indicates whether playback should loop.

Definition at line 102 of file audio_manager.hpp.

◆ pitch

float utility::sound::CommandData::pitch

Playback pitch multiplier.

Definition at line 97 of file audio_manager.hpp.

◆ position

math::Vector3F utility::sound::CommandData::position

New world-space position of the audio source.

Definition at line 87 of file audio_manager.hpp.


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