ScummVM API documentation
Sherlock::Music Class Reference

Public Member Functions

 Music (SherlockEngine *vm, Audio::Mixer *mixer)
 
void syncMusicSettings ()
 
bool loadSong (int songNumber)
 
bool loadSong (const Common::String &songName)
 
void startSong ()
 
void freeSong ()
 
void stopMusic ()
 
bool isPlaying ()
 
uint32 getCurrentPosition ()
 
bool waitUntilMSec (uint32 msecTarget, uint32 maxMSec, uint32 additionalDelay, uint32 noMusicDelay)
 
void setMusicVolume (int volume)
 
void getSongNames (Common::StringArray &songs)
 
void checkSongProgress ()
 

Public Attributes

bool _musicPlaying
 
bool _musicOn
 
int _musicVolume
 
bool _midiOption
 
Common::String _currentSongName
 
Common::String _nextSongName
 

Member Function Documentation

◆ syncMusicSettings()

void Sherlock::Music::syncMusicSettings ( )

Saves sound-related settings

◆ loadSong() [1/2]

bool Sherlock::Music::loadSong ( int  songNumber)

Load a specified song

◆ loadSong() [2/2]

bool Sherlock::Music::loadSong ( const Common::String songName)

Load a specified song

◆ startSong()

void Sherlock::Music::startSong ( )

Start playing a song

◆ freeSong()

void Sherlock::Music::freeSong ( )

Free any currently loaded song

◆ stopMusic()

void Sherlock::Music::stopMusic ( )

Stop playing the music

◆ setMusicVolume()

void Sherlock::Music::setMusicVolume ( int  volume)

Sets the volume of the MIDI music with a value ranging from 0 to 127

◆ getSongNames()

void Sherlock::Music::getSongNames ( Common::StringArray songs)

Gets the names of all the songs in the game. Used by the debugger.

◆ checkSongProgress()

void Sherlock::Music::checkSongProgress ( )

Checks to see if the currently playing song has finished, then the music specified in _nextSongName will be started


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