ScummVM API documentation
Scumm::Player_HE Class Reference
Inheritance diagram for Scumm::Player_HE:
Scumm::MusicEngine MidiDriver Common::Serializable MidiDriver_BASE

Public Member Functions

 Player_HE (ScummEngine *scumm)
 
void setMusicVolume (int vol) override
 
void startSound (int sound) override
 
void startSoundWithTrackID (int sound, int track) override
 
void stopSound (int sound) override
 
void stopAllSounds () override
 
int getSoundStatus (int sound) const override
 
int getMusicTimer () override
 
int open () override
 
bool isOpen () const override
 
void close () override
 
void setTimerCallback (void *timerParam, Common::TimerManager::TimerProc timerProc) override
 
uint32 getBaseTempo () override
 
MidiChannelallocateChannel () override
 
MidiChannelgetPercussionChannel () override
 
void send (uint32 b) override
 
- Public Member Functions inherited from Scumm::MusicEngine
virtual void setSfxVolume (int vol)
 
virtual void setQuality (int qual)
 
virtual void toggleMusic (bool enable)
 
virtual void toggleSoundEffects (bool enable)
 
void saveLoadWithSerializer (Common::Serializer &ser) override
 
virtual void restoreAfterLoad ()
 
- Public Member Functions inherited from MidiDriver
void midiDriverCommonSend (uint32 b)
 
void midiDriverCommonSysEx (const byte *msg, uint16 length)
 
virtual uint32 property (int prop, uint32 param)
 
virtual void setPitchBendRange (byte channel, uint range)
 
void sendMT32Reset ()
 
void sendGMReset ()
 
virtual void setEngineSoundFont (Common::SeekableReadStream *soundFontData)
 
virtual bool acceptsSoundFontData ()
 
- Public Member Functions inherited from MidiDriver_BASE
virtual void send (int8 source, uint32 b)
 
void send (byte status, byte firstOp, byte secondOp)
 
void send (int8 source, byte status, byte firstOp, byte secondOp)
 
virtual void sysEx (const byte *msg, uint16 length)
 
virtual uint16 sysExNoDelay (const byte *msg, uint16 length)
 
virtual void metaEvent (byte type, byte *data, uint16 length)
 
virtual void metaEvent (int8 source, byte type, byte *data, uint16 length)
 
virtual void stopAllNotes (bool stopSustainedNotes=false)
 
virtual bool isReady (int8 source=-1)
 

Additional Inherited Members

- Public Types inherited from MidiDriver
enum  DeviceStringType { kDriverName, kDriverId, kDeviceName, kDeviceId }
 
enum  { MERR_CANNOT_CONNECT = 1, MERR_DEVICE_NOT_AVAILABLE = 3, MERR_ALREADY_OPEN = 4 }
 
enum  {
  PROP_OLD_ADLIB = 2, PROP_CHANNEL_MASK = 3, PROP_SCUMM_OPL3 = 4, PROP_USER_VOLUME_SCALING = 5,
  PROP_MIDI_DATA_REVERSE_PANNING = 6, PROP_OPL_ACCURACY_MODE = 7, PROP_OPL_CHANNEL_ALLOCATION_MODE = 8, PROP_MILES_VERSION = 9,
  PROP_OPL_RHYTHM_MODE_IGNORE_NOTE_OFF = 10
}
 
typedef uint32 DeviceHandle
 
- Static Public Member Functions inherited from MidiDriver
static Common::String musicType2GUIO (uint32 musicType)
 
static MidiDrivercreateMidi (DeviceHandle handle)
 
static DeviceHandle detectDevice (int flags)
 
static DeviceHandle getDeviceHandle (const Common::String &identifier)
 
static bool checkDevice (DeviceHandle handle, int flags, bool quiet)
 
static MusicType getMusicType (DeviceHandle handle)
 
static Common::String getDeviceString (DeviceHandle handle, DeviceStringType type)
 
static const char * getErrorName (int error_code)
 
- Static Public Attributes inherited from MidiDriver
static const byte _mt32ToGm [128]
 
static const byte _gmToMt32 [128]
 
- Static Public Attributes inherited from MidiDriver_BASE
static const uint8 MIDI_CHANNEL_COUNT = 16
 
static const uint8 MIDI_RHYTHM_CHANNEL = 9
 
static const byte MIDI_COMMAND_NOTE_OFF = 0x80
 
static const byte MIDI_COMMAND_NOTE_ON = 0x90
 
static const byte MIDI_COMMAND_POLYPHONIC_AFTERTOUCH = 0xA0
 
static const byte MIDI_COMMAND_CONTROL_CHANGE = 0xB0
 
static const byte MIDI_COMMAND_PROGRAM_CHANGE = 0xC0
 
static const byte MIDI_COMMAND_CHANNEL_AFTERTOUCH = 0xD0
 
static const byte MIDI_COMMAND_PITCH_BEND = 0xE0
 
static const byte MIDI_COMMAND_SYSTEM = 0xF0
 
static const byte MIDI_CONTROLLER_BANK_SELECT_MSB = 0x00
 
static const byte MIDI_CONTROLLER_MODULATION = 0x01
 
static const byte MIDI_CONTROLLER_DATA_ENTRY_MSB = 0x06
 
static const byte MIDI_CONTROLLER_VOLUME = 0x07
 
static const byte MIDI_CONTROLLER_BALANCE = 0x08
 
static const byte MIDI_CONTROLLER_PANNING = 0x0A
 
static const byte MIDI_CONTROLLER_EXPRESSION = 0x0B
 
static const byte MIDI_CONTROLLER_BANK_SELECT_LSB = 0x20
 
static const byte MIDI_CONTROLLER_DATA_ENTRY_LSB = 0x26
 
static const byte MIDI_CONTROLLER_SUSTAIN = 0x40
 
static const byte MIDI_CONTROLLER_PORTAMENTO = 0x41
 
static const byte MIDI_CONTROLLER_SOSTENUTO = 0x42
 
static const byte MIDI_CONTROLLER_SOFT = 0x43
 
static const byte MIDI_CONTROLLER_REVERB = 0x5B
 
static const byte MIDI_CONTROLLER_CHORUS = 0x5D
 
static const byte MIDI_CONTROLLER_RPN_LSB = 0x64
 
static const byte MIDI_CONTROLLER_RPN_MSB = 0x65
 
static const byte MIDI_CONTROLLER_ALL_SOUND_OFF = 0x78
 
static const byte MIDI_CONTROLLER_RESET_ALL_CONTROLLERS = 0x79
 
static const byte MIDI_CONTROLLER_ALL_NOTES_OFF = 0x7B
 
static const byte MIDI_CONTROLLER_OMNI_ON = 0x7C
 
static const byte MIDI_CONTROLLER_OMNI_OFF = 0x7D
 
static const byte MIDI_CONTROLLER_MONO_ON = 0x7E
 
static const byte MIDI_CONTROLLER_POLY_ON = 0x7F
 
static const uint16 MIDI_RPN_PITCH_BEND_SENSITIVITY = 0x0000
 
static const uint16 MIDI_RPN_MASTER_TUNING_FINE = 0x0001
 
static const uint16 MIDI_RPN_MASTER_TUNING_COARSE = 0x0002
 
static const uint16 MIDI_RPN_NULL = 0x7F7F
 
static const uint8 MIDI_META_END_OF_TRACK = 0x2F
 
static const uint8 MIDI_META_SEQUENCER = 0x7F
 
static const uint16 MIDI_PITCH_BEND_DEFAULT = 0x2000
 
static const uint8 MIDI_PANNING_DEFAULT = 0x40
 
static const uint8 MIDI_EXPRESSION_DEFAULT = 0x7F
 
static const uint16 MIDI_MASTER_TUNING_FINE_DEFAULT = 0x2000
 
static const uint8 MIDI_MASTER_TUNING_COARSE_DEFAULT = 0x40
 
static const uint8 MT32_PITCH_BEND_SENSITIVITY_DEFAULT = 0x0C
 
static const uint8 GM_PITCH_BEND_SENSITIVITY_DEFAULT = 0x02
 
static const uint8 GS_RHYTHM_FIRST_NOTE = 0x1B
 
static const uint8 GS_RHYTHM_LAST_NOTE = 0x58
 
- Protected Member Functions inherited from MidiDriver_BASE
void midiDumpInit ()
 
int midiDumpVarLength (const uint32 &delta)
 
void midiDumpDelta ()
 
void midiDumpDo (uint32 b)
 
void midiDumpSysEx (const byte *msg, uint16 length)
 
void midiDumpFinish ()
 
- Protected Attributes inherited from MidiDriver_BASE
bool _midiDumpEnable
 
uint32 _prevMillis
 
Common::Array< byte > _midiDumpCache
 

Member Function Documentation

◆ setMusicVolume()

void Scumm::Player_HE::setMusicVolume ( int  vol)
overridevirtual

Set the output volume for music. Also used, if the inheriting class doesn't distinguish between music and sfx.

Parameters
volthe new output volume

Implements Scumm::MusicEngine.

◆ startSound()

void Scumm::Player_HE::startSound ( int  sound)
inlineoverridevirtual

Start playing the sound with the given id.

Parameters
soundthe sound to start

Implements Scumm::MusicEngine.

◆ startSoundWithTrackID()

void Scumm::Player_HE::startSoundWithTrackID ( int  sound,
int  track 
)
overridevirtual

Start playing the sound with the given id and track id.

Parameters
soundthe sound to start
trackthe track to start

Reimplemented from Scumm::MusicEngine.

◆ stopSound()

void Scumm::Player_HE::stopSound ( int  sound)
overridevirtual

Stop playing the sound with the given id.

Parameters
soundthe sound to stop

Implements Scumm::MusicEngine.

◆ stopAllSounds()

void Scumm::Player_HE::stopAllSounds ( )
overridevirtual

Start playing all currently playing sounds.

Implements Scumm::MusicEngine.

◆ getSoundStatus()

int Scumm::Player_HE::getSoundStatus ( int  sound) const
overridevirtual

Query the status of the sound with the given id. Usually this is just a boolean telling us whether the sound is playing or not.

Parameters
soundthe sound to for which we want the status
Returns
the status of the specified sound

Implements Scumm::MusicEngine.

◆ getMusicTimer()

int Scumm::Player_HE::getMusicTimer ( )
overridevirtual

Get the value of the music timer. Used for synchronising scripts with the music/sound.

Returns
the music timer

Reimplemented from Scumm::MusicEngine.

◆ open()

int Scumm::Player_HE::open ( )
overridevirtual

Open the midi driver.

Returns
0 if successful, otherwise an error code.

Implements MidiDriver.

◆ isOpen()

bool Scumm::Player_HE::isOpen ( ) const
overridevirtual

Check whether the midi driver has already been opened.

Implements MidiDriver.

◆ close()

void Scumm::Player_HE::close ( )
overridevirtual

Close the midi driver.

Implements MidiDriver.

◆ getBaseTempo()

uint32 Scumm::Player_HE::getBaseTempo ( )
overridevirtual

The time in microseconds between invocations of the timer callback.

Implements MidiDriver.

◆ send()

void Scumm::Player_HE::send ( uint32  b)
overridevirtual

Output a packed midi command to the midi stream. The 'lowest' byte (i.e. b & 0xFF) is the status code, then come (if used) the first and second opcode.

Implements MidiDriver_BASE.


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