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 isReady ()
 
bool isDriverActive ()
 
bool usesPCSpeaker () const
 
void closeDriver ()
 
void removeDriver ()
 
void pauseNewCommands ()
 
virtual void startQueuedCommands ()
 
void syncSoundSettings ()
 
int command (int commandId, int param=0)
 
void stop ()
 
void pause (bool pause)
 
void noise ()
 
void onTimer ()
 

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
 
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

◆ isReady()

bool MADS::SoundManager::isReady ( )

Sound manager is ready to start sound playback. This will return false while the MT-32 driver is sending SysEx messages to the unit. Do not start sound playback while this returns false.

◆ 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.

◆ syncSoundSettings()

void MADS::SoundManager::syncSoundSettings ( )

Applies sound settings from the ScummVM configuration manager.

◆ 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

◆ pause()

void MADS::SoundManager::pause ( bool  pause)

Pauses or unpauses playback.

◆ noise()

void MADS::SoundManager::noise ( )

Noise Some sort of random noise generation?


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