ScummVM API documentation
Scumm::Player_Towns Class Referenceabstract
Inheritance diagram for Scumm::Player_Towns:
Scumm::MusicEngine Common::Serializable Scumm::Player_Towns_v1 Scumm::Player_Towns_v2

Classes

struct  PcmCurrentSound
 

Public Member Functions

 Player_Towns (ScummEngine *vm, bool isVersion2)
 
virtual bool init ()=0
 
void setSfxVolume (int vol) override
 
int getSoundStatus (int sound) const override
 
virtual int32 doCommand (int numargs, int args[])=0
 
void saveLoadWithSerializer (Common::Serializer &ser) override
 
void restoreAfterLoad () override
 
virtual int getCurrentCdaSound ()
 
virtual int getCurrentCdaVolume ()
 
virtual void setVolumeCD (int left, int right)
 
virtual void setSoundVolume (int sound, int left, int right)
 
virtual void setSoundNote (int sound, int note)
 
- Public Member Functions inherited from Scumm::MusicEngine
virtual void setMusicVolume (int vol)=0
 
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 getMusicTimer ()
 
virtual void setQuality (int qual)
 

Protected Member Functions

void playPcmTrack (int sound, const uint8 *data, int velo=0, int pan=64, int note=0, int priority=0)
 
void stopPcmTrack (int sound)
 
int allocatePcmChannel (int sound, int sfxChanRelIndex, uint32 priority)
 

Protected Attributes

struct Scumm::Player_Towns::PcmCurrentSound _pcmCurrentSound [9]
 
uint8 _unkFlags = 0x33
 
TownsAudioInterface_intf = nullptr
 
ScummEngine_vm
 
const int _numSoundMax
 
const bool _v2
 

Friends

void syncWithSerializer (Common::Serializer &, PcmCurrentSound &)
 

Member Function Documentation

◆ setSfxVolume()

void Scumm::Player_Towns::setSfxVolume ( int  vol)
overridevirtual

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.

Parameters
volthe new output volume

Reimplemented from Scumm::MusicEngine.

◆ getSoundStatus()

int Scumm::Player_Towns::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.

Reimplemented in Scumm::Player_Towns_v2, and Scumm::Player_Towns_v1.

◆ saveLoadWithSerializer()

void Scumm::Player_Towns::saveLoadWithSerializer ( Common::Serializer ser)
overridevirtual

Save or load the music state.

Reimplemented from Scumm::MusicEngine.

Reimplemented in Scumm::Player_Towns_v2, and Scumm::Player_Towns_v1.

◆ restoreAfterLoad()

void Scumm::Player_Towns::restoreAfterLoad ( )
overridevirtual

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 from Scumm::MusicEngine.

Reimplemented in Scumm::Player_Towns_v1.


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