mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
Remove unused WinMM code
This commit is contained in:
parent
707a18ca17
commit
490370b90c
@ -263,10 +263,6 @@ add_library(omni STATIC
|
|||||||
LEGO1/omni/src/action/mxdsstreamingaction.cpp
|
LEGO1/omni/src/action/mxdsstreamingaction.cpp
|
||||||
LEGO1/omni/src/audio/mxaudiomanager.cpp
|
LEGO1/omni/src/audio/mxaudiomanager.cpp
|
||||||
LEGO1/omni/src/audio/mxaudiopresenter.cpp
|
LEGO1/omni/src/audio/mxaudiopresenter.cpp
|
||||||
LEGO1/omni/src/audio/mxloopingmidipresenter.cpp
|
|
||||||
LEGO1/omni/src/audio/mxmidipresenter.cpp
|
|
||||||
LEGO1/omni/src/audio/mxmusicmanager.cpp
|
|
||||||
LEGO1/omni/src/audio/mxmusicpresenter.cpp
|
|
||||||
LEGO1/omni/src/audio/mxsoundmanager.cpp
|
LEGO1/omni/src/audio/mxsoundmanager.cpp
|
||||||
LEGO1/omni/src/audio/mxsoundpresenter.cpp
|
LEGO1/omni/src/audio/mxsoundpresenter.cpp
|
||||||
LEGO1/omni/src/audio/mxwavepresenter.cpp
|
LEGO1/omni/src/audio/mxwavepresenter.cpp
|
||||||
@ -334,7 +330,7 @@ add_library(omni STATIC
|
|||||||
register_lego1_target(omni)
|
register_lego1_target(omni)
|
||||||
set_property(TARGET omni PROPERTY ARCHIVE_OUTPUT_NAME "omni$<$<CONFIG:Debug>:d>")
|
set_property(TARGET omni PROPERTY ARCHIVE_OUTPUT_NAME "omni$<$<CONFIG:Debug>:d>")
|
||||||
target_include_directories(omni PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1/omni/include" "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/util")
|
target_include_directories(omni PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1/omni/include" "${CMAKE_SOURCE_DIR}/LEGO1" "${CMAKE_SOURCE_DIR}/util")
|
||||||
target_link_libraries(omni PRIVATE winmm libsmacker miniaudio)
|
target_link_libraries(omni PRIVATE libsmacker miniaudio)
|
||||||
|
|
||||||
add_library(lego1 SHARED
|
add_library(lego1 SHARED
|
||||||
LEGO1/define.cpp
|
LEGO1/define.cpp
|
||||||
@ -497,7 +493,7 @@ if (ISLE_BUILD_APP)
|
|||||||
target_link_libraries(isle PRIVATE SDL3::SDL3 iniparser-static)
|
target_link_libraries(isle PRIVATE SDL3::SDL3 iniparser-static)
|
||||||
|
|
||||||
# Link DSOUND, WINMM, and LEGO1
|
# Link DSOUND, WINMM, and LEGO1
|
||||||
target_link_libraries(isle PRIVATE winmm lego1)
|
target_link_libraries(isle PRIVATE lego1)
|
||||||
|
|
||||||
# Make sure filenames are ALL CAPS
|
# Make sure filenames are ALL CAPS
|
||||||
set_property(TARGET isle PROPERTY OUTPUT_NAME ISLE)
|
set_property(TARGET isle PROPERTY OUTPUT_NAME ISLE)
|
||||||
|
|||||||
@ -82,7 +82,6 @@ EXPORTS
|
|||||||
?MSoundManager@@YAPAVMxSoundManager@@XZ
|
?MSoundManager@@YAPAVMxSoundManager@@XZ
|
||||||
?MakeSourceName@@YAXPADPBD@Z
|
?MakeSourceName@@YAXPADPBD@Z
|
||||||
?MoveCursor@LegoVideoManager@@QAEXHH@Z
|
?MoveCursor@LegoVideoManager@@QAEXHH@Z
|
||||||
?MusicManager@@YAPAVMxMusicManager@@XZ
|
|
||||||
?NotificationManager@@YAPAVMxNotificationManager@@XZ
|
?NotificationManager@@YAPAVMxNotificationManager@@XZ
|
||||||
?Notify@MxCore@@UAEJAAVMxParam@@@Z
|
?Notify@MxCore@@UAEJAAVMxParam@@@Z
|
||||||
?Open@MxDSFile@@UAEJK@Z
|
?Open@MxDSFile@@UAEJK@Z
|
||||||
|
|||||||
@ -1,38 +0,0 @@
|
|||||||
#ifndef MXLOOPINGMIDIPRESENTER_H
|
|
||||||
#define MXLOOPINGMIDIPRESENTER_H
|
|
||||||
|
|
||||||
#include "mxmidipresenter.h"
|
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100dc240
|
|
||||||
// SIZE 0x58
|
|
||||||
class MxLoopingMIDIPresenter : public MxMIDIPresenter {
|
|
||||||
public:
|
|
||||||
// FUNCTION: BETA10 0x1012f0b0
|
|
||||||
static const char* HandlerClassName()
|
|
||||||
{
|
|
||||||
// STRING: LEGO1 0x10101de0
|
|
||||||
return "MxLoopingMIDIPresenter";
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100b1830
|
|
||||||
// FUNCTION: BETA10 0x10143910
|
|
||||||
inline const char* ClassName() const override // vtable+0x0c
|
|
||||||
{
|
|
||||||
return HandlerClassName();
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100b1840
|
|
||||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
|
||||||
{
|
|
||||||
return !strcmp(p_name, MxLoopingMIDIPresenter::ClassName()) || MxMIDIPresenter::IsA(p_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
void StreamingTickle() override; // vtable+0x20
|
|
||||||
void DoneTickle() override; // vtable+0x2c
|
|
||||||
MxResult PutData() override; // vtable+0x4c
|
|
||||||
};
|
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100b19c0
|
|
||||||
// MxLoopingMIDIPresenter::`scalar deleting destructor'
|
|
||||||
|
|
||||||
#endif // MXLOOPINGMIDIPRESENTER_H
|
|
||||||
@ -1,55 +0,0 @@
|
|||||||
#ifndef MXMIDIPRESENTER_H
|
|
||||||
#define MXMIDIPRESENTER_H
|
|
||||||
|
|
||||||
#include "mxmusicpresenter.h"
|
|
||||||
|
|
||||||
class MxStreamChunk;
|
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100dca20
|
|
||||||
// SIZE 0x58
|
|
||||||
class MxMIDIPresenter : public MxMusicPresenter {
|
|
||||||
public:
|
|
||||||
MxMIDIPresenter();
|
|
||||||
~MxMIDIPresenter() override;
|
|
||||||
|
|
||||||
// FUNCTION: BETA10 0x1012f090
|
|
||||||
static const char* HandlerClassName()
|
|
||||||
{
|
|
||||||
// STRING: LEGO1 0x10101df8
|
|
||||||
return "MxMIDIPresenter";
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c2650
|
|
||||||
// FUNCTION: BETA10 0x10143a90
|
|
||||||
inline const char* ClassName() const override // vtable+0x0c
|
|
||||||
{
|
|
||||||
return HandlerClassName();
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c2660
|
|
||||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
|
||||||
{
|
|
||||||
return !strcmp(p_name, MxMIDIPresenter::ClassName()) || MxMusicPresenter::IsA(p_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ReadyTickle() override; // vtable+0x18
|
|
||||||
void StartingTickle() override; // vtable+0x1c
|
|
||||||
void StreamingTickle() override; // vtable+0x20
|
|
||||||
void DoneTickle() override; // vtable+0x2c
|
|
||||||
void Destroy() override; // vtable+0x38
|
|
||||||
void EndAction() override; // vtable+0x40
|
|
||||||
MxResult PutData() override; // vtable+0x4c
|
|
||||||
void SetVolume(MxS32 p_volume) override; // vtable+0x60
|
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100c27a0
|
|
||||||
// MxMIDIPresenter::`scalar deleting destructor'
|
|
||||||
|
|
||||||
private:
|
|
||||||
void Init();
|
|
||||||
void Destroy(MxBool p_fromDestructor);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
MxStreamChunk* m_chunk; // 0x54
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // MXMIDIPRESENTER_H
|
|
||||||
@ -6,7 +6,6 @@
|
|||||||
class MxAtomSet;
|
class MxAtomSet;
|
||||||
class MxDSAction;
|
class MxDSAction;
|
||||||
class MxEventManager;
|
class MxEventManager;
|
||||||
class MxMusicManager;
|
|
||||||
class MxNotificationManager;
|
class MxNotificationManager;
|
||||||
class MxObjectFactory;
|
class MxObjectFactory;
|
||||||
class MxSoundManager;
|
class MxSoundManager;
|
||||||
@ -21,7 +20,6 @@ MxTimer* Timer();
|
|||||||
MxStreamer* Streamer();
|
MxStreamer* Streamer();
|
||||||
MxSoundManager* MSoundManager();
|
MxSoundManager* MSoundManager();
|
||||||
MxVariableTable* VariableTable();
|
MxVariableTable* VariableTable();
|
||||||
MxMusicManager* MusicManager();
|
|
||||||
MxEventManager* EventManager();
|
MxEventManager* EventManager();
|
||||||
MxResult Start(MxDSAction*);
|
MxResult Start(MxDSAction*);
|
||||||
MxNotificationManager* NotificationManager();
|
MxNotificationManager* NotificationManager();
|
||||||
|
|||||||
@ -1,61 +0,0 @@
|
|||||||
#ifndef MXMUSICMANAGER_H
|
|
||||||
#define MXMUSICMANAGER_H
|
|
||||||
|
|
||||||
#include "decomp.h"
|
|
||||||
#include "mxaudiomanager.h"
|
|
||||||
|
|
||||||
#include <windows.h>
|
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100dc930
|
|
||||||
// SIZE 0x58
|
|
||||||
class MxMusicManager : public MxAudioManager {
|
|
||||||
public:
|
|
||||||
MxMusicManager();
|
|
||||||
~MxMusicManager() override;
|
|
||||||
|
|
||||||
void Destroy() override; // vtable+18
|
|
||||||
void SetVolume(MxS32 p_volume) override; // vtable+2c
|
|
||||||
virtual MxResult Create(MxU32 p_frequencyMS, MxBool p_createThread); // vtable+30
|
|
||||||
|
|
||||||
inline MxBool GetMIDIInitialized() { return m_midiInitialized; }
|
|
||||||
inline void GetMIDIVolume(DWORD& p_volume)
|
|
||||||
{
|
|
||||||
if (midiOutGetVolume((HMIDIOUT) m_midiStreamH, &p_volume)) {
|
|
||||||
p_volume = CalculateVolume(100);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MxResult ResetStream();
|
|
||||||
void ResetBuffer();
|
|
||||||
MxResult InitializeMIDI(MxU8* p_data, MxS32 p_loopCount);
|
|
||||||
void DeinitializeMIDI();
|
|
||||||
void SetMultiplier(MxS32 p_multiplier);
|
|
||||||
|
|
||||||
private:
|
|
||||||
void Destroy(MxBool p_fromDestructor);
|
|
||||||
|
|
||||||
MxS32 CalculateVolume(MxS32 p_volume);
|
|
||||||
void SetMIDIVolume();
|
|
||||||
|
|
||||||
static void CALLBACK MidiCallbackProc(HDRVR p_hdrvr, UINT p_uMsg, DWORD p_dwUser, DWORD p_dw1, DWORD p_dw2);
|
|
||||||
|
|
||||||
HMIDISTRM m_midiStreamH; // 0x30
|
|
||||||
MxBool m_midiInitialized; // 0x34
|
|
||||||
MxU32 m_bufferSize; // 0x38
|
|
||||||
MxU32 m_bufferCurrentSize; // 0x3c
|
|
||||||
MxU8* m_bufferOffset; // 0x40
|
|
||||||
MxU8* m_bufferCurrentOffset; // 0x44
|
|
||||||
MxU32 m_loopCount; // 0x48
|
|
||||||
MIDIHDR* m_midiHdrP; // 0x4c
|
|
||||||
MxS32 m_multiplier; // 0x50
|
|
||||||
DWORD m_midiVolume; // 0x54
|
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100c0610
|
|
||||||
// MxMusicManager::`scalar deleting destructor'
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void Init();
|
|
||||||
void InitData();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // MXMUSICMANAGER_H
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
#ifndef MXMUSICPRESENTER_H
|
|
||||||
#define MXMUSICPRESENTER_H
|
|
||||||
|
|
||||||
#include "mxaudiopresenter.h"
|
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100dc9b8
|
|
||||||
// SIZE 0x54
|
|
||||||
class MxMusicPresenter : public MxAudioPresenter {
|
|
||||||
public:
|
|
||||||
MxMusicPresenter();
|
|
||||||
~MxMusicPresenter() override;
|
|
||||||
|
|
||||||
// FUNCTION: BETA10 0x10143a70
|
|
||||||
static const char* HandlerClassName()
|
|
||||||
{
|
|
||||||
// STRING: LEGO1 0x10101e48
|
|
||||||
return "MxMusicPresenter";
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c23a0
|
|
||||||
// FUNCTION: BETA10 0x10143a50
|
|
||||||
inline const char* ClassName() const override // vtable+0x0c
|
|
||||||
{
|
|
||||||
return HandlerClassName();
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c23b0
|
|
||||||
inline MxBool IsA(const char* p_name) const override // vtable+0x10
|
|
||||||
{
|
|
||||||
return !strcmp(p_name, MxMusicPresenter::ClassName()) || MxAudioPresenter::IsA(p_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
MxResult AddToManager() override; // vtable+0x34
|
|
||||||
void Destroy() override; // vtable+0x38
|
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x100c24c0
|
|
||||||
// MxMusicPresenter::`scalar deleting destructor'
|
|
||||||
|
|
||||||
private:
|
|
||||||
void Init();
|
|
||||||
void Destroy(MxBool p_fromDestructor);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // MXMUSICPRESENTER_H
|
|
||||||
@ -12,11 +12,9 @@
|
|||||||
X(MxSmkPresenter) \
|
X(MxSmkPresenter) \
|
||||||
X(MxStillPresenter) \
|
X(MxStillPresenter) \
|
||||||
X(MxWavePresenter) \
|
X(MxWavePresenter) \
|
||||||
X(MxMIDIPresenter) \
|
|
||||||
X(MxEventPresenter) \
|
X(MxEventPresenter) \
|
||||||
X(MxLoopingFlcPresenter) \
|
X(MxLoopingFlcPresenter) \
|
||||||
X(MxLoopingSmkPresenter) \
|
X(MxLoopingSmkPresenter)
|
||||||
X(MxLoopingMIDIPresenter)
|
|
||||||
|
|
||||||
// VTABLE: LEGO1 0x100dc220
|
// VTABLE: LEGO1 0x100dc220
|
||||||
class MxObjectFactory : public MxCore {
|
class MxObjectFactory : public MxCore {
|
||||||
|
|||||||
@ -11,7 +11,6 @@ class MxAtomSet;
|
|||||||
class MxDSAction;
|
class MxDSAction;
|
||||||
class MxEntity;
|
class MxEntity;
|
||||||
class MxEventManager;
|
class MxEventManager;
|
||||||
class MxMusicManager;
|
|
||||||
class MxNotificationManager;
|
class MxNotificationManager;
|
||||||
class MxNotificationParam;
|
class MxNotificationParam;
|
||||||
class MxObjectFactory;
|
class MxObjectFactory;
|
||||||
@ -86,9 +85,6 @@ class MxOmni : public MxCore {
|
|||||||
// FUNCTION: BETA10 0x101251c0
|
// FUNCTION: BETA10 0x101251c0
|
||||||
MxVariableTable* GetVariableTable() const { return this->m_variableTable; }
|
MxVariableTable* GetVariableTable() const { return this->m_variableTable; }
|
||||||
|
|
||||||
// FUNCTION: BETA10 0x101251e0
|
|
||||||
MxMusicManager* GetMusicManager() const { return this->m_musicManager; }
|
|
||||||
|
|
||||||
// FUNCTION: BETA10 0x10125200
|
// FUNCTION: BETA10 0x10125200
|
||||||
MxEventManager* GetEventManager() const { return this->m_eventManager; }
|
MxEventManager* GetEventManager() const { return this->m_eventManager; }
|
||||||
|
|
||||||
@ -111,7 +107,6 @@ class MxOmni : public MxCore {
|
|||||||
MxNotificationManager* m_notificationManager; // 0x28
|
MxNotificationManager* m_notificationManager; // 0x28
|
||||||
MxVideoManager* m_videoManager; // 0x2c
|
MxVideoManager* m_videoManager; // 0x2c
|
||||||
MxSoundManager* m_soundManager; // 0x30
|
MxSoundManager* m_soundManager; // 0x30
|
||||||
MxMusicManager* m_musicManager; // 0x34
|
|
||||||
MxEventManager* m_eventManager; // 0x38
|
MxEventManager* m_eventManager; // 0x38
|
||||||
MxTimer* m_timer; // 0x3c
|
MxTimer* m_timer; // 0x3c
|
||||||
MxStreamer* m_streamer; // 0x40
|
MxStreamer* m_streamer; // 0x40
|
||||||
|
|||||||
@ -1,51 +0,0 @@
|
|||||||
#include "mxloopingmidipresenter.h"
|
|
||||||
|
|
||||||
#include "decomp.h"
|
|
||||||
#include "mxdssound.h"
|
|
||||||
#include "mxmisc.h"
|
|
||||||
#include "mxmusicmanager.h"
|
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(MxLoopingMIDIPresenter, 0x58);
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c2a80
|
|
||||||
void MxLoopingMIDIPresenter::StreamingTickle()
|
|
||||||
{
|
|
||||||
if (m_action->GetLoopCount()) {
|
|
||||||
MxMIDIPresenter::StreamingTickle();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!m_chunk) {
|
|
||||||
m_chunk = NextChunk();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_chunk->GetTime() + m_action->GetDuration() <= m_action->GetElapsedTime()) {
|
|
||||||
ProgressTickleState(e_done);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c2ae0
|
|
||||||
void MxLoopingMIDIPresenter::DoneTickle()
|
|
||||||
{
|
|
||||||
if (m_action->GetLoopCount()) {
|
|
||||||
MxMIDIPresenter::DoneTickle();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
EndAction();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c2b00
|
|
||||||
MxResult MxLoopingMIDIPresenter::PutData()
|
|
||||||
{
|
|
||||||
m_criticalSection.Enter();
|
|
||||||
|
|
||||||
if (m_currentTickleState == e_streaming && m_chunk && !MusicManager()->GetMIDIInitialized()) {
|
|
||||||
SetVolume(((MxDSSound*) m_action)->GetVolume());
|
|
||||||
MusicManager()->InitializeMIDI(m_chunk->GetData(), !m_action->GetLoopCount() ? -1 : m_action->GetLoopCount());
|
|
||||||
}
|
|
||||||
|
|
||||||
m_criticalSection.Leave();
|
|
||||||
return SUCCESS;
|
|
||||||
}
|
|
||||||
@ -1,131 +0,0 @@
|
|||||||
#include "mxmidipresenter.h"
|
|
||||||
|
|
||||||
#include "decomp.h"
|
|
||||||
#include "mxautolock.h"
|
|
||||||
#include "mxdssound.h"
|
|
||||||
#include "mxdssubscriber.h"
|
|
||||||
#include "mxmisc.h"
|
|
||||||
#include "mxmusicmanager.h"
|
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(MxMIDIPresenter, 0x58);
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c25e0
|
|
||||||
MxMIDIPresenter::MxMIDIPresenter()
|
|
||||||
{
|
|
||||||
Init();
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c27c0
|
|
||||||
MxMIDIPresenter::~MxMIDIPresenter()
|
|
||||||
{
|
|
||||||
Destroy(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c2820
|
|
||||||
void MxMIDIPresenter::Init()
|
|
||||||
{
|
|
||||||
m_chunk = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c2830
|
|
||||||
void MxMIDIPresenter::Destroy(MxBool p_fromDestructor)
|
|
||||||
{
|
|
||||||
if (MusicManager()) {
|
|
||||||
MusicManager()->DeinitializeMIDI();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_criticalSection.Enter();
|
|
||||||
|
|
||||||
if (m_subscriber && m_chunk) {
|
|
||||||
m_subscriber->FreeDataChunk(m_chunk);
|
|
||||||
}
|
|
||||||
Init();
|
|
||||||
|
|
||||||
m_criticalSection.Leave();
|
|
||||||
|
|
||||||
if (!p_fromDestructor) {
|
|
||||||
MxMusicPresenter::Destroy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c2890
|
|
||||||
void MxMIDIPresenter::ReadyTickle()
|
|
||||||
{
|
|
||||||
MxStreamChunk* chunk = NextChunk();
|
|
||||||
|
|
||||||
if (chunk) {
|
|
||||||
m_subscriber->FreeDataChunk(chunk);
|
|
||||||
ParseExtra();
|
|
||||||
ProgressTickleState(e_starting);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c28d0
|
|
||||||
void MxMIDIPresenter::StartingTickle()
|
|
||||||
{
|
|
||||||
MxStreamChunk* chunk = CurrentChunk();
|
|
||||||
|
|
||||||
if (chunk && m_action->GetElapsedTime() >= chunk->GetTime()) {
|
|
||||||
ProgressTickleState(e_streaming);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c2910
|
|
||||||
void MxMIDIPresenter::StreamingTickle()
|
|
||||||
{
|
|
||||||
if (m_chunk) {
|
|
||||||
ProgressTickleState(e_done);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
m_chunk = NextChunk();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c2940
|
|
||||||
void MxMIDIPresenter::DoneTickle()
|
|
||||||
{
|
|
||||||
if (!MusicManager()->GetMIDIInitialized()) {
|
|
||||||
EndAction();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c2960
|
|
||||||
void MxMIDIPresenter::Destroy()
|
|
||||||
{
|
|
||||||
Destroy(FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c2970
|
|
||||||
MxResult MxMIDIPresenter::PutData()
|
|
||||||
{
|
|
||||||
m_criticalSection.Enter();
|
|
||||||
|
|
||||||
if (m_currentTickleState == e_streaming && m_chunk && !MusicManager()->GetMIDIInitialized()) {
|
|
||||||
SetVolume(((MxDSSound*) m_action)->GetVolume());
|
|
||||||
|
|
||||||
if (MusicManager()->InitializeMIDI(m_chunk->GetData(), 1) != SUCCESS) {
|
|
||||||
EndAction();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
m_criticalSection.Leave();
|
|
||||||
return SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c29e0
|
|
||||||
void MxMIDIPresenter::EndAction()
|
|
||||||
{
|
|
||||||
if (m_action) {
|
|
||||||
AUTOLOCK(m_criticalSection);
|
|
||||||
|
|
||||||
MxMediaPresenter::EndAction();
|
|
||||||
MusicManager()->DeinitializeMIDI();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c2a60
|
|
||||||
void MxMIDIPresenter::SetVolume(MxS32 p_volume)
|
|
||||||
{
|
|
||||||
m_volume = p_volume;
|
|
||||||
MusicManager()->SetMultiplier(p_volume);
|
|
||||||
}
|
|
||||||
@ -1,294 +0,0 @@
|
|||||||
#include "mxmusicmanager.h"
|
|
||||||
|
|
||||||
#include "mxmisc.h"
|
|
||||||
#include "mxticklemanager.h"
|
|
||||||
#include "mxticklethread.h"
|
|
||||||
|
|
||||||
#include <windows.h>
|
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(MxMusicManager, 0x58);
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c05a0
|
|
||||||
MxMusicManager::MxMusicManager()
|
|
||||||
{
|
|
||||||
Init();
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c0630
|
|
||||||
MxMusicManager::~MxMusicManager()
|
|
||||||
{
|
|
||||||
Destroy(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c0690
|
|
||||||
void MxMusicManager::Init()
|
|
||||||
{
|
|
||||||
m_multiplier = 100;
|
|
||||||
InitData();
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c06a0
|
|
||||||
void MxMusicManager::InitData()
|
|
||||||
{
|
|
||||||
m_midiStreamH = 0;
|
|
||||||
m_midiInitialized = FALSE;
|
|
||||||
m_bufferSize = 0;
|
|
||||||
m_bufferCurrentSize = 0;
|
|
||||||
m_bufferOffset = 0;
|
|
||||||
m_bufferCurrentOffset = 0;
|
|
||||||
m_loopCount = 0;
|
|
||||||
m_midiHdrP = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c06c0
|
|
||||||
void MxMusicManager::Destroy(MxBool p_fromDestructor)
|
|
||||||
{
|
|
||||||
if (m_thread) {
|
|
||||||
m_thread->Terminate();
|
|
||||||
if (m_thread) {
|
|
||||||
delete m_thread;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
TickleManager()->UnregisterClient(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_criticalSection.Enter();
|
|
||||||
DeinitializeMIDI();
|
|
||||||
Init();
|
|
||||||
m_criticalSection.Leave();
|
|
||||||
|
|
||||||
if (!p_fromDestructor) {
|
|
||||||
MxAudioManager::Destroy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c0720
|
|
||||||
MxResult MxMusicManager::ResetStream()
|
|
||||||
{
|
|
||||||
MxResult result = FAILURE;
|
|
||||||
|
|
||||||
if (m_midiInitialized) {
|
|
||||||
if (m_bufferCurrentSize == 0) {
|
|
||||||
if (m_loopCount != -1) {
|
|
||||||
m_loopCount += -1;
|
|
||||||
|
|
||||||
if (!m_loopCount) {
|
|
||||||
DeinitializeMIDI();
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ResetBuffer();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_midiHdrP->dwFlags & MHDR_DONE || m_midiHdrP->dwFlags & MHDR_PREPARED) {
|
|
||||||
if (midiOutUnprepareHeader((HMIDIOUT) m_midiStreamH, m_midiHdrP, sizeof(MIDIHDR)) != MMSYSERR_NOERROR) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(m_midiHdrP, 0, sizeof(MIDIHDR));
|
|
||||||
}
|
|
||||||
|
|
||||||
m_bufferCurrentOffset += 4;
|
|
||||||
DWORD length = *((DWORD*) m_bufferCurrentOffset);
|
|
||||||
m_bufferCurrentOffset += sizeof(DWORD);
|
|
||||||
|
|
||||||
m_midiHdrP->lpData = (LPSTR) m_bufferCurrentOffset;
|
|
||||||
m_midiHdrP->dwBufferLength = length;
|
|
||||||
m_midiHdrP->dwBytesRecorded = length;
|
|
||||||
|
|
||||||
if (!midiOutPrepareHeader((HMIDIOUT) m_midiStreamH, m_midiHdrP, sizeof(MIDIHDR))) {
|
|
||||||
if (!midiStreamOut(m_midiStreamH, m_midiHdrP, sizeof(MIDIHDR))) {
|
|
||||||
result = SUCCESS;
|
|
||||||
m_bufferCurrentOffset += length;
|
|
||||||
m_bufferCurrentSize--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
done:
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c07e0
|
|
||||||
void MxMusicManager::ResetBuffer()
|
|
||||||
{
|
|
||||||
m_bufferCurrentOffset = m_bufferOffset;
|
|
||||||
m_bufferCurrentSize = m_bufferSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c07f0
|
|
||||||
void MxMusicManager::SetMIDIVolume()
|
|
||||||
{
|
|
||||||
MxS32 result = (m_volume * m_multiplier) / 0x64;
|
|
||||||
HMIDISTRM streamHandle = m_midiStreamH;
|
|
||||||
|
|
||||||
if (streamHandle) {
|
|
||||||
MxS32 volume = CalculateVolume(result);
|
|
||||||
midiOutSetVolume((HMIDIOUT) streamHandle, volume);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c0820
|
|
||||||
void CALLBACK MxMusicManager::MidiCallbackProc(HDRVR p_hdrvr, UINT p_uMsg, DWORD p_dwUser, DWORD p_dw1, DWORD p_dw2)
|
|
||||||
{
|
|
||||||
if (p_uMsg == MOM_DONE) {
|
|
||||||
((MxMusicManager*) p_dwUser)->ResetStream();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c0840
|
|
||||||
MxResult MxMusicManager::Create(MxU32 p_frequencyMS, MxBool p_createThread)
|
|
||||||
{
|
|
||||||
MxResult status = FAILURE;
|
|
||||||
MxBool locked = FALSE;
|
|
||||||
|
|
||||||
if (MxAudioManager::Create() == SUCCESS) {
|
|
||||||
if (p_createThread) {
|
|
||||||
m_criticalSection.Enter();
|
|
||||||
locked = TRUE;
|
|
||||||
m_thread = new MxTickleThread(this, p_frequencyMS);
|
|
||||||
|
|
||||||
if (!m_thread || m_thread->Start(0, 0) != SUCCESS) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
TickleManager()->RegisterClient(this, p_frequencyMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
status = SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
done:
|
|
||||||
if (status != SUCCESS) {
|
|
||||||
Destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (locked) {
|
|
||||||
m_criticalSection.Leave();
|
|
||||||
}
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c0930
|
|
||||||
void MxMusicManager::Destroy()
|
|
||||||
{
|
|
||||||
Destroy(FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c0940
|
|
||||||
void MxMusicManager::SetVolume(MxS32 p_volume)
|
|
||||||
{
|
|
||||||
MxAudioManager::SetVolume(p_volume);
|
|
||||||
m_criticalSection.Enter();
|
|
||||||
SetMIDIVolume();
|
|
||||||
m_criticalSection.Leave();
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c0970
|
|
||||||
void MxMusicManager::SetMultiplier(MxS32 p_multiplier)
|
|
||||||
{
|
|
||||||
m_criticalSection.Enter();
|
|
||||||
m_multiplier = p_multiplier;
|
|
||||||
SetMIDIVolume();
|
|
||||||
m_criticalSection.Leave();
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c09a0
|
|
||||||
MxS32 MxMusicManager::CalculateVolume(MxS32 p_volume)
|
|
||||||
{
|
|
||||||
MxS32 result = (p_volume * 0xffff) / 100;
|
|
||||||
return (result << 0x10) | result;
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c09c0
|
|
||||||
MxResult MxMusicManager::InitializeMIDI(MxU8* p_data, MxS32 p_loopCount)
|
|
||||||
{
|
|
||||||
MxResult result = FAILURE;
|
|
||||||
|
|
||||||
m_criticalSection.Enter();
|
|
||||||
|
|
||||||
if (!m_midiInitialized) {
|
|
||||||
MxU32 total = midiOutGetNumDevs();
|
|
||||||
MxU32 device = 0;
|
|
||||||
|
|
||||||
for (; device < total; device++) {
|
|
||||||
MIDIOUTCAPSA caps;
|
|
||||||
midiOutGetDevCapsA(device, &caps, sizeof(MIDIOUTCAPSA));
|
|
||||||
if (caps.wTechnology == MOD_FMSYNTH) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (device >= total) {
|
|
||||||
device = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (midiStreamOpen(&m_midiStreamH, &device, 1, (DWORD) MidiCallbackProc, (DWORD) this, CALLBACK_FUNCTION) !=
|
|
||||||
MMSYSERR_NOERROR) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
GetMIDIVolume(m_midiVolume);
|
|
||||||
|
|
||||||
m_midiHdrP = new MIDIHDR();
|
|
||||||
if (!m_midiHdrP) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(m_midiHdrP, 0, sizeof(MIDIHDR));
|
|
||||||
|
|
||||||
MIDIPROPTIMEDIV timediv;
|
|
||||||
timediv.cbStruct = 8;
|
|
||||||
m_bufferOffset = p_data;
|
|
||||||
m_bufferOffset += 0x14;
|
|
||||||
timediv.dwTimeDiv = *((DWORD*) m_bufferOffset);
|
|
||||||
|
|
||||||
if (midiStreamProperty(m_midiStreamH, (LPBYTE) &timediv, MIDIPROP_SET | MIDIPROP_TIMEDIV) != MMSYSERR_NOERROR) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_bufferOffset += 0x14;
|
|
||||||
m_bufferSize = *((MxU32*) m_bufferOffset);
|
|
||||||
m_bufferOffset += sizeof(MxU32);
|
|
||||||
m_loopCount = p_loopCount;
|
|
||||||
m_midiInitialized = TRUE;
|
|
||||||
|
|
||||||
ResetBuffer();
|
|
||||||
if (ResetStream() != SUCCESS) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
SetMIDIVolume();
|
|
||||||
if (midiStreamRestart(m_midiStreamH) != MMSYSERR_NOERROR) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
result = SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
done:
|
|
||||||
m_criticalSection.Leave();
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c0b20
|
|
||||||
void MxMusicManager::DeinitializeMIDI()
|
|
||||||
{
|
|
||||||
m_criticalSection.Enter();
|
|
||||||
|
|
||||||
if (m_midiInitialized) {
|
|
||||||
m_midiInitialized = FALSE;
|
|
||||||
midiStreamStop(m_midiStreamH);
|
|
||||||
midiOutUnprepareHeader((HMIDIOUT) m_midiStreamH, m_midiHdrP, sizeof(MIDIHDR));
|
|
||||||
midiOutSetVolume((HMIDIOUT) m_midiStreamH, m_midiVolume);
|
|
||||||
midiStreamClose(m_midiStreamH);
|
|
||||||
delete m_midiHdrP;
|
|
||||||
InitData();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_criticalSection.Leave();
|
|
||||||
}
|
|
||||||
@ -1,59 +0,0 @@
|
|||||||
#include "mxmusicpresenter.h"
|
|
||||||
|
|
||||||
#include "decomp.h"
|
|
||||||
#include "mxmisc.h"
|
|
||||||
#include "mxmusicmanager.h"
|
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(MxMusicPresenter, 0x54);
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c22c0
|
|
||||||
MxMusicPresenter::MxMusicPresenter()
|
|
||||||
{
|
|
||||||
Init();
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c24e0
|
|
||||||
MxMusicPresenter::~MxMusicPresenter()
|
|
||||||
{
|
|
||||||
Destroy(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c2540
|
|
||||||
void MxMusicPresenter::Init()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c2550
|
|
||||||
void MxMusicPresenter::Destroy(MxBool p_fromDestructor)
|
|
||||||
{
|
|
||||||
if (MusicManager()) {
|
|
||||||
MusicManager()->UnregisterPresenter(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_criticalSection.Enter();
|
|
||||||
Init();
|
|
||||||
m_criticalSection.Leave();
|
|
||||||
|
|
||||||
if (!p_fromDestructor) {
|
|
||||||
MxMediaPresenter::Destroy(FALSE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c25a0
|
|
||||||
MxResult MxMusicPresenter::AddToManager()
|
|
||||||
{
|
|
||||||
MxResult result = FAILURE;
|
|
||||||
|
|
||||||
if (MusicManager()) {
|
|
||||||
result = SUCCESS;
|
|
||||||
MusicManager()->RegisterPresenter(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c25d0
|
|
||||||
void MxMusicPresenter::Destroy()
|
|
||||||
{
|
|
||||||
Destroy(FALSE);
|
|
||||||
}
|
|
||||||
@ -76,14 +76,6 @@ MxVariableTable* VariableTable()
|
|||||||
return MxOmni::GetInstance()->GetVariableTable();
|
return MxOmni::GetInstance()->GetVariableTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100acf30
|
|
||||||
// FUNCTION: BETA10 0x10124faf
|
|
||||||
MxMusicManager* MusicManager()
|
|
||||||
{
|
|
||||||
assert(MxOmni::GetInstance());
|
|
||||||
return MxOmni::GetInstance()->GetMusicManager();
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100acf40
|
// FUNCTION: LEGO1 0x100acf40
|
||||||
// FUNCTION: BETA10 0x10124ff6
|
// FUNCTION: BETA10 0x10124ff6
|
||||||
MxEventManager* EventManager()
|
MxEventManager* EventManager()
|
||||||
|
|||||||
@ -5,9 +5,7 @@
|
|||||||
#include "mxeventpresenter.h"
|
#include "mxeventpresenter.h"
|
||||||
#include "mxflcpresenter.h"
|
#include "mxflcpresenter.h"
|
||||||
#include "mxloopingflcpresenter.h"
|
#include "mxloopingflcpresenter.h"
|
||||||
#include "mxloopingmidipresenter.h"
|
|
||||||
#include "mxloopingsmkpresenter.h"
|
#include "mxloopingsmkpresenter.h"
|
||||||
#include "mxmidipresenter.h"
|
|
||||||
#include "mxpresenter.h"
|
#include "mxpresenter.h"
|
||||||
#include "mxsmkpresenter.h"
|
#include "mxsmkpresenter.h"
|
||||||
#include "mxstillpresenter.h"
|
#include "mxstillpresenter.h"
|
||||||
|
|||||||
@ -11,9 +11,7 @@
|
|||||||
#include "mxeventpresenter.h"
|
#include "mxeventpresenter.h"
|
||||||
#include "mxflcpresenter.h"
|
#include "mxflcpresenter.h"
|
||||||
#include "mxloopingflcpresenter.h"
|
#include "mxloopingflcpresenter.h"
|
||||||
#include "mxloopingmidipresenter.h"
|
|
||||||
#include "mxloopingsmkpresenter.h"
|
#include "mxloopingsmkpresenter.h"
|
||||||
#include "mxmidipresenter.h"
|
|
||||||
#include "mxmisc.h"
|
#include "mxmisc.h"
|
||||||
#include "mxnotificationmanager.h"
|
#include "mxnotificationmanager.h"
|
||||||
#include "mxobjectfactory.h"
|
#include "mxobjectfactory.h"
|
||||||
@ -210,8 +208,8 @@ const char* PresenterNameDispatch(const MxDSAction& p_action)
|
|||||||
format = ((MxDSSound&) p_action).GetMediaFormat();
|
format = ((MxDSSound&) p_action).GetMediaFormat();
|
||||||
switch (format) {
|
switch (format) {
|
||||||
case FOURCC(' ', 'M', 'I', 'D'):
|
case FOURCC(' ', 'M', 'I', 'D'):
|
||||||
name = !p_action.IsLooping() ? MxMIDIPresenter::HandlerClassName()
|
// [library:audio] No MIDI files are used in the retail version of the game.
|
||||||
: MxLoopingMIDIPresenter::HandlerClassName();
|
assert(FALSE);
|
||||||
break;
|
break;
|
||||||
case FOURCC(' ', 'W', 'A', 'V'):
|
case FOURCC(' ', 'W', 'A', 'V'):
|
||||||
name = MxWavePresenter::HandlerClassName();
|
name = MxWavePresenter::HandlerClassName();
|
||||||
|
|||||||
@ -6,7 +6,6 @@
|
|||||||
#include "mxdsmultiaction.h"
|
#include "mxdsmultiaction.h"
|
||||||
#include "mxeventmanager.h"
|
#include "mxeventmanager.h"
|
||||||
#include "mxmisc.h"
|
#include "mxmisc.h"
|
||||||
#include "mxmusicmanager.h"
|
|
||||||
#include "mxnotificationmanager.h"
|
#include "mxnotificationmanager.h"
|
||||||
#include "mxobjectfactory.h"
|
#include "mxobjectfactory.h"
|
||||||
#include "mxomnicreateparam.h"
|
#include "mxomnicreateparam.h"
|
||||||
@ -63,7 +62,6 @@ void MxOmni::Init()
|
|||||||
m_notificationManager = NULL;
|
m_notificationManager = NULL;
|
||||||
m_videoManager = NULL;
|
m_videoManager = NULL;
|
||||||
m_soundManager = NULL;
|
m_soundManager = NULL;
|
||||||
m_musicManager = NULL;
|
|
||||||
m_eventManager = NULL;
|
m_eventManager = NULL;
|
||||||
m_timer = NULL;
|
m_timer = NULL;
|
||||||
m_streamer = NULL;
|
m_streamer = NULL;
|
||||||
@ -149,15 +147,6 @@ MxResult MxOmni::Create(MxOmniCreateParam& p_param)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_param.CreateFlags().CreateMusicManager()) {
|
|
||||||
if ((m_musicManager = new MxMusicManager())) {
|
|
||||||
if (m_musicManager->Create(50, 0) != SUCCESS) {
|
|
||||||
delete m_musicManager;
|
|
||||||
m_musicManager = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (p_param.CreateFlags().CreateEventManager()) {
|
if (p_param.CreateFlags().CreateEventManager()) {
|
||||||
if ((m_eventManager = new MxEventManager())) {
|
if ((m_eventManager = new MxEventManager())) {
|
||||||
if (m_eventManager->Create(50, 0) != SUCCESS) {
|
if (m_eventManager->Create(50, 0) != SUCCESS) {
|
||||||
@ -198,7 +187,6 @@ void MxOmni::Destroy()
|
|||||||
|
|
||||||
delete m_eventManager;
|
delete m_eventManager;
|
||||||
delete m_soundManager;
|
delete m_soundManager;
|
||||||
delete m_musicManager;
|
|
||||||
delete m_videoManager;
|
delete m_videoManager;
|
||||||
delete m_streamer;
|
delete m_streamer;
|
||||||
delete m_timer;
|
delete m_timer;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user