ScummVM API documentation
MADS::SoundManager Class Referenceabstract
Inheritance diagram for MADS::SoundManager:
MADS::Dragonsphere::Sound::DragonSoundManager MADS::Phantom::Sound::PhantomSoundManager MADS::RexNebular::Sound::MacSoundManager MADS::RexNebular::Sound::RexSoundManager

Classes

struct  QueuedCommand
 

Public Member Functions

 SoundManager (Audio::Mixer *mixer, bool &soundFlag, bool supportsGeneralMidi=false)
 
virtual void validate ()=0
 
void init (int sectionNumber)
 
bool isLoaded () const
 
bool isDriverActive ()
 
bool usesPCSpeaker () const
 
void closeDriver ()
 
void removeDriver ()
 
void pauseNewCommands ()
 
virtual void startQueuedCommands ()
 
void setVolume (int volume)
 
void onTimer ()
 
int command (int commandId, int param=0)
 
void stop ()
 
void noise ()
 

Static Public Member Functions

static void timerCallback (void *data)
 

Protected Types

enum  DriverType {
  SOUND_ADLIB, SOUND_MT32, SOUND_GM, SOUND_PCSPEAKER,
  SOUND_PAS
}
 

Protected Member Functions

virtual void loadDriver (int sectionNum)=0
 

Protected Attributes

Audio::Mixer_mixer
 
DriverType _driverType
 
MidiDriver_MT32GM_midiDriver
 
uint32 _driverCallbackDelta
 
uint32 _updateDeltaRemainder
 
bool & _soundFlag
 
SoundDriver_driver = nullptr
 
bool _newSoundsPaused = false
 
Common::Queue< QueuedCommand_queuedCommands
 
int _masterVolume = 255
 
NativeSoundTimer _hostTimer
 

Static Protected Attributes

static const uint32 UPDATE_DELTA
 

Member Function Documentation

◆ loadDriver()

virtual void MADS::SoundManager::loadDriver ( int  sectionNum)
protectedpure virtual

◆ validate()

virtual void MADS::SoundManager::validate ( )
pure virtual

◆ init()

void MADS::SoundManager::init ( int  sectionNumber)

Initializes the sound driver for a given game section

◆ isLoaded()

bool MADS::SoundManager::isLoaded ( ) const
inline

Returns true if a driver is loaded

◆ isDriverActive()

bool MADS::SoundManager::isDriverActive ( )

Returns whether the current driver reports an active sound.

◆ usesPCSpeaker()

bool MADS::SoundManager::usesPCSpeaker ( ) const
inline

Returns whether the selected driver family uses PC speaker data.

◆ closeDriver()

void MADS::SoundManager::closeDriver ( )

Stop any currently active sound and remove the driver

◆ removeDriver()

void MADS::SoundManager::removeDriver ( )

Remove the driver

◆ pauseNewCommands()

void MADS::SoundManager::pauseNewCommands ( )

Temporarily pause the playback of any new sound commands

◆ startQueuedCommands()

virtual void MADS::SoundManager::startQueuedCommands ( )
virtual

Stop queueing sound commands, and execute any previously queued ones

Reimplemented in MADS::RexNebular::Sound::MacSoundManager.

◆ setVolume()

void MADS::SoundManager::setVolume ( int  volume)

Set the master volume

◆ command()

int MADS::SoundManager::command ( int  commandId,
int  param = 0 
)

Executes a command on the sound driver

Parameters
commandidCommand Id to execute
paramOptional paramater specific to a few commands

◆ stop()

void MADS::SoundManager::stop ( )

Stops any currently playing sound

◆ noise()

void MADS::SoundManager::noise ( )

Noise Some sort of random noise generation?


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