ScummVM API documentation
Titanic::CSound Class Reference

Public Member Functions

 CSound (CGameManager *owner, Audio::Mixer *mixer)
 
void save (SimpleFile *file) const
 
void load (SimpleFile *file)
 
void preLoad ()
 
void postLoad ()
 
void preSave ()
 
void postSave ()
 
void preEnterView (CViewItem *newView, bool isNewRoom)
 
bool isActive (int handle)
 
void setVolume (uint handle, uint volume, uint seconds)
 
void activateSound (CWaveFile *waveFile, DisposeAfterUse::Flag disposeAfterUse=DisposeAfterUse::NO)
 
void stopChannel (int channel)
 
CWaveFilegetTrueTalkSound (CDialogueFile *dialogueFile, int index)
 
CWaveFileloadSpeech (CDialogueFile *dialogueFile, int speechId)
 
int playSpeech (CDialogueFile *dialogueFile, int speechId, CProximity &prox)
 
CWaveFileloadSound (const CString &name)
 
int playSound (const CString &name, CProximity &prox)
 
void stopSound (uint handle)
 
void setCanFree (int handle)
 
void updateMixer ()
 

Public Attributes

QSoundManager _soundManager
 

Member Function Documentation

◆ save()

void Titanic::CSound::save ( SimpleFile file) const

Save the data for the class to file

◆ load()

void Titanic::CSound::load ( SimpleFile file)

Load the data for the class from file

◆ preLoad()

void Titanic::CSound::preLoad ( )

Called when a game is about to be loaded

◆ postLoad()

void Titanic::CSound::postLoad ( )
inline

Called when loading a game is complete

◆ preSave()

void Titanic::CSound::preSave ( )
inline

Called when a game is about to be saved

◆ postSave()

void Titanic::CSound::postSave ( )
inline

Called when a game has finished being saved

◆ preEnterView()

void Titanic::CSound::preEnterView ( CViewItem newView,
bool  isNewRoom 
)

Called when the view has been changed

◆ isActive()

bool Titanic::CSound::isActive ( int  handle)

Returns true if a sound with the specified handle is active

◆ setVolume()

void Titanic::CSound::setVolume ( uint  handle,
uint  volume,
uint  seconds 
)

Sets the volume for a sound

Parameters
handleSound handle
volumeVolume percentage (0 to 100)
secondsNumber of seconds to transition to the new volume

◆ activateSound()

void Titanic::CSound::activateSound ( CWaveFile waveFile,
DisposeAfterUse::Flag  disposeAfterUse = DisposeAfterUse::NO 
)

Flags a sound about to be played as activated

◆ stopChannel()

void Titanic::CSound::stopChannel ( int  channel)

Stops any sounds attached to a given channel

◆ getTrueTalkSound()

CWaveFile* Titanic::CSound::getTrueTalkSound ( CDialogueFile dialogueFile,
int  index 
)

Loads a TrueTalk dialogue

Parameters
dialogueFileDialogue file reference
speechIdSpeech Id within dialogue
Returns
Wave file instance

◆ loadSpeech()

CWaveFile* Titanic::CSound::loadSpeech ( CDialogueFile dialogueFile,
int  speechId 
)

Load a speech resource

Parameters
dialogueFileDialogue file reference
speechIdSpeech Id within dialogue
Returns
Wave file instance

◆ playSpeech()

int Titanic::CSound::playSpeech ( CDialogueFile dialogueFile,
int  speechId,
CProximity prox 
)

Play a speech

Parameters
dialogueFileDialogue file reference
speechIdSpeech Id within dialogue
proxProximity instance

◆ loadSound()

CWaveFile* Titanic::CSound::loadSound ( const CString name)

Load a sound

Parameters
nameName of sound resource
Returns
Sound item record

◆ playSound()

int Titanic::CSound::playSound ( const CString name,
CProximity prox 
)

Play a sound

◆ stopSound()

void Titanic::CSound::stopSound ( uint  handle)

Stop a sound

◆ setCanFree()

void Titanic::CSound::setCanFree ( int  handle)

Flags that a sound can be freed if a timeout is set

◆ updateMixer()

void Titanic::CSound::updateMixer ( )

Handles regularly updating the mixer


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