Minor adjustments

This commit is contained in:
Christian Semmler 2023-10-05 03:38:46 -04:00
parent 8b3a1e50ed
commit e585ed5ab5
3 changed files with 9 additions and 8 deletions

View File

@ -7,8 +7,6 @@
#include "mxpresenterlist.h" #include "mxpresenterlist.h"
#include "mxtypes.h" #include "mxtypes.h"
#include <dsound.h>
// VTABLE 0x100dc6b0 // VTABLE 0x100dc6b0
// SIZE 0x2c // SIZE 0x2c
class MxMediaManager : public MxCore class MxMediaManager : public MxCore

View File

@ -26,23 +26,24 @@ void MxSoundManager::Init()
// OFFSET: LEGO1 0x100ae840 // OFFSET: LEGO1 0x100ae840
void MxSoundManager::Destroy(MxBool p_param) void MxSoundManager::Destroy(MxBool p_param)
{ {
if(this->m_thread) { if (this->m_thread) {
this->m_thread->Terminate(); this->m_thread->Terminate();
delete this->m_thread; delete this->m_thread;
} else { }
else {
TickleManager()->UnregisterClient(this); TickleManager()->UnregisterClient(this);
} }
this->m_criticalSection.Enter(); this->m_criticalSection.Enter();
if(this->m_dsBuffer) { if (this->m_dsBuffer) {
this->m_dsBuffer->Release(); this->m_dsBuffer->Release();
} }
Init(); Init();
this->m_criticalSection.Leave(); this->m_criticalSection.Leave();
if(!p_param) { if (!p_param) {
MxAudioManager::Destroy(); MxAudioManager::Destroy();
} }
} }

View File

@ -4,9 +4,10 @@
#include "decomp.h" #include "decomp.h"
#include "mxaudiomanager.h" #include "mxaudiomanager.h"
#include <dsound.h>
// VTABLE 0x100dc128 // VTABLE 0x100dc128
// SIZE 0x3c // SIZE 0x3c
// Base vtables are: MxCore -> 0x100dc6b0 -> MxAudioManager -> MxSoundManager
class MxSoundManager : public MxAudioManager class MxSoundManager : public MxAudioManager
{ {
public: public:
@ -16,8 +17,9 @@ class MxSoundManager : public MxAudioManager
private: private:
void Init(); void Init();
void Destroy(MxBool); void Destroy(MxBool);
undefined4 m_unk30; undefined4 m_unk30;
LPDIRECTSOUNDBUFFER m_dsBuffer; // 0x34 LPDIRECTSOUNDBUFFER m_dsBuffer; // 0x34
undefined m_unk35[4]; undefined m_unk35[4];
}; };