2023-06-29 04:10:08 -04:00
|
|
|
#include "mxsoundmanager.h"
|
2023-10-07 11:30:04 -04:00
|
|
|
#include "mxticklemanager.h"
|
2023-10-05 03:47:37 -04:00
|
|
|
#include "mxomni.h"
|
|
|
|
|
|
|
|
DECOMP_SIZE_ASSERT(MxSoundManager, 0x3c);
|
|
|
|
|
2023-07-02 02:53:54 -04:00
|
|
|
// OFFSET: LEGO1 0x100ae740
|
2023-06-29 04:10:08 -04:00
|
|
|
MxSoundManager::MxSoundManager()
|
|
|
|
{
|
2023-07-02 02:53:54 -04:00
|
|
|
Init();
|
2023-06-29 04:10:08 -04:00
|
|
|
}
|
|
|
|
|
2023-10-05 03:47:37 -04:00
|
|
|
// OFFSET: LEGO1 0x100ae7d0
|
2023-06-29 04:10:08 -04:00
|
|
|
MxSoundManager::~MxSoundManager()
|
|
|
|
{
|
2023-10-05 03:47:37 -04:00
|
|
|
Destroy(TRUE);
|
2023-06-29 04:10:08 -04:00
|
|
|
}
|
2023-07-02 02:53:54 -04:00
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100ae830
|
|
|
|
void MxSoundManager::Init()
|
|
|
|
{
|
|
|
|
m_unk30 = 0;
|
2023-10-05 03:47:37 -04:00
|
|
|
m_dsBuffer = NULL;
|
2023-07-02 02:53:54 -04:00
|
|
|
}
|
|
|
|
|
2023-10-05 03:47:37 -04:00
|
|
|
// OFFSET: LEGO1 0x100ae840
|
|
|
|
void MxSoundManager::Destroy(MxBool p_param)
|
|
|
|
{
|
|
|
|
if (this->m_thread) {
|
|
|
|
this->m_thread->Terminate();
|
|
|
|
delete this->m_thread;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
TickleManager()->UnregisterClient(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
this->m_criticalSection.Enter();
|
|
|
|
|
|
|
|
if (this->m_dsBuffer) {
|
|
|
|
this->m_dsBuffer->Release();
|
|
|
|
}
|
|
|
|
|
|
|
|
Init();
|
|
|
|
this->m_criticalSection.Leave();
|
|
|
|
|
|
|
|
if (!p_param) {
|
|
|
|
MxAudioManager::Destroy();
|
|
|
|
}
|
2023-10-07 13:12:59 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100ae8b0 STUB
|
|
|
|
MxResult MxSoundManager::StartDirectSound(undefined4 p_unknown1, MxBool p_unknown2)
|
|
|
|
{
|
|
|
|
// TODO STUB
|
|
|
|
return FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100aed10 STUB
|
|
|
|
void MxSoundManager::vtable0x34()
|
|
|
|
{
|
|
|
|
// TODO STUB
|
|
|
|
}
|
|
|
|
|
|
|
|
// OFFSET: LEGO1 0x100aee10 STUB
|
|
|
|
void MxSoundManager::vtable0x38()
|
|
|
|
{
|
|
|
|
// TODO STUB
|
|
|
|
}
|