diff --git a/include/amuse/Emitter.hpp b/include/amuse/Emitter.hpp index 6db53fe..c0b29c8 100644 --- a/include/amuse/Emitter.hpp +++ b/include/amuse/Emitter.hpp @@ -22,8 +22,8 @@ public: ~Emitter(); Emitter(Engine& engine, const AudioGroup& group, std::shared_ptr&& vox); - void setPos(const Vector3f& pos); - void setDir(const Vector3f& dir); + void setPos(const float* pos); + void setDir(const float* dir); void setMaxDist(float maxDist); void setMaxVol(float maxVol); void setMinVol(float minVol); diff --git a/include/amuse/Engine.hpp b/include/amuse/Engine.hpp index c7644e3..1ece7d6 100644 --- a/include/amuse/Engine.hpp +++ b/include/amuse/Engine.hpp @@ -96,8 +96,13 @@ public: } /** Start soundFX playing from loaded audio groups, attach to positional emitter */ - std::shared_ptr addEmitter(const Vector3f& pos, const Vector3f& dir, float maxDist, float falloff, + std::shared_ptr addEmitter(const float* pos, const float* dir, float maxDist, float falloff, int sfxId, float minVol, float maxVol, std::weak_ptr smx); + std::shared_ptr addEmitter(const float* pos, const float* dir, float maxDist, float falloff, + int sfxId, float minVol, float maxVol) + { + return addEmitter(pos, dir, maxDist, falloff, sfxId, minVol, maxVol, m_defaultStudio); + } /** Start song playing from loaded audio groups */ std::shared_ptr seqPlay(int groupId, int songId, const unsigned char* arrData, diff --git a/lib/Emitter.cpp b/lib/Emitter.cpp index d29312f..0276d87 100644 --- a/lib/Emitter.cpp +++ b/lib/Emitter.cpp @@ -18,9 +18,9 @@ void Emitter::_destroy() m_vox->kill(); } -void Emitter::setPos(const Vector3f& pos) {} +void Emitter::setPos(const float* pos) {} -void Emitter::setDir(const Vector3f& dir) {} +void Emitter::setDir(const float* dir) {} void Emitter::setMaxDist(float maxDist) {} diff --git a/lib/Engine.cpp b/lib/Engine.cpp index 1a873e2..2047b14 100644 --- a/lib/Engine.cpp +++ b/lib/Engine.cpp @@ -320,7 +320,7 @@ std::shared_ptr Engine::fxStart(int sfxId, float vol, float pan, std::wea } /** Start soundFX playing from loaded audio groups, attach to positional emitter */ -std::shared_ptr Engine::addEmitter(const Vector3f& pos, const Vector3f& dir, float maxDist, float falloff, +std::shared_ptr Engine::addEmitter(const float* pos, const float* dir, float maxDist, float falloff, int sfxId, float minVol, float maxVol, std::weak_ptr smx) { auto search = m_sfxLookup.find(sfxId);