#include <music.h>
Public Member Functions | |
virtual void | setMusicVolume (int vol)=0 |
virtual void | setSfxVolume (int vol) |
virtual void | startSound (int sound)=0 |
virtual void | startSoundWithTrackID (int sound, int track) |
virtual void | stopSound (int sound)=0 |
virtual void | stopAllSounds ()=0 |
virtual int | getSoundStatus (int sound) const =0 |
virtual int | getMusicTimer () |
virtual void | setQuality (int qual) |
virtual void | toggleMusic (bool enable) |
virtual void | toggleSoundEffects (bool enable) |
void | saveLoadWithSerializer (Common::Serializer &ser) override |
virtual void | restoreAfterLoad () |
Pure virtual base class for the various music/sound engines used in Scumm games. In particular, the iMuse code provides a subclass of this. There are several other subclasses providing music and sound capabilities for several Scumm games. Having this base class for all music engines allows uniform access to the core music/sound functionality, thus simplifying the client code.
Instantiated by class Scumm.
|
pure virtual |
Set the output volume for music. Also used, if the inheriting class doesn't distinguish between music and sfx.
vol | the new output volume |
Implemented in Scumm::IMuseInternal, Scumm::Player_AppleII, Scumm::Player_Towns_v2, Scumm::Player_Towns_v1, Scumm::Player_SID, Scumm::Player_NES, Scumm::Player_AD, Scumm::Player_V3A, Scumm::Player_V4A, Scumm::Player_V2A, Scumm::Player_V2, Scumm::Player_V2CMS, and Scumm::Player_HE.
|
inlinevirtual |
Set the output volume for sound effects. No need to implement this in the inheriting class if it doesn't distinguish between music and sfx.
vol | the new output volume |
Reimplemented in Scumm::IMuseInternal, and Scumm::Player_Towns.
|
pure virtual |
Start playing the sound with the given id.
sound | the sound to start |
Implemented in Scumm::IMuseInternal, Scumm::Player_AppleII, Scumm::Player_Towns_v2, Scumm::Player_Towns_v1, Scumm::Player_SID, Scumm::Player_NES, Scumm::Player_AD, Scumm::Player_V3A, Scumm::Player_V4A, Scumm::Player_V2A, Scumm::Player_V2, Scumm::Player_V2CMS, Scumm::Player_HE, and Scumm::Player_V1.
|
inlinevirtual |
Start playing the sound with the given id and track id.
sound | the sound to start |
track | the track to start |
Reimplemented in Scumm::Player_HE.
|
pure virtual |
Stop playing the sound with the given id.
sound | the sound to stop |
Implemented in Scumm::IMuseInternal, Scumm::Player_AppleII, Scumm::Player_Towns_v2, Scumm::Player_Towns_v1, Scumm::Player_SID, Scumm::Player_NES, Scumm::Player_AD, Scumm::Player_V3A, Scumm::Player_V4A, Scumm::Player_V2A, Scumm::Player_V2, Scumm::Player_V2CMS, Scumm::Player_HE, and Scumm::Player_V1.
|
pure virtual |
Start playing all currently playing sounds.
Implemented in Scumm::IMuseInternal, Scumm::Player_AppleII, Scumm::Player_Towns_v2, Scumm::Player_Towns_v1, Scumm::Player_SID, Scumm::Player_NES, Scumm::Player_AD, Scumm::Player_V3A, Scumm::Player_V4A, Scumm::Player_V2A, Scumm::Player_V2, Scumm::Player_V2CMS, Scumm::Player_HE, and Scumm::Player_V1.
|
pure virtual |
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.
sound | the sound to for which we want the status |
Implemented in Scumm::IMuseInternal, Scumm::Player_AppleII, Scumm::Player_Towns_v2, Scumm::Player_Towns_v1, Scumm::Player_SID, Scumm::Player_NES, Scumm::Player_AD, Scumm::Player_V3A, Scumm::Player_V4A, Scumm::Player_V2A, Scumm::Player_V2, Scumm::Player_V2CMS, Scumm::Player_HE, and Scumm::Player_Towns.
|
inlinevirtual |
Get the value of the music timer. Used for synchronising scripts with the music/sound.
Reimplemented in Scumm::IMuseInternal, Scumm::Player_AppleII, Scumm::Player_V2Base, Scumm::Player_SID, Scumm::Player_AD, Scumm::Player_V3A, Scumm::Player_V4A, Scumm::Player_V2A, Scumm::Player_V2CMS, Scumm::Player_HE, and Scumm::Player_V1.
|
inlinevirtual |
Set sound quality if applicable (used for Macintosh sound)
qual | quality setting (range and meaning are specific to the respective player) |
Reimplemented in Scumm::IMuse.
|
inlinevirtual |
Notify player that the sound is supposed to be enabled/disabled (used for Macintosh sound)
|
inlineoverridevirtual |
Save or load the music state.
Implements Common::Serializable.
Reimplemented in Scumm::Player_Towns_v2, Scumm::Player_Towns_v1, Scumm::Player_AD, Scumm::Player_V4A, and Scumm::Player_Towns.
|
inlinevirtual |
Performs necessary post-load operations on the sound engine, like restarting of music tracks or looping pcm sounds. Some targets get this done via scripts but others don't. Currently, this is used for FM-Towns and Mac.
Reimplemented in Scumm::Player_Towns_v1, Scumm::Player_V4A, and Scumm::Player_Towns.