#include <sound_manager.h>
Public Member Functions | |
QSoundManager (Audio::Mixer *mixer) | |
CWaveFile * | loadSound (const CString &name) override |
CWaveFile * | loadSpeech (CDialogueFile *dialogueFile, int speechId) override |
CWaveFile * | loadMusic (const CString &name) override |
CWaveFile * | loadMusic (CAudioBuffer *buffer, DisposeAfterUse::Flag disposeAfterUse) override |
int | playSound (CWaveFile &waveFile, CProximity &prox) override |
void | stopSound (int handle) override |
void | stopChannel (int channel) override |
virtual void | setCanFree (int handle) |
void | stopAllChannels () override |
void | setVolume (int handle, uint volume, uint seconds) override |
void | setVectorPosition (int handle, double x, double y, double z, uint panRate) override |
void | setPolarPosition (int handle, double range, double azimuth, double elevation, uint panRate) override |
bool | isActive (int handle) override |
bool | isActive (const CWaveFile *waveFile) override |
void | waveMixPump () override |
uint | getLatency () const override |
void | setMusicPercent (double percent) override |
void | setSpeechPercent (double percent) override |
void | setMasterPercent (double percent) override |
void | setParrotPercent (double percent) override |
void | setListenerPosition (double posX, double posY, double posZ, double directionX, double directionY, double directionZ, bool stopSounds) override |
virtual int | playWave (CWaveFile *waveFile, int iChannel, uint flags, CProximity &prox) |
void | soundFreed (Audio::SoundHandle &handle) |
Public Member Functions inherited from Titanic::CSoundManager | |
virtual void | proc9 (int handle) |
virtual void | preLoad () |
void | load (SimpleFile *file) |
virtual void | postLoad () |
virtual void | preSave () |
void | save (SimpleFile *file) const |
virtual void | postSave () |
double | getMusicVolume () const |
double | getSpeechVolume () const |
double | getParrotVolume () const |
uint | getModeVolume (VolumeMode mode) |
Public Member Functions inherited from Titanic::QMixer | |
QMixer (Audio::Mixer *mixer) | |
bool | qsWaveMixInitEx (const QMIXCONFIG &config) |
void | qsWaveMixActivate (bool fActivate) |
int | qsWaveMixOpenChannel (int iChannel, QMixFlag mode) |
int | qsWaveMixEnableChannel (int iChannel, uint flags, bool enabled) |
void | qsWaveMixCloseSession () |
void | qsWaveMixFreeWave (Audio::SoundHandle &handle) |
void | qsWaveMixFlushChannel (int iChannel, uint flags=0) |
void | qsWaveMixSetPanRate (int iChannel, uint flags, uint rate) |
void | qsWaveMixSetVolume (int iChannel, uint flags, uint volume) |
void | qsWaveMixSetSourcePosition (int iChannel, uint flags, const QSVECTOR &position) |
void | qsWaveMixSetPolarPosition (int iChannel, uint flags, const QSPOLAR &position) |
void | qsWaveMixSetListenerPosition (const QSVECTOR &position, uint flags=0) |
void | qsWaveMixSetListenerOrientation (const QSVECTOR &direction, const QSVECTOR &up, uint flags=0) |
void | qsWaveMixSetDistanceMapping (int iChannel, uint flags, const QMIX_DISTANCES &distances) |
void | qsWaveMixSetFrequency (int iChannel, uint flags, uint frequency) |
void | qsWaveMixSetSourceVelocity (int iChannel, uint flags, const QSVECTOR &velocity) |
int | qsWaveMixPlayEx (int iChannel, uint flags, CWaveFile *waveFile, int loops, const QMIXPLAYPARAMS ¶ms) |
bool | qsWaveMixIsChannelDone (int iChannel) const |
void | qsWaveMixPump () |
Public Attributes | |
int | _field18 |
int | _field1C |
Additional Inherited Members | |
Protected Attributes inherited from Titanic::CSoundManager | |
uint | _handleCtr |
double | _musicPercent |
double | _speechPercent |
double | _masterPercent |
double | _parrotPercent |
Protected Attributes inherited from Titanic::QMixer | |
Audio::Mixer * | _mixer |
Concrete sound manager class that handles interfacing with the QMixer sound mixer class
Loads a sound
name | Name of sound resource |
Reimplemented from Titanic::CSoundManager.
|
overridevirtual |
Loads a speech resource from a dialogue file
name | Name of sound resource |
Reimplemented from Titanic::CSoundManager.
Loads a music file
name | Name of music resource |
Reimplemented from Titanic::CSoundManager.
|
overridevirtual |
Loads a music file from a streaming audio buffer
buffer | Audio buffer |
Reimplemented from Titanic::CSoundManager.
|
overridevirtual |
Start playing a previously loaded sound resource
Implements Titanic::CSoundManager.
|
overridevirtual |
Stop playing the specified sound
Implements Titanic::CSoundManager.
|
overridevirtual |
Stops a designated range of channels
Implements Titanic::CSoundManager.
|
virtual |
Flags that a sound can be freed if a timeout is set
|
overridevirtual |
Stops sounds on all playing channels
Implements Titanic::CSoundManager.
|
overridevirtual |
Sets the volume for a sound
handle | Handle for sound |
volume | New volume |
seconds | Number of seconds to transition to the new volume |
Implements Titanic::CSoundManager.
|
overridevirtual |
Set the position for a sound
handle | Handle for sound |
x | x position in metres |
y | y position in metres |
z | z position in metres |
panRate | Rate in milliseconds to transition |
Reimplemented from Titanic::CSoundManager.
|
overridevirtual |
Set the position for a sound
handle | Handle for sound |
range | Range value in metres |
azimuth | Azimuth value in degrees |
elevation | Elevation value in degrees |
panRate | Rate in milliseconds to transition |
Reimplemented from Titanic::CSoundManager.
|
overridevirtual |
Returns true if the given sound is currently active
Implements Titanic::CSoundManager.
|
overridevirtual |
Returns true if the given sound is currently active
Reimplemented from Titanic::CSoundManager.
|
overridevirtual |
Handles regularly updating the mixer
Implements Titanic::CSoundManager.
|
overridevirtual |
Returns the movie latency
Reimplemented from Titanic::CSoundManager.
|
overridevirtual |
Sets the music volume percent
Implements Titanic::CSoundManager.
|
overridevirtual |
Sets the speech volume percent
Implements Titanic::CSoundManager.
|
overridevirtual |
Sets the master volume percent
Implements Titanic::CSoundManager.
|
overridevirtual |
Sets the Parrot NPC volume percent
Implements Titanic::CSoundManager.
|
overridevirtual |
Sets the position and orientation for the listener (player)
Reimplemented from Titanic::CSoundManager.
|
virtual |
Starts a wave file playing
void Titanic::QSoundManager::soundFreed | ( | Audio::SoundHandle & | handle | ) |
Called when a wave file is freed