AudioGroupData to use Factor5's convention, not Retro's

This commit is contained in:
Jack Andersen 2016-05-09 16:31:05 -10:00
parent 2b7dc66c2a
commit 11739d86e2
3 changed files with 9 additions and 6 deletions

View File

@ -46,7 +46,7 @@ set(HEADERS
unset(EXTRAS) unset(EXTRAS)
if(TARGET boo) if(TARGET boo)
include_directories(${BOO_INCLUDE_DIR}) include_directories(${BOO_INCLUDE_DIR} ${LOGVISOR_INCLUDE_DIR})
list(APPEND EXTRAS lib/BooBackend.cpp include/amuse/BooBackend.hpp) list(APPEND EXTRAS lib/BooBackend.cpp include/amuse/BooBackend.hpp)
endif() endif()

View File

@ -1,17 +1,20 @@
#include "amuse/amuse.hpp" #include "amuse/amuse.hpp"
#include "amuse/BooBackend.hpp" #include "amuse/BooBackend.hpp"
#include "boo/audiodev/IAudioVoiceEngine.hpp" #include "boo/audiodev/IAudioVoiceEngine.hpp"
#include "logvisor/logvisor.hpp"
#include <thread> #include <thread>
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
logvisor::RegisterConsoleLogger();
std::unique_ptr<boo::IAudioVoiceEngine> voxEngine = boo::NewAudioVoiceEngine(); std::unique_ptr<boo::IAudioVoiceEngine> voxEngine = boo::NewAudioVoiceEngine();
amuse::BooBackendVoiceAllocator booBackend(*voxEngine); amuse::BooBackendVoiceAllocator booBackend(*voxEngine);
amuse::Engine engine(booBackend); amuse::Engine engine(booBackend);
amuse::Voice* vox = engine.fxStart(1, 1.f, 0.f); amuse::Voice* vox = engine.fxStart(1, 1.f, 0.f);
for (int f=0 ; f<500 ; ++f) for (int f=0 ; f<300 ; ++f)
{ {
engine.pumpEngine(); engine.pumpEngine();
std::this_thread::sleep_for(std::chrono::milliseconds(15)); std::this_thread::sleep_for(std::chrono::milliseconds(15));

View File

@ -10,17 +10,17 @@ namespace amuse
class AudioGroupData class AudioGroupData
{ {
protected: protected:
unsigned char* m_pool;
unsigned char* m_proj; unsigned char* m_proj;
unsigned char* m_pool;
unsigned char* m_sdir; unsigned char* m_sdir;
unsigned char* m_samp; unsigned char* m_samp;
public: public:
AudioGroupData(unsigned char* pool, unsigned char* proj, AudioGroupData(unsigned char* proj, unsigned char* pool,
unsigned char* sdir, unsigned char* samp) unsigned char* sdir, unsigned char* samp)
: m_pool(pool), m_proj(proj), m_sdir(sdir), m_samp(samp) {} : m_proj(proj), m_pool(pool), m_sdir(sdir), m_samp(samp) {}
const unsigned char* getPool() const {return m_pool;}
const unsigned char* getProj() const {return m_proj;} const unsigned char* getProj() const {return m_proj;}
const unsigned char* getPool() const {return m_pool;}
const unsigned char* getSdir() const {return m_sdir;} const unsigned char* getSdir() const {return m_sdir;}
const unsigned char* getSamp() const {return m_samp;} const unsigned char* getSamp() const {return m_samp;}
}; };