Isle
Loading...
Searching...
No Matches
mxaudiomanager.cpp
Go to the documentation of this file.
1#include "mxaudiomanager.h"
2
4
5// GLOBAL: LEGO1 0x10102108
6MxS32 MxAudioManager::g_count = 0;
7
8// FUNCTION: LEGO1 0x100b8d00
10{
11 Init();
12}
13
14// FUNCTION: LEGO1 0x100b8d90
16{
18}
19
20// FUNCTION: LEGO1 0x100b8df0
22{
23 m_volume = 100;
24}
25
26// FUNCTION: LEGO1 0x100b8e00
27void MxAudioManager::Destroy(MxBool p_fromDestructor)
28{
30 g_count--;
31 Init();
33
34 if (!p_fromDestructor) {
36 }
37}
38
39// FUNCTION: LEGO1 0x100b8e40
41{
42 MxResult result = FAILURE;
43 MxBool success = FALSE;
44
47 success = TRUE;
48 result = SUCCESS;
49 g_count++;
50 }
51
52 if (result) {
53 Destroy();
54 }
55
56 if (success) {
58 }
59
60 return result;
61}
62
63// FUNCTION: LEGO1 0x100b8e90
65{
67}
68
69// FUNCTION: LEGO1 0x100b8ea0
71{
73 m_volume = p_volume;
75}
[AI] Audio subsystem manager for the LEGO Island engine, responsible for managing audio playback and ...
MxAudioManager()
[AI] Constructs the audio manager and initializes default volume.
MxResult Create() override
[AI] Initializes audio subsystem resources and registers an instance for global audio management.
virtual void SetVolume(MxS32 p_volume)
[AI] Sets the current global audio volume.
MxS32 m_volume
[AI] Holds the current global audio volume for the game.
~MxAudioManager() override
[AI] Destructs the audio manager and handles cleanup of resources.
void Destroy() override
[AI] Tears down the audio subsystem instance and unregisters it from global management.
void Init()
[AI] Initializes audio manager state, setting default volume and other relevant fields.
void Enter()
[AI] Acquires/gains entry to the critical section or mutex, blocking if not available.
void Leave()
[AI] Releases/leaves the critical section or mutex.
MxCriticalSection m_criticalSection
[AI] Critical section object used for guarding access to the presenter list and internal members for ...
virtual void Destroy()
[AI] Destroys all registered presenters and resets the internal state, ensuring safe resource disposa...
virtual MxResult Create()
[AI] Allocates and initializes the internal presenter list for this manager, ensuring thread safety.
#define TRUE
Definition: d3drmdef.h:28
#define FALSE
Definition: d3drmdef.h:27
#define DECOMP_SIZE_ASSERT(T, S)
Definition: decomp.h:19
#define FAILURE
[AI] Used to indicate a failed operation in result codes.
Definition: legotypes.h:34
#define SUCCESS
[AI] Used to indicate a successful operation in result codes.
Definition: legotypes.h:30
MxU8 MxBool
[AI]
Definition: mxtypes.h:124
MxLong MxResult
[AI]
Definition: mxtypes.h:106
signed int MxS32
[AI]
Definition: mxtypes.h:38