1#ifndef MXWAVEPRESENTER_H
2#define MXWAVEPRESENTER_H
60 return "MxWavePresenter";
[AI] Concrete presenter for sound playback and control within the LEGO Island engine.
MxBool IsA(const char *p_name) const override
[AI] Tests if this instance is a MxSoundPresenter or derived type.
[AI] Represents a streamable chunk of data, typically sourced from a media buffer and designed for no...
[AI] Presenter for streaming and managing PCM waveform audio via DirectSound buffer.
MxResult AddToManager() override
[AI] Registers this presenter with the global MxSoundManager.
virtual void Pause()
[AI] Pauses audio playback, halting sound buffer while keeping position for resume.
void Enable(MxBool p_enable) override
[AI] Enables or disables media stream playback and transitions state as needed.
static const char * HandlerClassName()
[AI] Returns the name identifying this presenter class.
MxU32 m_lockSize
[AI] Size in bytes for current buffer lock/write operation.
void ParseExtra() override
[AI] Parses additional data from the associated action for configuration or world interaction.
MxU8 m_writtenChunks
[AI] Number of chunks written into the DirectSound buffer.
MxS8 GetPlayedChunks()
[AI] Returns the index of the currently played chunk in the sound buffer.
void StartingTickle() override
[AI] Handles actions required when first starting presentation. Advances to streaming state.
void LoopChunk(MxStreamChunk *p_chunk) override
[AI] Adds a chunk to the looping chunk list, making it available for repeated playback.
void ReadyTickle() override
[AI] Handles the transition and setup for the Ready state. Parses extra action data and advances stat...
LPDIRECTSOUNDBUFFER m_dsBuffer
[AI] DirectSound buffer handling PCM sample playback.
void EndAction() override
[AI] Ends the media playback action, releasing all resources, notifying listeners if necessary.
MxWavePresenter()
[AI] Constructs MxWavePresenter and initializes all members.
virtual MxBool IsPaused()
[AI] Returns pause state of the current audio playback.
void Destroy() override
[AI] Explicit resource release.
MxS8 m_silenceData
[AI] Value written as silence into buffer when needed (format-dependent, e.g., 0 or 0x7F).
void StreamingTickle() override
[AI] Per-frame update when streaming the media stream.
virtual void Resume()
[AI] Resumes audio playback after a pause, restarting sound from the current buffer position.
MxBool IsA(const char *p_name) const override
[AI] Checks if this instance is of the given class or a parent class.
void SetVolume(MxS32 p_volume) override
[AI] Sets the presentation volume for playback (0-100).
void DoneTickle() override
[AI] Per-frame update for the "done" state; transitions this presenter to idle and ends the action.
void Init()
[AI] Initializes all member variables to safe/empty values.
MxBool FUN_100b1ba0()
[AI] Checks if more chunks can or should be streamed into buffer.
MxBool m_started
[AI] TRUE if audio playback has started on the buffer.
MxBool m_is3d
[AI] TRUE if buffer/audio is 3D spatialized.
MxResult PutData() override
[AI] Allows the presenter to submit pending results or output to the engine.
MxBool m_paused
[AI] TRUE if playback is currently paused.
~MxWavePresenter() override
[AI] Destroys the wave presenter and releases all associated resources, including sound buffers and m...
MxU32 m_chunkLength
[AI] Size in bytes for one audio streaming chunk.
const char * ClassName() const override
[AI] Returns the class name string at runtime.
void WriteToSoundBuffer(void *p_audioPtr, MxU32 p_length)
[AI] Writes a block of audio data to the DirectSound buffer at the correct chunk offset.
WaveFormat * m_waveFormat
[AI] Pointer to the wave format struct for buffer description/allocation.
struct IDirectSoundBuffer * LPDIRECTSOUNDBUFFER