|
VAE - Virtual Audio Engine 1
Small Data Driven Audio Engine
|
There is only one voice pool and VAE and it's managed here. More...
#include <vae_voice_manager.hpp>
Public Member Functions | |
| Result | init (const EngineConfig &config) |
| HeapBuffer< Voice > & | all () |
| HeapBuffer< Voice > & | finished () |
| Size | getActiveVoiceCount () const |
| template<class Func > | |
| void | forEachVoice (const Func &&func) |
| Callback provided to iterate voices, needs to return a bool to indicate when a voice needs to be stopped. More... | |
| template<class Func > | |
| void | forEachFinishedVoice (const Func &&func) |
| VoicePan & | getVoicePan (Size index) |
| VoiceFilter & | getVoiceFilter (Size index) |
| Result | play (Event &event, const BankHandle bank, const Sample gain, const EmitterHandle emitter, const ListenerHandle listener, const MixerHandle mixer) |
| Result | makeVirtual (Voice &v) |
| makes provided voice virtual More... | |
| Result | stop (Voice &v) |
| Stops a voice. More... | |
| template<typename T > | |
| Result | stop (T handle, T Voice::*member, const EmitterHandle emitter=InvalidEmitterHandle) |
| Stop voice based on a member value and optionally an emitter. More... | |
| template<typename T > | |
| void | setVoiceProperty (EmitterHandle emitter, T Voice::*member, const T &value) |
| template<typename T > | |
| void | setVoiceProperty (EmitterHandle emitter, T VoiceFilter::*member, const T &value) |
Private Attributes | |
| HeapBuffer< Voice > | mFinishedVoiceQueue |
| voices that finished playing are queued here More... | |
| HeapBuffer< Voice > | mVoices |
| Currently playing voice are here. More... | |
| HeapBuffer< Voice > | mVirtualVoices |
| HeapBuffer< VoicePan > | mVoicePans |
| Interpolation data for the panning algorithm or manual panning data. More... | |
| HeapBuffer< VoiceFilter > | mVoiceFiltered |
| Data needed for filtering is here. More... | |
| Size | mActiveVoices = 0 |
| Number of currently playing voices. More... | |
| Size | mInactiveVoices = 0 |
| Number of currenly virtual voices. More... | |
| Size | mActiveHRTFVoices = 0 |
| Number of ative hrtf voices. More... | |
| Size | mHRTFVoiceCount = 0 |
| Number of voices reserved for hrtf. More... | |
| Size | mHighestVoice = 0 |
| TODO bad. More... | |
| Size | mFinishedPending = 0 |
| Voices in mFinishedVoiceQueue. More... | |
| Size | mHighestFinishedVoice = 0 |
| TODO bad as well. More... | |
| Size | mStarvedVoices = 0 |
| Voices which could not play since no other voice could be killed and are lost forever. More... | |
| Size | mStoppedQueueOverflow = 0 |
| Voice which did not fit mFinishedVoiceQueue and could not triggered chained events. More... | |
There is only one voice pool and VAE and it's managed here.
This class handles starting and stopping voices as well as virtualization
Definition at line 34 of file vae_voice_manager.hpp.
|
inline |
Definition at line 62 of file vae_voice_manager.hpp.
|
inline |
Definition at line 66 of file vae_voice_manager.hpp.
|
inline |
Definition at line 96 of file vae_voice_manager.hpp.
|
inline |
Callback provided to iterate voices, needs to return a bool to indicate when a voice needs to be stopped.
| Func |
| func |
Definition at line 81 of file vae_voice_manager.hpp.
|
inline |
|
inline |
Definition at line 115 of file vae_voice_manager.hpp.
Definition at line 111 of file vae_voice_manager.hpp.
|
inline |
Definition at line 51 of file vae_voice_manager.hpp.
makes provided voice virtual
| v |
Definition at line 244 of file vae_voice_manager.hpp.
|
inline |
| event | |
| bank | |
| emitter | |
| mixer |
Definition at line 128 of file vae_voice_manager.hpp.
|
inline |
|
inline |
Definition at line 403 of file vae_voice_manager.hpp.
|
inline |
Stop voice based on a member value and optionally an emitter.
Can kill multiple voices if they match. Alco affects virtual voices
| T | Handle type like MixerHandle |
| handle | Handle to use to look for voice |
| member | Pointer to member variable of Voice |
| emitter | Optional emitter which also needs to match if provided |
Definition at line 371 of file vae_voice_manager.hpp.
Stops a voice.
Mostly used internally since other stop function provide better usage also revives virtual voices
| v | Voice to stop |
If the event triggers something on_end it needs to be added to the finishedVoiceQueue array in the voice manager. The update() function on the engine will handle it
Definition at line 276 of file vae_voice_manager.hpp.
|
private |
Number of ative hrtf voices.
Definition at line 43 of file vae_voice_manager.hpp.
|
private |
Number of currently playing voices.
Definition at line 41 of file vae_voice_manager.hpp.
|
private |
Voices in mFinishedVoiceQueue.
Definition at line 46 of file vae_voice_manager.hpp.
|
private |
voices that finished playing are queued here
Definition at line 35 of file vae_voice_manager.hpp.
|
private |
TODO bad as well.
Definition at line 47 of file vae_voice_manager.hpp.
|
private |
TODO bad.
Definition at line 45 of file vae_voice_manager.hpp.
|
private |
Number of voices reserved for hrtf.
Definition at line 44 of file vae_voice_manager.hpp.
|
private |
Number of currenly virtual voices.
Definition at line 42 of file vae_voice_manager.hpp.
|
private |
Voices which could not play since no other voice could be killed and are lost forever.
Definition at line 48 of file vae_voice_manager.hpp.
|
private |
Voice which did not fit mFinishedVoiceQueue and could not triggered chained events.
Definition at line 49 of file vae_voice_manager.hpp.
|
private |
Definition at line 37 of file vae_voice_manager.hpp.
|
private |
Data needed for filtering is here.
Definition at line 39 of file vae_voice_manager.hpp.
|
private |
Interpolation data for the panning algorithm or manual panning data.
Definition at line 38 of file vae_voice_manager.hpp.
|
private |
Currently playing voice are here.
Definition at line 36 of file vae_voice_manager.hpp.