mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-22 23:57:54 -05:00
2d45914ddf
* MxSoundManager: dtor, destroy, update types Also make MxThread's destructor public * Minor adjustments --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
49 lines
No EOL
772 B
C++
49 lines
No EOL
772 B
C++
#include "mxsoundmanager.h"
|
|
|
|
#include "mxomni.h"
|
|
|
|
DECOMP_SIZE_ASSERT(MxSoundManager, 0x3c);
|
|
|
|
// OFFSET: LEGO1 0x100ae740
|
|
MxSoundManager::MxSoundManager()
|
|
{
|
|
Init();
|
|
}
|
|
|
|
// OFFSET: LEGO1 0x100ae7d0
|
|
MxSoundManager::~MxSoundManager()
|
|
{
|
|
Destroy(TRUE);
|
|
}
|
|
|
|
// OFFSET: LEGO1 0x100ae830
|
|
void MxSoundManager::Init()
|
|
{
|
|
m_unk30 = 0;
|
|
m_dsBuffer = NULL;
|
|
}
|
|
|
|
// 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();
|
|
}
|
|
} |