2#include "../../include/vae/vae_pimpl.hpp"
3#include "../core/vae_engine.hpp"
Sealed of version of vae::core::Engine.
static EnginePimpl *_VAE_API_EXPORT create()
Result _VAE_API_EXPORT loadBank(const char *path, Size size=0)
Load bank from filesystem.
EmitterHandle _VAE_API_EXPORT createAutoEmitter(BankHandle bank, EventHandle event, float maxDist, const LocationDirection &locDir, float spread)
Emitter which triggers an event once a listener is close enough.
void _VAE_API_EXPORT unloadAllBanks()
Unload every bank and data associated with it.
EmitterHandle _VAE_API_EXPORT createEmitter()
Creates an emitter and returns the handle.
Result _VAE_API_EXPORT loadHRTF(const char *path, Size size=0)
Result _VAE_API_EXPORT addEmitter(EmitterHandle h)
Adds an emitter with a custom handle, can be an internal ID for example.
ListenerHandle _VAE_API_EXPORT createListener()
Create a Listener object.
void _VAE_API_EXPORT setMasterVolume(Sample volume)
Set the global output volume before the limiter.
void _VAE_API_EXPORT setVolume(EmitterHandle emitter, Sample gain)
Sets the volume of all active voices with this emitter.
void _VAE_API_EXPORT update()
Update function needs to be called regularly to handle outbound events and other housekeeping.
Result _VAE_API_EXPORT init(const EngineConfig &config={})
Initializes the engine and does most of the upfront allocations.
void _VAE_API_EXPORT setSpeed(EmitterHandle emitter, float speed)
Set the playback speed.
void _VAE_API_EXPORT seek(EmitterHandle emitter, Size time)
Set the current time of all voices with the emitter.
Result _VAE_API_EXPORT stop()
Stops processing and waits for audio thead to clean up.
Result _VAE_API_EXPORT removeEmitter(EmitterHandle h)
Unregister a emiter an kill all its voices.
Result _VAE_API_EXPORT setEmitter(EmitterHandle emitter, const LocationDirection &locDir, float spread)
Set the Emitter position, orientation and spread.
bool _VAE_API_EXPORT checkVersion(int major, int minor, int patch)
Check if the compiled version matches.
Result _VAE_API_EXPORT unloadBankFromId(BankHandle bankHandle)
Unload bank from handle.
void _VAE_API_EXPORT destroy()
Result _VAE_API_EXPORT fireEvent(BankHandle bankHandle, EventHandle eventHandle, EmitterHandle emitterHandle, Sample gain=1.0, MixerHandle mixerHandle=InvalidMixerHandle, ListenerHandle listenerHandle=AllListeners)
Main mechanism to start and stop sounds.
int _VAE_API_EXPORT getActiveVoiceCount()
Get the number of currently playing Voices.
void _VAE_API_EXPORT setHighpass(EmitterHandle emitter, float cutoff)
Simple highpass filter for the voices.
Result _VAE_API_EXPORT stopEmitter(EmitterHandle emitter)
Stop all voices from emitter.
Result _VAE_API_EXPORT removeListener(ListenerHandle listener)
Unregister listener.
void _VAE_API_EXPORT setLowpass(EmitterHandle emitter, float cutoff)
Simple lowpass filter for the voices.
Result _VAE_API_EXPORT fireGlobalEvent(GlobalEventHandle globalHandle, EmitterHandle emitterHandle, Sample gain=1.0, MixerHandle mixerHandle=InvalidMixerHandle, ListenerHandle listenerHandle=AllListeners)
Works like fireEvent but with a global Event identifier.
Result _VAE_API_EXPORT setListener(ListenerHandle listener, const LocationOrientation &locOr)
Set the position of a listener.
Result _VAE_API_EXPORT start()
Tries to open default device and start audio thread.
Central class handling all outside communication.
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.
Result _VAE_PUBLIC_API addEmitter(EmitterHandle h)
Adds an emitter with a custom handle, can be an internal ID for example.
void _VAE_PUBLIC_API setSpeed(EmitterHandle emitter, float speed)
Set the playback speed.
EmitterHandle _VAE_PUBLIC_API createEmitter()
Creates an emitter and returns the handle.
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.
void _VAE_PUBLIC_API setLowpass(EmitterHandle emitter, float cutoff)
Simple lowpass filter for the voices.
Result _VAE_PUBLIC_API init(const EngineConfig &config={})
Initializes the engine and does most of the upfront allocations.
void _VAE_PUBLIC_API setMasterVolume(Sample volume)
Set the global output volume before the limiter.
bool _VAE_PUBLIC_API checkVersion(int major, int minor, int patch)
Check if the compiled version matches.
Size _VAE_PUBLIC_API getActiveVoiceCount() const
Get the number of currently playing Voices.
Result _VAE_PUBLIC_API removeListener(ListenerHandle listener)
Unregister listener.
Result _VAE_PUBLIC_API stop()
Stops processing and waits for audio thead to clean up.
Result _VAE_PUBLIC_API loadBank(const char *path, Size size=0)
Load bank from filesystem.
Result _VAE_PUBLIC_API loadHRTF(const char *path, Size size=0)
void _VAE_PUBLIC_API setVolume(EmitterHandle emitter, Sample gain)
Sets the volume of all active voices with this emitter.
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.
Result _VAE_PUBLIC_API start()
Tries to open default device and start audio thread.
Result _VAE_PUBLIC_API removeEmitter(EmitterHandle h)
Unregister a emiter an kill all its voices.
void _VAE_PUBLIC_API unloadAllBanks()
Unload every bank and data associated with it.
Result _VAE_PUBLIC_API unloadBankFromId(BankHandle bankHandle)
Unload bank from handle.
void _VAE_PUBLIC_API seek(EmitterHandle emitter, Size time)
Set the current time of all voices with the emitter.
void _VAE_PUBLIC_API update()
Update function needs to be called regularly to handle outbound events and other housekeeping.
ListenerHandle _VAE_PUBLIC_API createListener()
Create a Listener object.
void _VAE_PUBLIC_API setHighpass(EmitterHandle emitter, float cutoff)
Simple highpass filter for the voices.
Result _VAE_PUBLIC_API setListener(ListenerHandle listener, const LocationOrientation &locOr)
Set the position of a listener.
Result _VAE_PUBLIC_API setEmitter(EmitterHandle emitter, const LocationDirection &locDir, float spread)
Set the Emitter position, orientation and spread.
Result _VAE_PUBLIC_API stopEmitter(EmitterHandle emitter)
Stop all voices from emitter.
Contains Typedefinitions and basic structures use by the public API and internally.
unsigned int Size
How the elements are addressed in the heapbuffer.
float Sample
Default sample types used where ever possible, changing this means the engine needs to be recompiled,...
SmallHandle ListenerHandle
LargeHandle EmitterHandle
GenericHandle EventHandle
The handle used to address events within a bank.
Result
Return Types for most engine functions.
LargeHandle GlobalEventHandle
Used to globally address events, holds space for BankHandle and EventHandle.
Settings for the engine defined at EnginePimpl::init.
Emitters have a position and direction vector.
Listener uses additional up vector.