VAE - Virtual Audio Engine 1
Small Data Driven Audio Engine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
vae::core::Engine Class Reference

Central class handling all outside communication. More...

#include <vae_engine.hpp>

Collaboration diagram for vae::core::Engine:

Public Member Functions

 Engine ()=default
 
 Engine (const Engine &)=delete
 Don't allow any kind of move of copy of the object. More...
 
 Engine (const Engine *)=delete
 
 Engine (Engine &&)=delete
 
Engineoperator= (const Engine &)=delete
 
Engineoperator= (Engine &&)=delete
 
 ~Engine ()
 
Result setMixerVolume (BankHandle bank, MixerHandle mixer, Sample volume)
 Set the Mixer Volume. More...
 
Result muteMixerEffect (BankHandle bank, MixerHandle mixer, Size index, bool mute)
 Bypass a effect in a mixer. More...
 
Result setMixerEffectParameter (BankHandle bank, MixerHandle mixer, Size index, Size param, Sample value)
 Set the Mixer Effect Parameter. More...
 
ListenerHandle _VAE_PUBLIC_API createListener ()
 Create a Listener object. More...
 
Result _VAE_PUBLIC_API removeListener (ListenerHandle listener)
 Unregister listener. More...
 
Result _VAE_PUBLIC_API setListener (ListenerHandle listener, const LocationOrientation &locOr)
 Set the position of a listener. More...
 
Result _VAE_PUBLIC_API loadHRTF (const char *path, Size size=0)
 
Engine Controls

Main engine functionality

Result _VAE_PUBLIC_API init (const EngineConfig &config={})
 Initializes the engine and does most of the upfront allocations. More...
 
Result _VAE_PUBLIC_API start ()
 Tries to open default device and start audio thread. More...
 
Result _VAE_PUBLIC_API stop ()
 Stops processing and waits for audio thead to clean up. More...
 
void _VAE_PUBLIC_API update ()
 Update function needs to be called regularly to handle outbound events and other housekeeping. More...
 
template<typename T >
void process (const SampleIndex frames, T *output, int channels)
 
Result _VAE_PUBLIC_API fireEvent (BankHandle bankHandle, EventHandle eventHandle, EmitterHandle emitterHandle, Sample gain=1.0, MixerHandle mixerHandle=InvalidMixerHandle, ListenerHandle listenerHandle=AllListeners)
 Main mechanism to start and stop sounds. More...
 
Result _VAE_PUBLIC_API fireGlobalEvent (GlobalEventHandle globalHandle, EmitterHandle emitterHandle, Sample gain=1.0, MixerHandle mixerHandle=InvalidMixerHandle, ListenerHandle listenerHandle=AllListeners)
 Works like fireEvent but with a global Event identifier. More...
 
Size _VAE_PUBLIC_API getActiveVoiceCount () const
 Get the number of currently playing Voices. More...
 
Size _VAE_PUBLIC_API getStreamTime () const
 
void _VAE_PUBLIC_API setMasterVolume (Sample volume)
 Set the global output volume before the limiter. More...
 
bool _VAE_PUBLIC_API checkVersion (int major, int minor, int patch)
 Check if the compiled version matches. More...
 
Emitter manipulation

Contains everything related to emitter creation and basic manipulation of voices started from them

EmitterHandle _VAE_PUBLIC_API createEmitter ()
 Creates an emitter and returns the handle. More...
 
EmitterHandle _VAE_PUBLIC_API createAutoEmitter (BankHandle bank, EventHandle event, float maxDist, const LocationDirection &locDir, float spread)
 Emitter which triggers an event once a listener is close enough. More...
 
Result _VAE_PUBLIC_API addEmitter (EmitterHandle h)
 Adds an emitter with a custom handle, can be an internal ID for example. More...
 
Result _VAE_PUBLIC_API removeEmitter (EmitterHandle h)
 Unregister a emiter an kill all its voices. More...
 
Result _VAE_PUBLIC_API setEmitter (EmitterHandle emitter, const LocationDirection &locDir, float spread)
 Set the Emitter position, orientation and spread. More...
 
Result _VAE_PUBLIC_API stopEmitter (EmitterHandle emitter)
 Stop all voices from emitter. More...
 
void _VAE_PUBLIC_API setVolume (EmitterHandle emitter, Sample gain)
 Sets the volume of all active voices with this emitter. More...
 
void _VAE_PUBLIC_API seek (EmitterHandle emitter, Size time)
 Set the current time of all voices with the emitter. More...
 
void _VAE_PUBLIC_API setSpeed (EmitterHandle emitter, float speed)
 Set the playback speed. More...
 
void _VAE_PUBLIC_API setLowpass (EmitterHandle emitter, float cutoff)
 Simple lowpass filter for the voices. More...
 
void _VAE_PUBLIC_API setHighpass (EmitterHandle emitter, float cutoff)
 Simple highpass filter for the voices. More...
 
Ressource Management

Everything related to Bank and other ressource loading/unloading

Result _VAE_PUBLIC_API loadBank (const char *path, Size size=0)
 Load bank from filesystem. More...
 
Result loadBank (Bank &bank)
 Load bank from memory. More...
 
Result addSource (BankHandle bankHandle, Source &source)
 Add or replace a source in a bank. More...
 
Result addEvent (BankHandle bankHandle, Event &event)
 Add or replace event in a bank Locks audio thread. More...
 
Result addMixer (BankHandle bankHandle, Mixer &mixer)
 
Result addBank (Bank &bank)
 
Result _VAE_PUBLIC_API unloadBankFromId (BankHandle bankHandle)
 Unload bank from handle. More...
 
void _VAE_PUBLIC_API unloadAllBanks ()
 Unload every bank and data associated with it. More...
 

Private Types

using Thread = std::thread
 
using ConditionVariable = std::condition_variable
 

Private Member Functions

void process ()
 Main processing function. More...
 
void onBufferSwap (Device *device)
 Called from audio device when it needs more audio. More...
 
void threadedProcess ()
 Called from own audio thread, not the device. More...
 
void onThreadedBufferSwap (Device *device)
 Called from audio device when using seperate audio thread. More...
 

Private Attributes

EngineConfig mConfig
 Config object provided at initlalization. More...
 
VoiceManger mVoiceManager
 Holds and handle voices. More...
 
SpatialManager mSpatialManager
 Holds and manages spatial emitters. More...
 
BankManager mBankManager
 Holds and manages banks. More...
 
Processor mProcessor
 Default Voice processor. More...
 
MixerProcessor mMixerProcessor
 Mixer channel processor. More...
 
SpatialProcessor mSpatialProcessor
 Spatial voice processor. More...
 
ScratchBuffer mScratchBuffer
 used to combine the signal from all banks and push it to the device More...
 
SampleIndex mTime = 0
 Global engine time in samples. More...
 
Time mTimeFract = 0
 Global engine time in seconds. More...
 
Sample mLimiterLastPeak = 1.0
 Master limiter last peak. More...
 
Sample mMasterVolume = 1.0
 Master Colume applied after limiting. More...
 
DevicemDevice = nullptr
 Output device. More...
 
ThreadmAudioThread
 Thread processing voices and mixers. More...
 
ConditionVariable mAudioConsumed
 Notifies the audio thread when more audio is needed. More...
 
std::mutex mMutex
 Mutex needed to use mAudioConsumed, doesn't actually do anything else. More...
 
bool mAudioThreadRunning = false
 

Detailed Description

Central class handling all outside communication.

Can be sealed off by using EnginePimpl instead

Definition at line 48 of file vae_engine.hpp.

Member Typedef Documentation

◆ ConditionVariable

using vae::core::Engine::ConditionVariable = std::condition_variable
private

Definition at line 71 of file vae_engine.hpp.

◆ Thread

using vae::core::Engine::Thread = std::thread
private

Definition at line 70 of file vae_engine.hpp.

Constructor & Destructor Documentation

◆ Engine() [1/4]

vae::core::Engine::Engine ( )
default

◆ Engine() [2/4]

vae::core::Engine::Engine ( const Engine )
delete

Don't allow any kind of move of copy of the object.

◆ Engine() [3/4]

vae::core::Engine::Engine ( const Engine )
delete

◆ Engine() [4/4]

vae::core::Engine::Engine ( Engine &&  )
delete

◆ ~Engine()

vae::core::Engine::~Engine ( )
inline

Definition at line 209 of file vae_engine.hpp.

209 {
210 VAE_PROFILER_SCOPE_NAMED("Destroy Engine")
211 stop();
213 VAE_INFO("Engine destructed")
214 }
Result _VAE_PUBLIC_API stop()
Stops processing and waits for audio thead to clean up.
Definition: vae_engine.hpp:286
void _VAE_PUBLIC_API unloadAllBanks()
Unload every bank and data associated with it.
Definition: vae_engine.hpp:845
#define VAE_INFO(msg,...)
Definition: vae_logger.hpp:84
#define VAE_PROFILER_SCOPE_NAMED(name)
Profiles a scope and names it.
Here is the call graph for this function:

Member Function Documentation

◆ addBank()

Result vae::core::Engine::addBank ( Bank bank)
inline

Definition at line 825 of file vae_engine.hpp.

825 {
826 return mBankManager.addBank(bank);
827 }
Result addBank(Bank &bank)
BankManager mBankManager
Holds and manages banks.
Definition: vae_engine.hpp:53
Here is the call graph for this function:

◆ addEmitter()

Result _VAE_PUBLIC_API vae::core::Engine::addEmitter ( EmitterHandle  h)
inline

Adds an emitter with a custom handle, can be an internal ID for example.

migt be desireable to make EmitterHandle the same size as a pointer so this can simply be the pointer of the entity that is associated with it.

Parameters
h
Returns
Result

Definition at line 598 of file vae_engine.hpp.

598 {
599 return mSpatialManager.addEmitter(h);
600 }
SpatialManager mSpatialManager
Holds and manages spatial emitters.
Definition: vae_engine.hpp:52
Result addEmitter(EmitterHandle e)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addEvent()

Result vae::core::Engine::addEvent ( BankHandle  bankHandle,
Event event 
)
inline

Add or replace event in a bank Locks audio thread.

Parameters
bankHandle
eventMoved and now owned by bank
Returns
Result

Definition at line 817 of file vae_engine.hpp.

817 {
818 return mBankManager.addEvent(bankHandle, event);
819 }
Result addEvent(BankHandle bankHandle, Event &event)
Here is the call graph for this function:

◆ addMixer()

Result vae::core::Engine::addMixer ( BankHandle  bankHandle,
Mixer mixer 
)
inline

Definition at line 821 of file vae_engine.hpp.

821 {
822 return mBankManager.addMixer(bankHandle, mixer);
823 }
Result addMixer(BankHandle bankHandle, Mixer &mixer)
Here is the call graph for this function:

◆ addSource()

Result vae::core::Engine::addSource ( BankHandle  bankHandle,
Source source 
)
inline

Add or replace a source in a bank.

Parameters
bankHandle
sourceMoved and now owned by bank
Returns
Result

Definition at line 806 of file vae_engine.hpp.

806 {
807 return mBankManager.addSource(bankHandle, source, mConfig.internalSampleRate);
808 }
Result addSource(BankHandle bankHandle, Source &source, int sampleRate)
EngineConfig mConfig
Config object provided at initlalization.
Definition: vae_engine.hpp:49
Size internalSampleRate
Samplerate requested from device.
Definition: vae.hpp:168
Here is the call graph for this function:

◆ checkVersion()

bool _VAE_PUBLIC_API vae::core::Engine::checkVersion ( int  major,
int  minor,
int  patch 
)
inline

Check if the compiled version matches.

Definition at line 550 of file vae_engine.hpp.

550 {
551 return
552 VAE_VERSION_MAJOR == major &&
553 VAE_VERSION_MINOR == minor &&
554 VAE_VERSION_PATCH == patch;
555 }
#define VAE_VERSION_MAJOR
Definition: vae.hpp:16
#define VAE_VERSION_MINOR
Definition: vae.hpp:17
#define VAE_VERSION_PATCH
Definition: vae.hpp:18
Here is the caller graph for this function:

◆ createAutoEmitter()

EmitterHandle _VAE_PUBLIC_API vae::core::Engine::createAutoEmitter ( BankHandle  bank,
EventHandle  event,
float  maxDist,
const LocationDirection locDir,
float  spread 
)
inline

Emitter which triggers an event once a listener is close enough.

Parameters
bank
event
maxDist
locDir
spread
Returns
EmitterHandle Handle like a normal emitter

Definition at line 584 of file vae_engine.hpp.

587 {
588 return mSpatialManager.createAutoEmitter(bank, event, maxDist, locDir, spread);
589 }
EmitterHandle createAutoEmitter(BankHandle bank, EventHandle event, float maxDist, const LocationDirection &locDir, Sample spread)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createEmitter()

EmitterHandle _VAE_PUBLIC_API vae::core::Engine::createEmitter ( )
inline

Creates an emitter and returns the handle.

Returns
EmitterHandle Random handle

Definition at line 570 of file vae_engine.hpp.

570 {
572 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createListener()

ListenerHandle _VAE_PUBLIC_API vae::core::Engine::createListener ( )
inline

Create a Listener object.

TODO make listener 0 implicit

Returns
ListenerHandle

Definition at line 742 of file vae_engine.hpp.

742 {
744 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fireEvent()

Result _VAE_PUBLIC_API vae::core::Engine::fireEvent ( BankHandle  bankHandle,
EventHandle  eventHandle,
EmitterHandle  emitterHandle,
Sample  gain = 1.0,
MixerHandle  mixerHandle = InvalidMixerHandle,
ListenerHandle  listenerHandle = AllListeners 
)
inline

Main mechanism to start and stop sounds.

See also
Event
Parameters
bankHandlebank id where the event is provided
eventHandleid of the event
emitterHandlehandle of the emitter, needed for spatial audio or controlling the voice
gainoptional volume factor
mixerHandleoptional id of mixer channel sound will be routed to, this will override the one set in the event
listenerHandleFor which listener this event will be adible for, default to all
Returns
Result

Definition at line 389 of file vae_engine.hpp.

395 {
397 if (emitterHandle != InvalidEmitterHandle && !mSpatialManager.hasEmitter(emitterHandle)) {
398 VAE_ERROR("No emitter %u registered", emitterHandle)
400 }
401
402 if (!mBankManager.has(bankHandle)) {
403 VAE_ERROR("Fired event %i on unloaded bank %i", eventHandle, bankHandle)
404 return Result::InvalidBank;
405 }
406
407 auto& bank = mBankManager.get(bankHandle);
408
409 if (bank.events.size() <= eventHandle) {
410 VAE_WARN("Fired missing event %i on bank %i", eventHandle, bankHandle)
412 }
413
414 auto& event = bank.events[eventHandle];
415
416 Result result;
417
418 if (event.action == Event::Action::start) {
419 if (event.source != InvalidSourceHandle) {
420 VAE_DEBUG_EVENT("Event %i:%i starts source %i", eventHandle, bankHandle, event.source)
421 // Has source attached
422 if (event.spatial) {
423 // Spatialized sounds will play for every listener
424 result = mSpatialManager.forListeners(listenerHandle, [&](Listener& l) {
425 return mVoiceManager.play(
426 event, bankHandle, gain, emitterHandle, l.id, mixerHandle
427 );
428 });
429 } else {
430 // non spatialized sounds just once
431 result = mVoiceManager.play(
432 event, bankHandle, gain, emitterHandle, listenerHandle, mixerHandle
433 );
434 }
435 }
436
437 // Fire all other chained events
438 for (auto& i : event.chained_events) {
439 if (i == InvalidEventHandle) { continue; }
440 VAE_DEBUG_EVENT("Event %i:%i starts chained event %i", eventHandle, bankHandle, i)
441 result = fireEvent(
442 bankHandle, i, emitterHandle, gain,
443 mixerHandle, listenerHandle
444 );
445 }
446
447 if (result != Result::Success) {
448 VAE_DEBUG_EVENT("Event %i:%i failed to start voices", eventHandle, bankHandle)
449 return result; // ! someting went wrong
450 }
451 }
452
453 else if (event.action == Event::Action::random) {
454 for (int index = rand() % StaticConfig::MaxChainedEvents; 0 <= index; index--) {
455 auto& i = event.chained_events[index];
456 if (i == InvalidEventHandle) { continue; }
457 VAE_DEBUG_EVENT("Event %i:%i starts random event %i", eventHandle, bankHandle, i)
458 result = fireEvent(
459 bankHandle, i, emitterHandle, gain,
460 mixerHandle, listenerHandle
461 );
462 break;
463 }
464 }
465
466 else if (event.action == Event::Action::stop) {
467 // TODO test stopping
468 if (event.source != InvalidSourceHandle) {
469 VAE_DEBUG_EVENT("Event %i:%i stops source %i", eventHandle, bankHandle, event.source)
470 mVoiceManager.stop(event.source, &Voice::source, emitterHandle);
471 }
472 for (auto& i : event.chained_events) {
473 if (i == InvalidEventHandle) { continue; }
474 // kill every voice started from these events
475 VAE_DEBUG_EVENT("Event %i:%i stops voices from event %i", eventHandle, bankHandle, i)
476 mVoiceManager.stop(i, &Voice::event, emitterHandle);
477 }
478 if (event.mixer != Mixer::MasterMixerHandle) {
479 // kill every voice in a mixer channel
480 VAE_DEBUG_EVENT("Event %i:%i stops voices in mixer %i", eventHandle, bankHandle, event.mixer)
481 mVoiceManager.stop(event.mixer, &Voice::mixer, emitterHandle);
482 }
483 }
484
485 else if (event.action == Event::Action::emit) {
486 VAE_DEBUG_EVENT("Event %i:%i emits event", eventHandle, bankHandle)
487 if (mConfig.eventCallback != nullptr) {
488 EventCallbackData data;
489 constexpr int as = sizeof(data);
490 data.context = mConfig.eventCallbackContext;
491 data.bank = bankHandle;
492 data.event = eventHandle;
493 data.emitter = emitterHandle;
494 mConfig.eventCallback(&data);
495 }
496 }
497
498 return Result::Success;
499 }
Bank & get(BankHandle bank)
bool has(BankHandle bank)
Result _VAE_PUBLIC_API fireEvent(BankHandle bankHandle, EventHandle eventHandle, EmitterHandle emitterHandle, Sample gain=1.0, MixerHandle mixerHandle=InvalidMixerHandle, ListenerHandle listenerHandle=AllListeners)
Main mechanism to start and stop sounds.
Definition: vae_engine.hpp:389
VoiceManger mVoiceManager
Holds and handle voices.
Definition: vae_engine.hpp:51
Result forListeners(ListenerHandle handle, const Func &&func)
Result stop(Voice &v)
Stops a voice.
Result play(Event &event, const BankHandle bank, const Sample gain, const EmitterHandle emitter, const ListenerHandle listener, const MixerHandle mixer)
else() add_library(tklb STATIC $
constexpr Size MaxChainedEvents
How many chained events can fit in chain_events on the core::Event structure.
Definition: vae.hpp:302
constexpr EmitterHandle InvalidEmitterHandle
Definition: vae.hpp:61
constexpr SourceHandle InvalidSourceHandle
Definition: vae.hpp:56
constexpr EventHandle InvalidEventHandle
Definition: vae.hpp:55
Result
Return Types for most engine functions.
Definition: vae.hpp:73
@ InvalidBank
Valid bank handle needed.
@ InvalidEmitter
Emitter probably wasn't registered.
@ ValidHandleRequired
Handle provided wasn't valid but needs to be.
void * eventCallbackContext
Custom data that can be accached to the EventCallback to maintain context.
Definition: vae.hpp:180
EventCallback eventCallback
Each time a event of the type emit gets triggered Used to get information about ending sounds and sim...
Definition: vae.hpp:174
@ random
triggers one random chained_events event
@ 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.
static constexpr MixerHandle MasterMixerHandle
This is the master mixer for a bank.
Definition: vae_mixer.hpp:13
EventHandle event
Which event triggered the voice to be played.
Definition: vae_voice.hpp:29
#define VAE_ERROR(msg,...)
Definition: vae_logger.hpp:80
#define VAE_WARN(msg,...)
Definition: vae_logger.hpp:85
#define VAE_DEBUG_EVENT(msg,...)
Definition: vae_logger.hpp:96
#define VAE_PROFILER_SCOPE()
Profiles a scope.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fireGlobalEvent()

Result _VAE_PUBLIC_API vae::core::Engine::fireGlobalEvent ( GlobalEventHandle  globalHandle,
EmitterHandle  emitterHandle,
Sample  gain = 1.0,
MixerHandle  mixerHandle = InvalidMixerHandle,
ListenerHandle  listenerHandle = AllListeners 
)
inline

Works like fireEvent but with a global Event identifier.

See also
fireEvent
Parameters
globalHandleThe GlobalEventHandle combines both bank and event id
emitterHandleoptional handle of the emitter, needed for spatial audio
gainoptional volume factor
mixerHandleid of mixer channel sound will be routed to, this will override the one set in the event
Returns
Result

Definition at line 510 of file vae_engine.hpp.

516 {
517 BankHandle bankHandle;
518 EventHandle eventHandle;
519 splitGlobalEventHandle(globalHandle, bankHandle, eventHandle);
520 return fireEvent(
521 bankHandle, eventHandle, emitterHandle,
522 gain, mixerHandle, listenerHandle
523 );
524 }
constexpr void splitGlobalEventHandle(const GlobalEventHandle &handle, BankHandle &bank, EventHandle &event)
Definition: vae_util.hpp:18
SmallHandle BankHandle
Definition: vae.hpp:40
GenericHandle EventHandle
The handle used to address events within a bank.
Definition: vae.hpp:41
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getActiveVoiceCount()

Size _VAE_PUBLIC_API vae::core::Engine::getActiveVoiceCount ( ) const
inline

Get the number of currently playing Voices.

Definition at line 529 of file vae_engine.hpp.

529 {
531 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getStreamTime()

Size _VAE_PUBLIC_API vae::core::Engine::getStreamTime ( ) const
inline

Definition at line 533 of file vae_engine.hpp.

533 {
534 return mTime;
535 }
SampleIndex mTime
Global engine time in samples.
Definition: vae_engine.hpp:60

◆ init()

Result _VAE_PUBLIC_API vae::core::Engine::init ( const EngineConfig config = {})
inline

Initializes the engine and does most of the upfront allocations.

Run this before start !

Everything will be allocated according to the provided config. Loading a Bank will still cause an allocation. If there are already banks loaded, they will be reloaded to have the correct samplerate.

See also
start
Parameters
configOptional config to setup the internals.
Returns
Result

Definition at line 230 of file vae_engine.hpp.

230 {}) {
231 VAE_PROFILER_SCOPE_NAMED("Engine init")
232 VAE_DEBUG("Initializing engine...")
233 mConfig = config;
234 mScratchBuffer.resize(StaticConfig::MaxBlock, StaticConfig::MaxChannels);
236 mScratchBuffer.sampleRate = mConfig.internalSampleRate;
238 mSpatialManager.init(mConfig.preAllocatedEmitters);
241 mBankManager.init(mConfig.rootPath, mConfig.internalSampleRate);
242 VAE_DEBUG("Engine initialized")
243 return Result::Success;
244 }
SpatialProcessor mSpatialProcessor
Spatial voice processor.
Definition: vae_engine.hpp:57
ScratchBuffer mScratchBuffer
used to combine the signal from all banks and push it to the device
Definition: vae_engine.hpp:59
Result _VAE_PUBLIC_API init(const EngineConfig &config={})
Initializes the engine and does most of the upfront allocations.
Definition: vae_engine.hpp:230
MixerProcessor mMixerProcessor
Mixer channel processor.
Definition: vae_engine.hpp:56
static void set(void *dst, const unsigned char val, size_t size)
memset wrapper
Definition: TMemoryUtil.hpp:40
constexpr Size MaxBlock
Maximum block size.
Definition: vae.hpp:276
constexpr unsigned char MaxChannels
Maximum channel count used to pre allocate buffers.
Definition: vae.hpp:268
#define VAE_DEBUG(msg,...)
Definition: vae_logger.hpp:83
Here is the caller graph for this function:

◆ loadBank() [1/2]

Result vae::core::Engine::loadBank ( Bank bank)
inline

Load bank from memory.

See also
loadBank
Parameters
bankMoved and now owned by the engine
Returns
Result

Definition at line 796 of file vae_engine.hpp.

796 {
798 }
Result load(const char *path, Size size, const char *rootPath, int sampleRate)
Here is the call graph for this function:

◆ loadBank() [2/2]

Result _VAE_PUBLIC_API vae::core::Engine::loadBank ( const char *  path,
Size  size = 0 
)
inline

Load bank from filesystem.

This operation might take a little time but won't lock the audio thread until the bank is inserted. This should be safe to do at any time.

Parameters
path
Returns
Result

Definition at line 786 of file vae_engine.hpp.

786 {
788 }
const char * rootPath
Path where the bank files are located, needs to end with a trailing /.
Definition: vae.hpp:161
Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadHRTF()

Result _VAE_PUBLIC_API vae::core::Engine::loadHRTF ( const char *  path,
Size  size = 0 
)
inline

Definition at line 763 of file vae_engine.hpp.

763 {
765 path, size, mConfig.rootPath,
767 );
768 }
Result loadHRTF(const char *path, Size length, const char *rootPath, Size sampleRate)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ muteMixerEffect()

Result vae::core::Engine::muteMixerEffect ( BankHandle  bank,
MixerHandle  mixer,
Size  index,
bool  mute 
)
inline

Bypass a effect in a mixer.

Parameters
bank
mixer
indexSee setMixerEffectParameter
mute
Returns
Result

Definition at line 704 of file vae_engine.hpp.

704 {
705 mBankManager.get(bank).mixers[mixer].effects[index].bypassed = mute;
706 return Result::Success;
707 }
HeapBuffer< Mixer > mixers
Audio Mixers which can have effects ! is presorted !
Definition: vae_bank.hpp:16
Here is the call graph for this function:

◆ onBufferSwap()

void vae::core::Engine::onBufferSwap ( Device device)
inlineprivate

Called from audio device when it needs more audio.

This will do synchronous processing.

Parameters
device

Definition at line 163 of file vae_engine.hpp.

163 {
164 (void) device;
165 process();
166 }
void process()
Main processing function.
Definition: vae_engine.hpp:86
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onThreadedBufferSwap()

void vae::core::Engine::onThreadedBufferSwap ( Device device)
inlineprivate

Called from audio device when using seperate audio thread.

This will only notify the adio thread to do work.

Parameters
device

Definition at line 189 of file vae_engine.hpp.

189 {
190 (void) device;
191 mAudioConsumed.notify_one();
192 }
ConditionVariable mAudioConsumed
Notifies the audio thread when more audio is needed.
Definition: vae_engine.hpp:73
Here is the caller graph for this function:

◆ operator=() [1/2]

Engine & vae::core::Engine::operator= ( const Engine )
delete

◆ operator=() [2/2]

Engine & vae::core::Engine::operator= ( Engine &&  )
delete

◆ process() [1/2]

void vae::core::Engine::process ( )
inlineprivate

Main processing function.

Called either from onBufferSwap or threadedProcess This does't need to be locked since it only renders the banks. The data accessed from this class will only be used from this thread. The bank however needs to be locks which happens in the bankmanager

Definition at line 86 of file vae_engine.hpp.

86 {
88 VAE_PROFILER_SCOPE_NAMED("Engine Process")
89 auto& d = *mDevice;
90 auto sampleRate = mConfig.internalSampleRate;
91
92 const Time step = 1.0 / Time(sampleRate);
93
94 // process until device can't take any more audio
95 while (true) {
96 // ! this is an underestimate when resampling so we don't have any leftovers
97 auto remaining = d.canPush();
98
99 static_assert(32 <= StaticConfig::MaxBlock, "MaxBlock needs to be larger");
100
101 if (remaining < 32) {
102 break; // ! Don't even bother with small blocks, we'll get em next time
103 }
104
105 // clamp to max processable size, the preallocated scratch buffers can't take any larger blocks
106 remaining = std::min(remaining, StaticConfig::MaxBlock);
107
108 mScratchBuffer.setValidSize(remaining);
109
110 Size renderedNormal = 0;
111 Size renderedSpatial = 0;
112 // TODO PERF VAE banks could be processed in parallel
113 // however each bank needs to get a temporary own copy of the voice
114 // or else this will be false sharing city
115 mBankManager.forEach([&](Bank& i) {
116 renderedNormal += mProcessor.mix(mVoiceManager, i, remaining, sampleRate);
117 renderedSpatial += mSpatialProcessor.mix(
118 mVoiceManager, i, mSpatialManager, remaining, sampleRate
119 );
120 mMixerProcessor.mix(mVoiceManager, i, remaining);
121 auto& bankMaster = i.mixers[Mixer::MasterMixerHandle].buffer;
122 mScratchBuffer.add(bankMaster);
123 bankMaster.set(0);
124 });
125
126 VAE_PROFILER_PLOT("Rendered Normal Voices", int64_t(renderedNormal));
127 VAE_PROFILER_PLOT("Rendered Spatial Voices", int64_t(renderedSpatial));
128 VAE_PROFILER_PLOT("Rendered Total Voices", int64_t(renderedSpatial + renderedNormal));
129
130 {
131 VAE_PROFILER_SCOPE_NAMED("Peak limiting")
132 // Shitty peak limiter
133 mLimiterLastPeak *= Sample(0.99); // return to normal slowly
135 Sample currentPeak = 0;
136 for (Uchar c = 0; c < mScratchBuffer.channels(); c++) {
137 for (Size i = 0; i < remaining; i++) {
138 currentPeak = std::max(currentPeak, mScratchBuffer[c][i]);
139 }
140 }
141 currentPeak *= mMasterVolume; // pretend we already applied the master volume
143 mLimiterLastPeak += Sample(0.05); // add a little extra so we really stay away from clipping
144 }
145 const Sample gain = mMasterVolume / mLimiterLastPeak; // this can be higher than 1 one but the result can't
146 VAE_PROFILER_PLOT("Limited Master Volume", int64_t(gain * 1000));
147 mScratchBuffer.multiply(gain); // apply the master volume and limiter
148 d.push(mScratchBuffer);
150 mTime += remaining;
151 mTimeFract += step * remaining;
152 }
155 if (mConfig.updateInAudioThread) { update(); }
156 }
void multiply(const AudioBufferTpl< T2, STORAGE2 > &buffer, Size length=0, Size offsetSrc=0, Size offsetDst=0)
Multiply two buffers.
void add(const AudioBufferTpl< T2, STORAGE2 > &buffer, Size length=0, Size offsetSrc=0, Size offsetDst=0)
Add the provided buffer.
void setValidSize(const Size v)
Set the amount of valid samples currently in the buffer This is mostly a convenience flag since the a...
void set(const T2 *samples, Size length, const uchar channel=0, const Size offsetDst=0)
Set a single channel from an array.
void forEach(const Func &&func)
Iterate all loaded banks.
Processor mProcessor
Default Voice processor.
Definition: vae_engine.hpp:55
Sample mMasterVolume
Master Colume applied after limiting.
Definition: vae_engine.hpp:63
Sample mLimiterLastPeak
Master limiter last peak.
Definition: vae_engine.hpp:62
Time mTimeFract
Global engine time in seconds.
Definition: vae_engine.hpp:61
void _VAE_PUBLIC_API update()
Update function needs to be called regularly to handle outbound events and other housekeeping.
Definition: vae_engine.hpp:317
Device * mDevice
Output device.
Definition: vae_engine.hpp:66
void mix(VoiceManger &manager, Bank &bank, SampleIndex frames)
Process the mixers for a single bank.
Size mix(VoiceManger &manager, Bank &bank, SampleIndex frames, Size sampleRate)
Process a single bank.
Size mix(VoiceManger &manager, Bank &bank, SpatialManager &spatial, SampleIndex frames, Size sampleRate)
Process a single bank.
const double step
Definition: main.cpp:20
T min(const T &v1, const T &v2)
Definition: TMath.hpp:16
T max(const T &v1, const T &v2)
Definition: TMath.hpp:21
const char *const audioFrame
Definition: vae_profiler.hpp:5
unsigned char Uchar
Definition: vae_types.hpp:45
unsigned int Size
How the elements are addressed in the heapbuffer.
Definition: vae.hpp:33
float Sample
Default sample types used where ever possible, changing this means the engine needs to be recompiled,...
Definition: vae.hpp:32
double Time
Time sotred in seconds.
Definition: vae.hpp:34
#define VAE_PROFILER_FRAME_MARK_START(name)
Starts a named frame, uses const defined above to maintain the same pointer.
#define VAE_PROFILER_FRAME_MARK_END(name)
Stops a named frame.
#define VAE_PROFILER_PLOT(name, value)
Records a value.
#define VAE_PROFILER_FRAME_MARK()
Marks a frame to calculate FPS, not really needed for audio.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ process() [2/2]

template<typename T >
void vae::core::Engine::process ( const SampleIndex  frames,
T *  output,
int  channels 
)
inline

Definition at line 348 of file vae_engine.hpp.

348 {
349 SampleIndex time = 0;
350 while (time < frames) {
351 // clamp to max processable size, the preallocated scratch buffers can't take any larger blocks
352 SampleIndex remaining = std::min(remaining, StaticConfig::MaxBlock);
353
354 mScratchBuffer.setValidSize(remaining);
355
356 // however each bank needs to get a temporary own copy of the voice
357 // or else this will be false sharing city
358 mBankManager.forEach([&](Bank& i) {
362 );
363 mMixerProcessor.mix(mVoiceManager, i, remaining);
364 auto& bankMaster = i.mixers[Mixer::MasterMixerHandle].buffer;
365 mScratchBuffer.add(bankMaster);
366 bankMaster.set(0);
367 });
368
370 mScratchBuffer.putInterleaved(output + time * channels, remaining);
372 mTime += remaining;
373 time += remaining;
374 }
375 }
Size putInterleaved(T2 *buffer, Size length=0, const Size offset=0) const
Puts the interleaved contents in the target buffer.
AudioBuffer::Size SampleIndex
Definition: vae_types.hpp:87
Here is the call graph for this function:

◆ removeEmitter()

Result _VAE_PUBLIC_API vae::core::Engine::removeEmitter ( EmitterHandle  h)
inline

Unregister a emiter an kill all its voices.

Parameters
h
Returns
Result

Definition at line 607 of file vae_engine.hpp.

607 {
610 }
Result removeEmitter(EmitterHandle e)
EmitterHandle emitter
Emitter used to control voice properties.
Definition: vae_voice.hpp:30
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeListener()

Result _VAE_PUBLIC_API vae::core::Engine::removeListener ( ListenerHandle  listener)
inline

Unregister listener.

Parameters
listener

Definition at line 750 of file vae_engine.hpp.

750 {
751 return mSpatialManager.removeListener(listener);
752 }
Result removeListener(ListenerHandle listener)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ seek()

void _VAE_PUBLIC_API vae::core::Engine::seek ( EmitterHandle  emitter,
Size  time 
)
inline

Set the current time of all voices with the emitter.

Parameters
emitter
timeTime in samples

Definition at line 648 of file vae_engine.hpp.

648 {
650 }
void setVoiceProperty(EmitterHandle emitter, T Voice::*member, const T &value)
SampleIndex time
Current time in samples.
Definition: vae_voice.hpp:34
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setEmitter()

Result _VAE_PUBLIC_API vae::core::Engine::setEmitter ( EmitterHandle  emitter,
const LocationDirection locDir,
float  spread 
)
inline

Set the Emitter position, orientation and spread.

Parameters
emitterThe emitter
locDirThe desired location
spreadThe width of the panning (if it's spatial and not HRTF)
Returns
Result

Definition at line 619 of file vae_engine.hpp.

621 {
622 return mSpatialManager.setEmitter(emitter, locDir, spread);
623 }
Result setEmitter(EmitterHandle emitter, const LocationDirection &locDir, Sample spread)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setHighpass()

void _VAE_PUBLIC_API vae::core::Engine::setHighpass ( EmitterHandle  emitter,
float  cutoff 
)
inline

Simple highpass filter for the voices.

Parameters
emitter
cutoff0-1. 0 doesn't filter, 1 filter the wholespektrum

Definition at line 675 of file vae_engine.hpp.

675 {
677 }
Real highpass
Highpasses the signal as the value approaches 1.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setListener()

Result _VAE_PUBLIC_API vae::core::Engine::setListener ( ListenerHandle  listener,
const LocationOrientation locOr 
)
inline

Set the position of a listener.

Parameters
listener
Returns
Result

Definition at line 759 of file vae_engine.hpp.

759 {
760 return mSpatialManager.setListener(listener, locOr);
761 }
Result setListener(ListenerHandle listener, const LocationOrientation &locOr)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setLowpass()

void _VAE_PUBLIC_API vae::core::Engine::setLowpass ( EmitterHandle  emitter,
float  cutoff 
)
inline

Simple lowpass filter for the voices.

Parameters
emitter
cutoff0-1. 0 doesn't filter, 1 filter the wholespektrum

Definition at line 666 of file vae_engine.hpp.

666 {
668 }
Real lowpass
Lowpasses the signal as the value approaches 1.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMasterVolume()

void _VAE_PUBLIC_API vae::core::Engine::setMasterVolume ( Sample  volume)
inline

Set the global output volume before the limiter.

The engine can't clip, but if the output is too load the signal will be squashed in the limiter.

Parameters
volume1.0 is the default, not interpolated for now

Definition at line 543 of file vae_engine.hpp.

543 {
544 mMasterVolume = volume;
545 }
Here is the caller graph for this function:

◆ setMixerEffectParameter()

Result vae::core::Engine::setMixerEffectParameter ( BankHandle  bank,
MixerHandle  mixer,
Size  index,
Size  param,
Sample  value 
)
inline

Set the Mixer Effect Parameter.

Parameters
bank
mixer
indexwhich effects slot out of StaticConfig::MaxMixerEffects
paramwhich param by index out of StaticConfig::MaxEffectsParameter
valuevalue of the parameter from 0 to 1
Returns
Result

Definition at line 719 of file vae_engine.hpp.

719 {
720 VAE_PROFILER_SCOPE_NAMED("Set Mixer Effect");
721 // TODO this is garbage but needs a event queue anyways
722 auto& b = mBankManager.get(bank);
723 auto& m = b.mixers[mixer];
724 auto& e = m.effects[index];
725 auto& p = e.parameters[param];
726 p.value = value;
727 return Result::Success;
728 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMixerVolume()

Result vae::core::Engine::setMixerVolume ( BankHandle  bank,
MixerHandle  mixer,
Sample  volume 
)
inline

Set the Mixer Volume.

Parameters
bank
mixer
volume
Returns
Result

Definition at line 690 of file vae_engine.hpp.

690 {
691 mBankManager.get(bank).mixers[mixer].gain = volume;
692 return Result::Success;
693 }
Here is the call graph for this function:

◆ setSpeed()

void _VAE_PUBLIC_API vae::core::Engine::setSpeed ( EmitterHandle  emitter,
float  speed 
)
inline

Set the playback speed.

Parameters
emitter
speed1.0 is the default speed, pitch will be affected as well.

Definition at line 657 of file vae_engine.hpp.

657 {
659 }
Real speed
Playback speed, will alter pitch.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setVolume()

void _VAE_PUBLIC_API vae::core::Engine::setVolume ( EmitterHandle  emitter,
Sample  gain 
)
inline

Sets the volume of all active voices with this emitter.

Parameters
emitter
gain

Definition at line 639 of file vae_engine.hpp.

639 {
641 }
Sample gain
Volume of the voice.
Definition: vae_voice.hpp:33
Here is the call graph for this function:
Here is the caller graph for this function:

◆ start()

Result _VAE_PUBLIC_API vae::core::Engine::start ( )
inline

Tries to open default device and start audio thread.

Call this after start.

See also
init
Returns
Result

Definition at line 251 of file vae_engine.hpp.

251 {
252 #ifndef VAE_NO_AUDIO_DEVICE
253 VEA_PROFILER_THREAD_NAME("Application Thread")
255 {
256 VAE_PROFILER_SCOPE_NAMED("Device Instance")
257 Backend& backend = DefaultBackend::instance();
258 mDevice = backend.createDevice(mConfig);
259 }
260 if (mConfig.processInBufferSwitch) {
262 VAE_DEBUG("Mixing in buffer switch")
263 } else {
264 #ifndef VAE_NO_AUDIO_THREAD
266 mAudioThreadRunning = true;
267 VAE_PROFILER_SCOPE_NAMED("Start audio thread")
269 VAE_DEBUG("Mixing in seperate thread")
270 #else
271 VAE_ERROR("Can't mix in audio thread since it's disabled via VAE_NO_AUDIO_THREAD")
272 #endif // !VAE_NO_AUDIO_THREAD
273 }
274 {
275 VAE_PROFILER_SCOPE_NAMED("Device Instance")
276 return mDevice->openDevice() ? Result::Success : Result::DeviceError;
277 }
278 #endif // !VAE_NO_AUDIO_DEVICE
280 }
#define TKLB_DELEGATE(func, thisPrtRef)
Definition: TDelegate.hpp:59
void setCallback(Callback callback)
Definition: vae_device.hpp:196
Thread * mAudioThread
Thread processing voices and mixers.
Definition: vae_engine.hpp:72
void onThreadedBufferSwap(Device *device)
Called from audio device when using seperate audio thread.
Definition: vae_engine.hpp:189
std::thread Thread
Definition: vae_engine.hpp:70
void onBufferSwap(Device *device)
Called from audio device when it needs more audio.
Definition: vae_engine.hpp:163
void threadedProcess()
Called from own audio thread, not the device.
Definition: vae_engine.hpp:175
BackendDummy DefaultBackend
@ GenericFailure
:(
#define VEA_PROFILER_THREAD_NAME(name)
Sets name for current thread.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop()

Result _VAE_PUBLIC_API vae::core::Engine::stop ( )
inline

Stops processing and waits for audio thead to clean up.

Returns
Result

Definition at line 286 of file vae_engine.hpp.

286 {
287 #ifndef VAE_NO_AUDIO_DEVICE
289 #ifndef VAE_NO_AUDIO_THREAD
291 mAudioThreadRunning = false;
292 mAudioConsumed.notify_one(); // make sure the audio thread knows it's time to go
293 if(mAudioThread->joinable()) {
294 mAudioThread->join();
295 delete mAudioThread;
296 VAE_DEBUG("Audio thread stopped")
297 } else {
298 VAE_ERROR("Can't join audio thread")
299 }
300 }
301 #endif // !VAE_NO_AUDIO_THREAD
302 if (mDevice != nullptr) {
303 delete mDevice;
304 mDevice = nullptr;
305 }
306 #endif // !VAE_NO_AUDIO_DEVICE
307 return Result::Success;
308 }
Here is the caller graph for this function:

◆ stopEmitter()

Result _VAE_PUBLIC_API vae::core::Engine::stopEmitter ( EmitterHandle  emitter)
inline

Stop all voices from emitter.

Parameters
emitter
Returns
Result

Definition at line 630 of file vae_engine.hpp.

630 {
631 return mVoiceManager.stop(emitter, &Voice::emitter);
632 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ threadedProcess()

void vae::core::Engine::threadedProcess ( )
inlineprivate

Called from own audio thread, not the device.

Definition at line 175 of file vae_engine.hpp.

175 {
176 VEA_PROFILER_THREAD_NAME("Audio thread")
177 while(mAudioThreadRunning) {
178 process(); // Process one block in advance so there's no underrun
179 std::unique_lock<std::mutex> l(mMutex);
180 mAudioConsumed.wait(l); // Wait until we got work
181 }
182 }
std::mutex mMutex
Mutex needed to use mAudioConsumed, doesn't actually do anything else.
Definition: vae_engine.hpp:74
Here is the call graph for this function:
Here is the caller graph for this function:

◆ unloadAllBanks()

void _VAE_PUBLIC_API vae::core::Engine::unloadAllBanks ( )
inline

Unload every bank and data associated with it.

Definition at line 845 of file vae_engine.hpp.

845 {
847 VAE_INFO("Start unloading all banks")
848 mBankManager.unloadAll();
849 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ unloadBankFromId()

Result _VAE_PUBLIC_API vae::core::Engine::unloadBankFromId ( BankHandle  bankHandle)
inline

Unload bank from handle.

Locks audio thread and stops all voices from that bank.

Parameters
bankHandle
Returns
Result

Definition at line 835 of file vae_engine.hpp.

835 {
837 VAE_INFO("Start Unload bank %i", bankHandle)
838 mVoiceManager.stop(bankHandle, &Voice::bank);
839 return mBankManager.unloadFromId(bankHandle);
840 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

void _VAE_PUBLIC_API vae::core::Engine::update ( )
inline

Update function needs to be called regularly to handle outbound events and other housekeeping.

If this isn't called regularly events might be lost and chained events not fired. When EngineConfig::updateInAudioThread is true, this doesn't need to be called manually.

See also
EngineConfig::updateInAudioThread

Definition at line 317 of file vae_engine.hpp.

317 {
319 VAE_PROFILER_SCOPE_NAMED("Engine Update")
320 // Update emitters and start voices nearby
321 mBankManager.lock();
324 [&](EventHandle event, BankHandle bank, EmitterHandle emitter) {
325 fireEvent(bank, event, emitter);
326 }
327 );
328
329 // Handle finished voices and their events
330 mVoiceManager.forEachFinishedVoice([&](Voice& v) {
331 if (v.emitter != InvalidEmitterHandle) {
332 mSpatialManager.getEmitter(v.emitter).autoplaying = false;
333 // Make sure the event can be triggered again by that emitter
334 }
335 auto onEnd = mBankManager.get(v.bank).events[v.event].on_end;
336 if (onEnd != InvalidEventHandle) {
337 fireEvent(v.bank, onEnd, v.emitter, 1.0, v.mixer);
338 }
339 return true;
340 });
343 }
Emitter & getEmitter(EmitterHandle e)
void forEachFinishedVoice(const Func &&func)
LargeHandle EmitterHandle
Definition: vae.hpp:43
HeapBuffer< Event > events
Events defined.
Definition: vae_bank.hpp:17
bool autoplaying
whether the event was already triggered
Definition: vae_emitter.hpp:16
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ mAudioConsumed

ConditionVariable vae::core::Engine::mAudioConsumed
private

Notifies the audio thread when more audio is needed.

Definition at line 73 of file vae_engine.hpp.

◆ mAudioThread

Thread* vae::core::Engine::mAudioThread
private

Thread processing voices and mixers.

Definition at line 72 of file vae_engine.hpp.

◆ mAudioThreadRunning

bool vae::core::Engine::mAudioThreadRunning = false
private

Definition at line 75 of file vae_engine.hpp.

◆ mBankManager

BankManager vae::core::Engine::mBankManager
private

Holds and manages banks.

Definition at line 53 of file vae_engine.hpp.

◆ mConfig

EngineConfig vae::core::Engine::mConfig
private

Config object provided at initlalization.

Definition at line 49 of file vae_engine.hpp.

◆ mDevice

Device* vae::core::Engine::mDevice = nullptr
private

Output device.

Definition at line 66 of file vae_engine.hpp.

◆ mLimiterLastPeak

Sample vae::core::Engine::mLimiterLastPeak = 1.0
private

Master limiter last peak.

Definition at line 62 of file vae_engine.hpp.

◆ mMasterVolume

Sample vae::core::Engine::mMasterVolume = 1.0
private

Master Colume applied after limiting.

Definition at line 63 of file vae_engine.hpp.

◆ mMixerProcessor

MixerProcessor vae::core::Engine::mMixerProcessor
private

Mixer channel processor.

Definition at line 56 of file vae_engine.hpp.

◆ mMutex

std::mutex vae::core::Engine::mMutex
private

Mutex needed to use mAudioConsumed, doesn't actually do anything else.

Definition at line 74 of file vae_engine.hpp.

◆ mProcessor

Processor vae::core::Engine::mProcessor
private

Default Voice processor.

Definition at line 55 of file vae_engine.hpp.

◆ mScratchBuffer

ScratchBuffer vae::core::Engine::mScratchBuffer
private

used to combine the signal from all banks and push it to the device

Definition at line 59 of file vae_engine.hpp.

◆ mSpatialManager

SpatialManager vae::core::Engine::mSpatialManager
private

Holds and manages spatial emitters.

Definition at line 52 of file vae_engine.hpp.

◆ mSpatialProcessor

SpatialProcessor vae::core::Engine::mSpatialProcessor
private

Spatial voice processor.

Definition at line 57 of file vae_engine.hpp.

◆ mTime

SampleIndex vae::core::Engine::mTime = 0
private

Global engine time in samples.

Definition at line 60 of file vae_engine.hpp.

◆ mTimeFract

Time vae::core::Engine::mTimeFract = 0
private

Global engine time in seconds.

Definition at line 61 of file vae_engine.hpp.

◆ mVoiceManager

VoiceManger vae::core::Engine::mVoiceManager
private

Holds and handle voices.

Definition at line 51 of file vae_engine.hpp.


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