ScummVM API documentation
Titanic::CSoundManager Class Referenceabstract

#include <sound_manager.h>

Inheritance diagram for Titanic::CSoundManager:
Titanic::QSoundManager

Public Member Functions

virtual CWaveFileloadSound (const CString &name)
 
virtual CWaveFileloadSpeech (CDialogueFile *dialogueFile, int speechId)
 
virtual CWaveFileloadMusic (const CString &name)
 
virtual CWaveFileloadMusic (CAudioBuffer *buffer, DisposeAfterUse::Flag disposeAfterUse)
 
virtual int playSound (CWaveFile &waveFile, CProximity &prox)=0
 
virtual void stopSound (int handle)=0
 
virtual void stopChannel (int channel)=0
 
virtual void proc9 (int handle)
 
virtual void stopAllChannels ()=0
 
virtual void setVolume (int handle, uint volume, uint seconds)=0
 
virtual void setVectorPosition (int handle, double x, double y, double z, uint panRate)
 
virtual void setPolarPosition (int handle, double range, double azimuth, double elevation, uint panRate)
 
virtual bool isActive (int handle)=0
 
virtual bool isActive (const CWaveFile *waveFile)
 
virtual void waveMixPump ()=0
 
virtual uint getLatency () const
 
virtual void setMusicPercent (double percent)=0
 
virtual void setSpeechPercent (double percent)=0
 
virtual void setMasterPercent (double percent)=0
 
virtual void setParrotPercent (double percent)=0
 
virtual void preLoad ()
 
void load (SimpleFile *file)
 
virtual void postLoad ()
 
virtual void preSave ()
 
void save (SimpleFile *file) const
 
virtual void postSave ()
 
virtual void setListenerPosition (double posX, double posY, double posZ, double directionX, double directionY, double directionZ, bool stopSounds)
 
double getMusicVolume () const
 
double getSpeechVolume () const
 
double getParrotVolume () const
 
uint getModeVolume (VolumeMode mode)
 

Protected Attributes

uint _handleCtr
 
double _musicPercent
 
double _speechPercent
 
double _masterPercent
 
double _parrotPercent
 

Detailed Description

Abstract interface class for a sound manager

Member Function Documentation

◆ loadSound()

virtual CWaveFile* Titanic::CSoundManager::loadSound ( const CString name)
inlinevirtual

Loads a sound

Parameters
nameName of sound resource
Returns
Loaded wave file

Reimplemented in Titanic::QSoundManager.

◆ loadSpeech()

virtual CWaveFile* Titanic::CSoundManager::loadSpeech ( CDialogueFile dialogueFile,
int  speechId 
)
inlinevirtual

Loads a speech resource from a dialogue file

Parameters
nameName of sound resource
Returns
Loaded wave file

Reimplemented in Titanic::QSoundManager.

◆ loadMusic() [1/2]

virtual CWaveFile* Titanic::CSoundManager::loadMusic ( const CString name)
inlinevirtual

Loads a music file

Parameters
nameName of music resource
Returns
Loaded wave file
Remarks
The original only classified music as what's produced in the music room puzzle. For ScummVM, we've reclassified some wave files that contain background music as music as well.

Reimplemented in Titanic::QSoundManager.

◆ loadMusic() [2/2]

virtual CWaveFile* Titanic::CSoundManager::loadMusic ( CAudioBuffer buffer,
DisposeAfterUse::Flag  disposeAfterUse 
)
inlinevirtual

Loads a music file from a streaming audio buffer

Parameters
bufferAudio buffer
Returns
Loaded wave file

Reimplemented in Titanic::QSoundManager.

◆ playSound()

virtual int Titanic::CSoundManager::playSound ( CWaveFile waveFile,
CProximity prox 
)
pure virtual

Start playing a previously loaded wave file

Implemented in Titanic::QSoundManager.

◆ stopSound()

virtual void Titanic::CSoundManager::stopSound ( int  handle)
pure virtual

Stop playing the specified sound

Implemented in Titanic::QSoundManager.

◆ stopChannel()

virtual void Titanic::CSoundManager::stopChannel ( int  channel)
pure virtual

Stops a designated range of channels

Implemented in Titanic::QSoundManager.

◆ stopAllChannels()

virtual void Titanic::CSoundManager::stopAllChannels ( )
pure virtual

Stops sounds on all playing channels

Implemented in Titanic::QSoundManager.

◆ setVolume()

virtual void Titanic::CSoundManager::setVolume ( int  handle,
uint  volume,
uint  seconds 
)
pure virtual

Sets the volume for a sound

Parameters
handleHandle for sound
volumeNew volume
secondsNumber of seconds to transition to the new volume

Implemented in Titanic::QSoundManager.

◆ setVectorPosition()

virtual void Titanic::CSoundManager::setVectorPosition ( int  handle,
double  x,
double  y,
double  z,
uint  panRate 
)
inlinevirtual

Set the position for a sound

Parameters
handleHandle for sound
xx position in metres
yy position in metres
zz position in metres
panRateRate in milliseconds to transition

Reimplemented in Titanic::QSoundManager.

◆ setPolarPosition()

virtual void Titanic::CSoundManager::setPolarPosition ( int  handle,
double  range,
double  azimuth,
double  elevation,
uint  panRate 
)
inlinevirtual

Set the position for a sound

Parameters
handleHandle for sound
rangeRange value in metres
azimuthAzimuth value in degrees
elevationElevation value in degrees
panRateRate in milliseconds to transition

Reimplemented in Titanic::QSoundManager.

◆ isActive() [1/2]

virtual bool Titanic::CSoundManager::isActive ( int  handle)
pure virtual

Returns true if the given sound is currently active

Implemented in Titanic::QSoundManager.

◆ isActive() [2/2]

virtual bool Titanic::CSoundManager::isActive ( const CWaveFile waveFile)
inlinevirtual

Returns true if the given sound is currently active

Reimplemented in Titanic::QSoundManager.

◆ waveMixPump()

virtual void Titanic::CSoundManager::waveMixPump ( )
pure virtual

Handles regularly updating the mixer

Implemented in Titanic::QSoundManager.

◆ getLatency()

virtual uint Titanic::CSoundManager::getLatency ( ) const
inlinevirtual

Returns the movie latency

Reimplemented in Titanic::QSoundManager.

◆ setMusicPercent()

virtual void Titanic::CSoundManager::setMusicPercent ( double  percent)
pure virtual

Sets the music volume percent

Implemented in Titanic::QSoundManager.

◆ setSpeechPercent()

virtual void Titanic::CSoundManager::setSpeechPercent ( double  percent)
pure virtual

Sets the speech volume percent

Implemented in Titanic::QSoundManager.

◆ setMasterPercent()

virtual void Titanic::CSoundManager::setMasterPercent ( double  percent)
pure virtual

Sets the master volume percent

Implemented in Titanic::QSoundManager.

◆ setParrotPercent()

virtual void Titanic::CSoundManager::setParrotPercent ( double  percent)
pure virtual

Sets the Parrot NPC volume percent

Implemented in Titanic::QSoundManager.

◆ preLoad()

virtual void Titanic::CSoundManager::preLoad ( )
inlinevirtual

Called when a game is about to be loaded

◆ load()

void Titanic::CSoundManager::load ( SimpleFile file)
inline

Load the data for the class from file

◆ postLoad()

virtual void Titanic::CSoundManager::postLoad ( )
inlinevirtual

Called after loading of a game is completed

◆ preSave()

virtual void Titanic::CSoundManager::preSave ( )
inlinevirtual

Called when a game is about to be saved

◆ save()

void Titanic::CSoundManager::save ( SimpleFile file) const
inline

Save the data for the class to file

◆ postSave()

virtual void Titanic::CSoundManager::postSave ( )
inlinevirtual

Called after saving is complete

◆ setListenerPosition()

virtual void Titanic::CSoundManager::setListenerPosition ( double  posX,
double  posY,
double  posZ,
double  directionX,
double  directionY,
double  directionZ,
bool  stopSounds 
)
inlinevirtual

Sets the position and orientation for the listener (player)

Reimplemented in Titanic::QSoundManager.

◆ getMusicVolume()

double Titanic::CSoundManager::getMusicVolume ( ) const
inline

Returns the music volume percent

◆ getSpeechVolume()

double Titanic::CSoundManager::getSpeechVolume ( ) const
inline

Returns the speech volume percent

◆ getParrotVolume()

double Titanic::CSoundManager::getParrotVolume ( ) const
inline

Returns the parrot volume percent

◆ getModeVolume()

uint Titanic::CSoundManager::getModeVolume ( VolumeMode  mode)

Gets the volume for a given mode? value


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