VAE - Virtual Audio Engine 1
Small Data Driven Audio Engine
vae Namespace Reference

Contains Typedefinitions and basic structures use by the public API and internally. More...

Namespaces

namespace  Config
 
namespace  core
 
namespace  StaticConfig
 Contains some fundamental Configuration needed at compile time Dynamic settings are contained in the EngineSettings struct above.
 

Classes

struct  DeviceInfo
 Basic struct describing a audio device. More...
 
struct  EngineConfig
 Settings for the engine defined at EnginePimpl::init. More...
 
class  EnginePimpl
 Sealed of version of vae::core::Engine. More...
 
struct  EventCallbackData
 Struct containing relevant data passed to EventCallback provided in the EngineConfig. More...
 
struct  LocationDirection
 Emitters have a position and direction vector. More...
 
struct  LocationOrientation
 Listener uses additional up vector. More...
 
struct  Vector3
 Public vae Vector 3 type. More...
 

Typedefs

using Sample = float
 Default sample types used where ever possible, changing this means the engine needs to be recompiled, short and int isn't working, probably needs a few changes in the pipeline. More...
 
using Size = unsigned int
 How the elements are addressed in the heapbuffer. More...
 
using Time = double
 Time sotred in seconds. More...
 
using SmallHandle = unsigned char
 
using GenericHandle = unsigned short
 
using LargeHandle = unsigned int
 
using BankHandle = SmallHandle
 
using EventHandle = GenericHandle
 The handle used to address events within a bank. More...
 
using SourceHandle = GenericHandle
 
using EmitterHandle = LargeHandle
 
using MixerHandle = SmallHandle
 
using ListenerHandle = SmallHandle
 
using GlobalEventHandle = LargeHandle
 Used to globally address events, holds space for BankHandle and EventHandle. More...
 
using GlobalMixerHandle = GenericHandle
 TODO. More...
 
using GlobalParameterHandle = LargeHandle
 TODO. More...
 
using EventCallback = void(*)(const EventCallbackData *)
 

Enumerations

enum class  Result {
  Success = 0 , GenericFailure , BankFormatError , BankFormatIndexError ,
  BankFormatDuplicateIndex , FileOpenError , VoiceStarvation , BankFormatBadMixHirarchy ,
  ElementNotFound , ValidHandleRequired , TooManyRecords , DeviceError ,
  DuplicateEmitter , InvalidBank , InvalidEmitter
}
 Return Types for most engine functions. More...
 
enum class  LogLevel {
  Debug = 0 , Info , Warn , Error ,
  Ciritical
}
 

Variables

constexpr GenericHandle InvalidHandle = ~0
 Since 0 is a valid handle, these are used to identify invalid ones. More...
 
constexpr EventHandle InvalidEventHandle = ~0
 
constexpr SourceHandle InvalidSourceHandle = ~0
 
constexpr BankHandle InvalidBankHandle = ~0
 
constexpr MixerHandle InvalidMixerHandle = ~0
 
constexpr ListenerHandle InvalidListenerHandle = ~0
 
constexpr ListenerHandle AllListeners = (~0) - 1
 Will address all listeners. More...
 
constexpr EmitterHandle InvalidEmitterHandle = ~0
 
constexpr GlobalEventHandle InvalidGlobalEventHandle = InvalidEventHandle | (InvalidBankHandle << (sizeof(EventHandle) * 8))
 

Detailed Description

Contains Typedefinitions and basic structures use by the public API and internally.

Forward these to tklb TODO find a better place for this.

The types used internally like handles or static settings can be changed, but vae::EnginePimpl needs to be recompiled.

Typedef Documentation

◆ BankHandle

using vae::BankHandle = typedef SmallHandle

Definition at line 40 of file vae.hpp.

◆ EmitterHandle

Definition at line 43 of file vae.hpp.

◆ EventCallback

using vae::EventCallback = typedef void(*)(const EventCallbackData*)

Definition at line 151 of file vae.hpp.

◆ EventHandle

The handle used to address events within a bank.

Definition at line 41 of file vae.hpp.

◆ GenericHandle

using vae::GenericHandle = typedef unsigned short

Definition at line 37 of file vae.hpp.

◆ GlobalEventHandle

Used to globally address events, holds space for BankHandle and EventHandle.

Definition at line 47 of file vae.hpp.

◆ GlobalMixerHandle

TODO.

Definition at line 48 of file vae.hpp.

◆ GlobalParameterHandle

TODO.

Definition at line 49 of file vae.hpp.

◆ LargeHandle

using vae::LargeHandle = typedef unsigned int

Definition at line 38 of file vae.hpp.

◆ ListenerHandle

Definition at line 45 of file vae.hpp.

◆ MixerHandle

using vae::MixerHandle = typedef SmallHandle

Definition at line 44 of file vae.hpp.

◆ Sample

using vae::Sample = typedef float

Default sample types used where ever possible, changing this means the engine needs to be recompiled, short and int isn't working, probably needs a few changes in the pipeline.

Definition at line 32 of file vae.hpp.

◆ Size

using vae::Size = typedef unsigned int

How the elements are addressed in the heapbuffer.

Definition at line 33 of file vae.hpp.

◆ SmallHandle

using vae::SmallHandle = typedef unsigned char

Definition at line 36 of file vae.hpp.

◆ SourceHandle

Definition at line 42 of file vae.hpp.

◆ Time

using vae::Time = typedef double

Time sotred in seconds.

Definition at line 34 of file vae.hpp.

Enumeration Type Documentation

◆ LogLevel

enum class vae::LogLevel
strong
Enumerator
Debug 
Info 
Warn 
Error 
Ciritical 

Definition at line 91 of file vae.hpp.

◆ Result

enum class vae::Result
strong

Return Types for most engine functions.

Enumerator
Success 

:)

GenericFailure 

:(

BankFormatError 

Generic bank loading error.

BankFormatIndexError 

A index is out of bounds.

BankFormatDuplicateIndex 

A index is used muktiple times.

FileOpenError 

File system could not load file.

VoiceStarvation 

Could not play sound because of voice limit.

BankFormatBadMixHirarchy 

A mixer can only write to mixers with lower ids than themselves (no recursion)

ElementNotFound 

Referenced data not found.

ValidHandleRequired 

Handle provided wasn't valid but needs to be.

TooManyRecords 

Can't fit all data in fixed size array.

DeviceError 

Can't open audio device.

DuplicateEmitter 

Trying to register emitter twice.

InvalidBank 

Valid bank handle needed.

InvalidEmitter 

Emitter probably wasn't registered.

Definition at line 73 of file vae.hpp.

73 {
74 Success = 0, ///< :)
75 GenericFailure, ///< :(
76 BankFormatError, ///< Generic bank loading error
77 BankFormatIndexError, ///< A index is out of bounds
78 BankFormatDuplicateIndex, ///< A index is used muktiple times
79 FileOpenError, ///< File system could not load file
80 VoiceStarvation, ///< Could not play sound because of voice limit
81 BankFormatBadMixHirarchy, ///< A mixer can only write to mixers with lower ids than themselves (no recursion)
82 ElementNotFound, ///< Referenced data not found
83 ValidHandleRequired, ///< Handle provided wasn't valid but needs to be
84 TooManyRecords, ///< Can't fit all data in fixed size array
85 DeviceError, ///< Can't open audio device
86 DuplicateEmitter, ///< Trying to register emitter twice
87 InvalidBank, ///< Valid bank handle needed
88 InvalidEmitter ///< Emitter probably wasn't registered
89 };
@ FileOpenError
File system could not load file.
@ BankFormatError
Generic bank loading error.
@ TooManyRecords
Can't fit all data in fixed size array.
@ InvalidBank
Valid bank handle needed.
@ InvalidEmitter
Emitter probably wasn't registered.
@ VoiceStarvation
Could not play sound because of voice limit.
@ ValidHandleRequired
Handle provided wasn't valid but needs to be.
@ ElementNotFound
Referenced data not found.
@ GenericFailure
:(
@ BankFormatDuplicateIndex
A index is used muktiple times.
@ BankFormatBadMixHirarchy
A mixer can only write to mixers with lower ids than themselves (no recursion)
@ DuplicateEmitter
Trying to register emitter twice.
@ DeviceError
Can't open audio device.
@ BankFormatIndexError
A index is out of bounds.

Variable Documentation

◆ AllListeners

constexpr ListenerHandle vae::AllListeners = (~0) - 1
constexpr

Will address all listeners.

Definition at line 60 of file vae.hpp.

◆ InvalidBankHandle

constexpr BankHandle vae::InvalidBankHandle = ~0
constexpr

Definition at line 57 of file vae.hpp.

◆ InvalidEmitterHandle

constexpr EmitterHandle vae::InvalidEmitterHandle = ~0
constexpr

Definition at line 61 of file vae.hpp.

◆ InvalidEventHandle

constexpr EventHandle vae::InvalidEventHandle = ~0
constexpr

Definition at line 55 of file vae.hpp.

◆ InvalidGlobalEventHandle

constexpr GlobalEventHandle vae::InvalidGlobalEventHandle = InvalidEventHandle | (InvalidBankHandle << (sizeof(EventHandle) * 8))
constexpr

Definition at line 62 of file vae.hpp.

◆ InvalidHandle

constexpr GenericHandle vae::InvalidHandle = ~0
constexpr

Since 0 is a valid handle, these are used to identify invalid ones.

Seems a little odd but means they can be used to direcly address array elements.

Definition at line 54 of file vae.hpp.

◆ InvalidListenerHandle

constexpr ListenerHandle vae::InvalidListenerHandle = ~0
constexpr

Definition at line 59 of file vae.hpp.

◆ InvalidMixerHandle

constexpr MixerHandle vae::InvalidMixerHandle = ~0
constexpr

Definition at line 58 of file vae.hpp.

◆ InvalidSourceHandle

constexpr SourceHandle vae::InvalidSourceHandle = ~0
constexpr

Definition at line 56 of file vae.hpp.