ScummVM API documentation
Titanic::CWaveFile Class Reference

Public Member Functions

 CWaveFile (Audio::Mixer *mixer)
 
uint getDurationTicks () const
 
uint size () const
 
bool loadSound (const CString &name)
 
bool loadSpeech (CDialogueFile *dialogueFile, int speechIndex)
 
bool loadMusic (const CString &name)
 
bool loadMusic (CAudioBuffer *buffer, DisposeAfterUse::Flag disposeAfterUse)
 
bool isLoaded () const
 
uint getFrequency () const
 
const int16 * lock ()
 
void unlock (const int16 *ptr)
 
Audio::SoundHandle play (int numLoops, byte volume)
 

Public Attributes

Audio::Mixer::SoundType _soundType
 
LoadMode _loadMode
 
CAudioBuffer_audioBuffer
 
DisposeAfterUse::Flag _disposeAudioBuffer
 
int _channel
 

Member Function Documentation

◆ getDurationTicks()

uint Titanic::CWaveFile::getDurationTicks ( ) const

Returns the duration of the wave file

Returns
Total ticks. Not really sure how ticks map to real time

◆ size()

uint Titanic::CWaveFile::size ( ) const
inline

Return the size of the wave file

◆ loadSound()

bool Titanic::CWaveFile::loadSound ( const CString name)

Tries to load the specified wave file sound

◆ loadSpeech()

bool Titanic::CWaveFile::loadSpeech ( CDialogueFile dialogueFile,
int  speechIndex 
)

Tries to load speech from a specified dialogue file

◆ loadMusic() [1/2]

bool Titanic::CWaveFile::loadMusic ( const CString name)

Tries to load the specified music wave file

◆ loadMusic() [2/2]

bool Titanic::CWaveFile::loadMusic ( CAudioBuffer buffer,
DisposeAfterUse::Flag  disposeAfterUse 
)

Tries to load the specified audio buffer

◆ isLoaded()

bool Titanic::CWaveFile::isLoaded ( ) const
inline

Returns true if the wave file has data loaded

◆ getFrequency()

uint Titanic::CWaveFile::getFrequency ( ) const
inline

Return the frequency of the loaded wave file

◆ lock()

const int16* Titanic::CWaveFile::lock ( )

Lock sound data for access

◆ unlock()

void Titanic::CWaveFile::unlock ( const int16 *  ptr)

Unlock sound data after a prior call to lock

◆ play()

Audio::SoundHandle Titanic::CWaveFile::play ( int  numLoops,
byte  volume 
)

Plays the wave file

Parameters
numLoopsNumber of times to loop. 0 for none, -1 for infinite, and >0 for specified number of times
volumeVolume to play at
Returns
Audio handle for started sound

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