VAE - Virtual Audio Engine 1
Small Data Driven Audio Engine
vae::core::Event Struct Reference

An Event is used to control most of the eingines behavior. More...

#include <vae_event.hpp>

Collaboration diagram for vae::core::Event:

Public Types

enum class  Action { start = 0 , stop , emit , random }
 

Public Member Functions

 Event ()
 TODO this isn't exactly pod style but the arrays need to be initialized properly since 0 is a valid event handle. More...
 

Public Attributes

enum vae::core::Event::Action action
 
bool force_mixer: 1
 Prevents overriding the mixer from chained events or fireEvent. More...
 
bool loop: 1
 gapless looping More...
 
bool HRTF: 1
 Listener and event has to have hrtf set. More...
 
bool spatial: 1
 no spatial rendering at all More...
 
bool attenuate: 1
 whether distance is taken into consideration More...
 
bool critical: 1
 wheather the voice can be killer More...
 
MixerHandle mixer = Mixer::MasterMixerHandle
 Mixer the source gets written to. More...
 
SourceHandle source = InvalidSourceHandle
 Handle to a source. More...
 
EventHandle id = InvalidEventHandle
 Own id. More...
 
Sample gain
 Volume applied to triggered voice. More...
 
EventHandle chained_events [StaticConfig::MaxChainedEvents]
 Events called when the source starts playing. More...
 
EventHandle on_end
 Event fired once the source is finished, not called when there's no source. More...
 
NameString name
 Name for debugging. More...
 

Detailed Description

An Event is used to control most of the eingines behavior.

Definition at line 14 of file vae_event.hpp.

Member Enumeration Documentation

◆ Action

enum class vae::core::Event::Action
strong
Enumerator
start 

Starts a source if defined and every Event in chained_events.

stop 

Stops a source if defined and stops every voice started from a event in chained_events.

emit 

Emits an event to the EventCallback defined in the engine config.

random 

triggers one random chained_events event

Definition at line 15 of file vae_event.hpp.

15 {
16 start = 0, ///< Starts a source if defined and every Event in chained_events
17 stop, ///< Stops a source if defined and stops every voice started from a event in chained_events
18 emit, ///< Emits an event to the EventCallback defined in the engine config
19 random ///< triggers one random chained_events event
20 } action : 3;
enum vae::core::Event::Action action

Constructor & Destructor Documentation

◆ Event()

vae::core::Event::Event ( )
inline

TODO this isn't exactly pod style but the arrays need to be initialized properly since 0 is a valid event handle.

Definition at line 40 of file vae_event.hpp.

40 {
41 force_mixer = false;
42 loop = false;
43 HRTF = false;
44 spatial = true;
45 attenuate = true;
46 critical = false;
47 gain = 1.0;
48 for (auto& i : chained_events) { i = InvalidEventHandle; }
50 }
constexpr EventHandle InvalidEventHandle
Definition: vae.hpp:55
bool loop
gapless looping
Definition: vae_event.hpp:22
EventHandle on_end
Event fired once the source is finished, not called when there's no source.
Definition: vae_event.hpp:33
Sample gain
Volume applied to triggered voice.
Definition: vae_event.hpp:31
bool attenuate
whether distance is taken into consideration
Definition: vae_event.hpp:25
bool force_mixer
Prevents overriding the mixer from chained events or fireEvent.
Definition: vae_event.hpp:21
bool HRTF
Listener and event has to have hrtf set.
Definition: vae_event.hpp:23
EventHandle chained_events[StaticConfig::MaxChainedEvents]
Events called when the source starts playing.
Definition: vae_event.hpp:32
bool critical
wheather the voice can be killer
Definition: vae_event.hpp:26
bool spatial
no spatial rendering at all
Definition: vae_event.hpp:24

Member Data Documentation

◆ action

enum vae::core::Event::Action vae::core::Event::action

◆ attenuate

bool vae::core::Event::attenuate

whether distance is taken into consideration

Definition at line 25 of file vae_event.hpp.

◆ chained_events

EventHandle vae::core::Event::chained_events[StaticConfig::MaxChainedEvents]

Events called when the source starts playing.

Definition at line 32 of file vae_event.hpp.

◆ critical

bool vae::core::Event::critical

wheather the voice can be killer

Definition at line 26 of file vae_event.hpp.

◆ force_mixer

bool vae::core::Event::force_mixer

Prevents overriding the mixer from chained events or fireEvent.

Definition at line 21 of file vae_event.hpp.

◆ gain

Sample vae::core::Event::gain

Volume applied to triggered voice.

Definition at line 31 of file vae_event.hpp.

◆ HRTF

bool vae::core::Event::HRTF

Listener and event has to have hrtf set.

Definition at line 23 of file vae_event.hpp.

◆ id

EventHandle vae::core::Event::id = InvalidEventHandle

Own id.

Definition at line 30 of file vae_event.hpp.

◆ loop

bool vae::core::Event::loop

gapless looping

Definition at line 22 of file vae_event.hpp.

◆ mixer

MixerHandle vae::core::Event::mixer = Mixer::MasterMixerHandle

Mixer the source gets written to.

Definition at line 28 of file vae_event.hpp.

◆ name

NameString vae::core::Event::name

Name for debugging.

Definition at line 34 of file vae_event.hpp.

◆ on_end

EventHandle vae::core::Event::on_end

Event fired once the source is finished, not called when there's no source.

Definition at line 33 of file vae_event.hpp.

◆ source

SourceHandle vae::core::Event::source = InvalidSourceHandle

Handle to a source.

Definition at line 29 of file vae_event.hpp.

◆ spatial

bool vae::core::Event::spatial

no spatial rendering at all

Definition at line 24 of file vae_event.hpp.


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