ScummVM API documentation
AGOS::MidiPlayer Class Reference

Public Member Functions

 MidiPlayer (AGOSEngine *vm)
 
int open ()
 
void load (Common::SeekableReadStream *in, int32 size=-1, bool sfx=false)
 
void play (int track=0, bool sfx=false, bool sfxUsesRhythm=false, bool queued=false)
 
bool usesMT32Data () const
 
bool hasMidiSfx () const
 
void setLoop (bool loop)
 
void setSimon2Remapping (bool remap)
 
void queueTrack (int track, bool loop)
 
bool isPlaying (bool checkQueued=false)
 
void stop (bool sfx=false)
 
void pause (bool b)
 
void fadeOut ()
 
void syncSoundSettings ()
 

Static Protected Member Functions

static void onTimer (void *data)
 

Protected Attributes

AGOSEngine_vm
 
Common::Mutex _mutex
 
MidiDriver_driver
 
MidiDriver_Multisource_driverMsMusic
 
MidiDriver_Multisource_driverMsSfx
 
MidiParser_parserMusic
 
byte * _musicData
 
MidiParser_parserSfx
 
byte * _sfxData
 
SfxParser_Accolade_parserSfxAccolade
 
bool _paused
 
byte _queuedTrack
 
bool _loopQueuedTrack
 

Static Protected Attributes

static const byte SIMON2_TRACK10_GM_MT32_INSTRUMENT_REMAPPING []
 

Member Function Documentation

◆ play()

void AGOS::MidiPlayer::play ( int  track = 0,
bool  sfx = false,
bool  sfxUsesRhythm = false,
bool  queued = false 
)

Plays the currently loaded music or SFX data. If the loaded data has multiple tracks, specify track to select the track to play.

Parameters
trackThe track to play. Default 0.
sfxTrue if the SFX data should be played, otherwise the loaded music data will be played. Default false.
sfxUsesRhythmTrue if the sound effect uses OPL rhythm instruments. Default false.
queuedTrue if this track was queued; false if it was played directly. Default false.

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