ScummVM API documentation
MADS::Phantom::RSound5 Class Reference

#include <rsound_phantom.h>

Inheritance diagram for MADS::Phantom::RSound5:
MADS::Phantom::RSound MADS::SoundDriver

Public Member Functions

 RSound5 (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 ()
 
ChannelplaySound (int offset)
 
ChannelplaySoundChannels1To5 (int offset)
 
ChannelplaySoundAny (int offset)
 
ChannelplaySoundChannels5To8 (int offset)
 
ChannelplaySoundChannels1To6 (int offset)
 
ChannelplaySoundData (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
 

Detailed Description

RSound5 (rsound.ph5)

Dispatch table layout (funcs_109F0/10A06/10A1C/10A32/10A48 in the disassembly - same 5-bucket sparse-dispatch shape as RSound1-4): commands 0-8 (base class, except command1/3/4/5 - see below) command 16 (this class) commands 24-27 (this class) commands 32-39 (this class); 32 is confirmed nullsub_2 commands 64-78 (this class); 79 is confirmed nullsub_1

command0/2/6/7/8 confirmed to match the shared RSound base exactly (no overrides needed).

command1/command3 are a genuinely different shape from every prior driver: command3's "lower" enable group is channels 1-5 AND 9 (SIX channels), not the base class's 1-4,9 (five channels) - channel 5 has moved from the "upper" group into the "lower" one. Since command1/2/3 are not virtual in the base class, RSound::command1() would still call the base's own command3() even with a derived override present, so command1() needs its own override here too (calling this driver's own command3()) rather than relying on the inherited one. command4/5's upper group is correspondingly narrowed to 3 channels (6,7,8) instead of the usual 4 (5,6,7,8) - both confirmed directly from disassembly.

command39 is notable: its gate leads to this driver's own command3() (the 6-channel lower-group enable), NOT command1() like every other gated multi-load/multi-play command in this driver - confirmed directly from the disassembly ("call rsound_command3"), not a typo.

Member Function Documentation

◆ command()

int MADS::Phantom::RSound5::command ( int  commandId,
int  param 
)
overridevirtual

Execute a player command. Most commands represent sounds to play, but some low number commands also provide control operations.

Parameters
commandIdPlayer ommand to execute.
paramOptional parameter used by a few commands

Implements MADS::SoundDriver.


The documentation for this class was generated from the following file: