2016-04-13 06:07:23 +00:00
|
|
|
#ifndef __URDE_CAUDIOSYS_HPP__
|
|
|
|
#define __URDE_CAUDIOSYS_HPP__
|
2015-08-18 05:54:43 +00:00
|
|
|
|
|
|
|
#include "../GCNTypes.hpp"
|
2016-03-04 23:04:53 +00:00
|
|
|
#include "zeus/CVector3f.hpp"
|
2016-09-14 05:54:09 +00:00
|
|
|
#include "amuse/amuse.hpp"
|
2016-12-14 22:56:59 +00:00
|
|
|
#include "boo/audiodev/IAudioVoiceEngine.hpp"
|
2015-08-18 05:54:43 +00:00
|
|
|
|
2016-03-04 23:04:53 +00:00
|
|
|
namespace urde
|
2015-08-18 05:54:43 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
class CAudioSys
|
|
|
|
{
|
2016-12-14 22:56:59 +00:00
|
|
|
static CAudioSys* g_SharedSys;
|
|
|
|
boo::IAudioVoiceEngine* m_voiceEngine;
|
2016-09-14 05:54:09 +00:00
|
|
|
amuse::Engine m_engine;
|
2015-08-18 05:54:43 +00:00
|
|
|
public:
|
2015-08-20 02:52:07 +00:00
|
|
|
struct C3DEmitterParmData
|
|
|
|
{
|
2016-09-16 23:43:33 +00:00
|
|
|
zeus::CVector3f x0_pos;
|
|
|
|
zeus::CVector3f xc_dir;
|
|
|
|
float x18_maxDist;
|
|
|
|
float x1c_distComp;
|
|
|
|
u32 x20_flags;
|
|
|
|
u16 x24_sfxId;
|
|
|
|
u8 x26_maxVol;
|
|
|
|
u8 x27_minVol;
|
|
|
|
u8 x28_extra[2];
|
2015-08-20 02:52:07 +00:00
|
|
|
};
|
2016-12-14 22:56:59 +00:00
|
|
|
CAudioSys(boo::IAudioVoiceEngine* voiceEngine,
|
|
|
|
amuse::IBackendVoiceAllocator& backend, u8,u8,u8,u8,u32)
|
|
|
|
: m_voiceEngine(voiceEngine), m_engine(backend)
|
2015-08-18 05:54:43 +00:00
|
|
|
{
|
2016-12-14 22:56:59 +00:00
|
|
|
g_SharedSys = this;
|
|
|
|
}
|
|
|
|
~CAudioSys()
|
|
|
|
{
|
|
|
|
g_SharedSys = nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void AddAudioGroup(const amuse::AudioGroupData& data)
|
|
|
|
{
|
|
|
|
g_SharedSys->m_engine.addAudioGroup(data);
|
|
|
|
}
|
|
|
|
static void RemoveAudioGroup(const amuse::AudioGroupData& data)
|
|
|
|
{
|
|
|
|
g_SharedSys->m_engine.removeAudioGroup(data);
|
|
|
|
}
|
|
|
|
static boo::IAudioVoiceEngine* GetVoiceEngine()
|
|
|
|
{
|
|
|
|
return g_SharedSys->m_voiceEngine;
|
|
|
|
}
|
|
|
|
static amuse::Engine& GetAmuseEngine()
|
|
|
|
{
|
|
|
|
return g_SharedSys->m_engine;
|
2015-08-18 05:54:43 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2016-04-13 06:07:23 +00:00
|
|
|
#endif // __URDE_CAUDIOSYS_HPP__
|