#include <rsound_phantom.h>
Public Member Functions | |
| RSound3 (Audio::Mixer *mixer) | |
| int | command (int commandId, int param) override |
Public Member Functions inherited from MADS::Phantom::RSound | |
| RSound (Audio::Mixer *mixer, const Common::Path &filename, int dataOffset, int dataSize, int sysExOffset) | |
| int | stop () override |
| int | poll () override |
| void | noise () override |
| void | setVolume (int volume) override |
| int | getFrameCounter () |
Public Member Functions inherited from MADS::SoundDriver | |
| SoundDriver (Audio::Mixer *mixer, const Common::Path &filename, int dataOffset, int dataSize) | |
Additional Inherited Members | |
Public Attributes inherited from MADS::Phantom::RSound | |
| Channel | _channels [9] |
| int | _frameCounter |
| bool | _isDisabled |
| int | _pollResult |
Protected Member Functions inherited from MADS::Phantom::RSound | |
| byte * | loadData (int offset) |
| void | resetChannelRange (int first, int last) |
| virtual void | checkRandomAmbianceTrigger () |
| void | resultCheck () |
| Channel * | playSound (int offset) |
| Channel * | playSoundChannels1To5 (int offset) |
| Channel * | playSoundAny (int offset) |
| Channel * | playSoundChannels5To8 (int offset) |
| Channel * | playSoundChannels1To6 (int offset) |
| Channel * | playSoundData (byte *pData, int startingChannel, int freeScanEnd, int fallbackScanEnd) |
| bool | isSoundActive (byte *pData) |
| int | getRandomNumber () |
| void | sendMidiByte (byte value) |
| void | sendStatus (int midiChannel, byte statusNibble) |
| void | sendNoteOn (int midiChannel, int note, int velocity) |
| void | sendProgramChange (int midiChannel, int program) |
| void | sendVolume (int midiChannel, int volume) |
| void | sendVolumeCC (int midiChannel, int volume) |
| void | resetPitchBend (int midiChannel) |
| void | sendPitchBend (int midiChannel, int value) |
| void | sendPan (int midiChannel, int value) |
| void | muteChannel (int midiChannel) |
| void | sendGmReset (int count) |
| void | sendSysExData (const byte *pData) |
| void | sendSysEx (int offset) |
| void | sendPatchInitSequence () |
| void | sendReverbSysEx (int mode, int time, int level) |
| void | noOpHandler (int param) |
| virtual int | command0 () |
| int | command1 () |
| int | command2 () |
| int | command3 () |
| void | enableUpperChannels () |
| void | resetAndGmResetUpperChannels () |
| int | command6 () |
| int | command7 () |
| int | command8 () |
| int | nullCommand () |
Protected Member Functions inherited from MADS::SoundDriver | |
| Common::MemoryReadStream | getDataStream (int offset) const |
Protected Attributes inherited from MADS::Phantom::RSound | |
| int | _commandParam |
| int | _randomAmbianceTriggerFlag |
| int | _fadeCheckPeriod |
Protected Attributes inherited from MADS::SoundDriver | |
| Audio::Mixer * | _mixer |
| Common::Array< byte > | _soundData |
| Common::Mutex | _driverMutex |
RSound3 (rsound.ph3)
Dispatch table layout (funcs_10A0C/10A22/10A38/10A4E/10A64 in the disassembly - same 5-bucket sparse-dispatch shape as RSound1/RSound2, represented here as a single flat array): commands 0-8 (base class, except command4/5 - see RSound::command4/5; index 3 aliases directly to command1's full handler - see below) command 16 (this class - a plain gated 4-channel load) commands 24-27 (this class) commands 32-36 (this class); 37 is confirmed nullsub_1 commands 64-75 (this class); 76 is confirmed nullsub_1
command0/1/2/3/6/7/8 all confirmed to match the shared RSound base exactly (no overrides needed) - including a notable dispatch-table detail: command index 3 in this driver's dispatch table is a plain jmp straight into command1's full body (lower channels 1-4,9 AND upper channels 5-8), NOT the "inner" lower-only logic that the base class's own command3() implements - so the command list must map index 3 to &RSound::command1, not &RSound::command3. command0's disassembly is confirmed to genuinely omit the _isDisabled save/restore wrap that RSound::command0() has, but with no observable behavioral difference, so no override is needed there.
command4()/command5() are also a genuinely different shape from RSound1/RSound2: both gate on TWO chained isSoundActive() checks (0x2AA6 then 0x1E30, each an independent early-out per the pop-return-address mechanic) rather than one, and command4()'s tail (sub_10832) resets only channels 5-9 (indices 4-8) - NOT channels 4-9 (indices 3-8) like the shared resetAndGmResetUpperChannels() - so it can't reuse that helper and calls resetChannelRange() directly instead.
|
overridevirtual |
Execute a player command. Most commands represent sounds to play, but some low number commands also provide control operations.
| commandId | Player ommand to execute. |
| param | Optional parameter used by a few commands |
Implements MADS::SoundDriver.