Amuse
|
#include <Engine.hpp>
Public Member Functions | |
Engine (IBackendVoiceAllocator &backend) | |
IBackendVoiceAllocator & | getBackend () |
void | pumpEngine (double dt) |
const AudioGroup * | addAudioGroup (const AudioGroupData &data) |
void | removeAudioGroup (const AudioGroupData &data) |
Submix * | addSubmix (Submix *parent=nullptr) |
void | removeSubmix (Submix *smx) |
std::shared_ptr< Voice > | fxStart (int sfxId, float vol, float pan, Submix *smx=nullptr) |
std::shared_ptr< Emitter > | addEmitter (const Vector3f &pos, const Vector3f &dir, float maxDist, float falloff, int sfxId, float minVol, float maxVol, Submix *smx=nullptr) |
std::shared_ptr< Sequencer > | seqPlay (int groupId, int songId, const unsigned char *arrData, Submix *smx=nullptr) |
std::shared_ptr< Voice > | findVoice (int vid) |
void | killKeygroup (uint8_t kg, bool now) |
void | sendMacroMessage (ObjectId macroId, int32_t val) |
uint32_t | nextRandom () |
Friends | |
class | Voice |
class | Emitter |
class | Sequencer |
class | Sequencer::ChannelState |
Main audio playback system for a single audio output
Definition at line 23 of file Engine.hpp.
const AudioGroup* amuse::Engine::addAudioGroup | ( | const AudioGroupData & | data | ) |
Add audio group data pointers to engine; must remain resident!
std::shared_ptr<Emitter> amuse::Engine::addEmitter | ( | const Vector3f & | pos, |
const Vector3f & | dir, | ||
float | maxDist, | ||
float | falloff, | ||
int | sfxId, | ||
float | minVol, | ||
float | maxVol, | ||
Submix * | smx = nullptr |
||
) |
Start soundFX playing from loaded audio groups, attach to positional emitter
Create new Submix (a.k.a 'Studio') within root mix engine
std::shared_ptr<Voice> amuse::Engine::findVoice | ( | int | vid | ) |
Find voice from VoiceId
std::shared_ptr<Voice> amuse::Engine::fxStart | ( | int | sfxId, |
float | vol, | ||
float | pan, | ||
Submix * | smx = nullptr |
||
) |
Start soundFX playing from loaded audio groups
|
inline |
Access voice backend of engine
Definition at line 58 of file Engine.hpp.
void amuse::Engine::killKeygroup | ( | uint8_t | kg, |
bool | now | ||
) |
Stop all voices in kg
, stops immediately (no KeyOff) when now
set
|
inline |
Obtain next random number from engine's PRNG
Definition at line 97 of file Engine.hpp.
void amuse::Engine::pumpEngine | ( | double | dt | ) |
Update all active audio entities and fill OS audio buffers as needed
void amuse::Engine::removeAudioGroup | ( | const AudioGroupData & | data | ) |
Remove audio group from engine
void amuse::Engine::removeSubmix | ( | Submix * | smx | ) |
void amuse::Engine::sendMacroMessage | ( | ObjectId | macroId, |
int32_t | val | ||
) |
Send all voices using macroId
the message val
std::shared_ptr<Sequencer> amuse::Engine::seqPlay | ( | int | groupId, |
int | songId, | ||
const unsigned char * | arrData, | ||
Submix * | smx = nullptr |
||
) |
Start song playing from loaded audio groups