25void MxMIDIPresenter::Init()
46 if (!p_fromDestructor) {
virtual MxS32 GetVolume()
[AI] Returns the current runtime audio volume for this presenter (0-100).
MxS32 m_volume
[AI] Current playback volume, range 0-100 (percent).
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.
virtual MxLong GetElapsedTime()
[AI] Gets elapsed time for this action since the last time field 0x90 was set.
MxLong GetTime()
[AI] Returns the time (timestamp or tick) associated with this chunk. [AI]
MxU8 * GetData()
[AI] Returns a pointer to the start of the data payload. [AI]
[AI] Represents a sound action extracted from an SI script and used in the data-driven action system.
void FreeDataChunk(MxStreamChunk *p_chunk)
[AI] Frees (deletes) a data chunk if it's found in the consumed data list; also forcibly deletes sing...
MIDI presenter class responsible for handling playback of MIDI music streams.
void DoneTickle() override
Tickle state signaling that playback is done.
void ReadyTickle() override
Tickle state for preparing the presenter before playback starts.
MxMIDIPresenter()
Constructs an MxMIDIPresenter object and initializes its data.
~MxMIDIPresenter() override
Destructor, ensures proper resource cleanup for MIDI playback.
void EndAction() override
Called when playback/action is finished or needs to be ended.
void SetVolume(MxS32 p_volume) override
Sets the playback volume for MIDI music.
MxStreamChunk * m_chunk
Current MIDI data chunk being streamed/played.
void Destroy() override
Cleanup resources, free MIDI data, and deinitialize MIDI.
MxResult PutData() override
Actually provides MIDI stream data to the playback system.
void StartingTickle() override
Tickle state for initializing MIDI playback of the current chunk.
void StreamingTickle() override
Tickle state for streaming (playing) the MIDI chunk.
void DeinitializeMIDI()
Stops playback and releases all MIDI streaming resources.
void SetMultiplier(MxS32 p_multiplier)
Sets the volume multiplier for scaling volume output.
void Destroy() override
[AI] Destroys this presenter, safely unregisters from music manager.
virtual void ParseExtra()
[AI] Parses additional data from the associated action for configuration or world interaction.
void ProgressTickleState(TickleState p_tickleState)
[AI] Helper for advancing the presenter's tickle state and updating transition history.
MxDSAction * m_action
[AI] The associated action currently being presented by this presenter.
TickleState m_currentTickleState
[AI] Current state in the tickle lifecycle.
@ e_done
[AI] Completed processing the current action.
@ e_starting
[AI] In the process of starting playback/presentation.
@ e_streaming
[AI] Streaming or rendering actively.
MxCriticalSection m_criticalSection
[AI] Thread synchronization for presenter state and data.
[AI] Represents a streamable chunk of data, typically sourced from a media buffer and designed for no...
#define DECOMP_SIZE_ASSERT(T, S)
#define NULL
[AI] Null pointer value (C/C++ semantics).
#define SUCCESS
[AI] Used to indicate a successful operation in result codes.
#define AUTOLOCK(CS)
[AI] Macro for automatic locking using the MxAutoLock class. This macro instantiates an MxAutoLock ob...
MxMusicManager * MusicManager()
[AI] Returns the music manager, controlling playback of background music tracks.