Saga
Saga Game Engine
Loading...
Searching...
No Matches
Saga::AudioEmitter Struct Reference

Component for emitting sound events. More...

#include <audioEmitter.h>

Public Member Functions

 AudioEmitter ()
 Construct a new Audio Emitter object.
 
 AudioEmitter (std::string eventName, bool playOnAwake=false, bool preload=false)
 Construct a new Audio Emitter object.
 

Public Attributes

std::string eventName
 name of the event. Typically "event:/eventName".
 
bool playOnAwake
 whether this sound should play as soon as the gameworld is awoken.
 
bool preload
 whether we should preload the sample data for the sound so that playing it is instantaneous. Do not change this value throughout execution of the program.
 
AudioEventInstance audioInstance
 an event instance representing the sound. When the emitter is not playing any sound, this should be nullptr.
 
bool is3D
 determines if the sound event is 3D.
 

Detailed Description

Component for emitting sound events.

Constructor & Destructor Documentation

◆ AudioEmitter() [1/2]

Saga::AudioEmitter::AudioEmitter ( )

Construct a new Audio Emitter object.

◆ AudioEmitter() [2/2]

Saga::AudioEmitter::AudioEmitter ( std::string  eventName,
bool  playOnAwake = false,
bool  preload = false 
)

Construct a new Audio Emitter object.

Parameters
eventNamename of the event.
playOnAwakewhether the event should play on awake.
preloadwhether to preload sample data for the event.

Member Data Documentation

◆ audioInstance

AudioEventInstance Saga::AudioEmitter::audioInstance

an event instance representing the sound. When the emitter is not playing any sound, this should be nullptr.

◆ eventName

std::string Saga::AudioEmitter::eventName

name of the event. Typically "event:/eventName".

◆ is3D

bool Saga::AudioEmitter::is3D

determines if the sound event is 3D.

◆ playOnAwake

bool Saga::AudioEmitter::playOnAwake

whether this sound should play as soon as the gameworld is awoken.

◆ preload

bool Saga::AudioEmitter::preload

whether we should preload the sample data for the sound so that playing it is instantaneous. Do not change this value throughout execution of the program.


The documentation for this struct was generated from the following files: