#include <qmixer.h>
Public Member Functions | |
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 () |
Protected Attributes | |
Audio::Mixer * | _mixer |
This class represents an interface to the QMixer library developed by QSound Labs, Inc. Which itself is apparently based on Microsoft's WaveMix API.
It does not currently have any actual code from the library, and instead remaps calls to ScummVM's existing mixer where possible. This means that advanced features of the QMixer library, like being able to set up both the player and sounds at different positions are currently ignored, and all sounds play at full volume.
bool Titanic::QMixer::qsWaveMixInitEx | ( | const QMIXCONFIG & | config | ) |
Initializes the mixer
void Titanic::QMixer::qsWaveMixActivate | ( | bool | fActivate | ) |
Activates the mixer
int Titanic::QMixer::qsWaveMixOpenChannel | ( | int | iChannel, |
QMixFlag | mode | ||
) |
Opens channels in the mixer for access
int Titanic::QMixer::qsWaveMixEnableChannel | ( | int | iChannel, |
uint | flags, | ||
bool | enabled | ||
) |
Enables a given channel
void Titanic::QMixer::qsWaveMixCloseSession | ( | ) |
Closes down the mixer
void Titanic::QMixer::qsWaveMixFreeWave | ( | Audio::SoundHandle & | handle | ) |
Stops a sound from playing
void Titanic::QMixer::qsWaveMixFlushChannel | ( | int | iChannel, |
uint | flags = 0 |
||
) |
Flushes a channel
void Titanic::QMixer::qsWaveMixSetPanRate | ( | int | iChannel, |
uint | flags, | ||
uint | rate | ||
) |
Sets the amount of time, in milliseconds, to effect a change in a channel property (e.g. volume, position). Non-zero values smooth out changes
iChannel | Channel to change |
flags | Flags |
rate | Pan rate in milliseconds |
void Titanic::QMixer::qsWaveMixSetVolume | ( | int | iChannel, |
uint | flags, | ||
uint | volume | ||
) |
Sets the volume for a channel
void Titanic::QMixer::qsWaveMixSetSourcePosition | ( | int | iChannel, |
uint | flags, | ||
const QSVECTOR & | position | ||
) |
Sets the relative position of a channel
iChannel | Channel number |
Flags | Flags |
position | Vector position for channel |
void Titanic::QMixer::qsWaveMixSetPolarPosition | ( | int | iChannel, |
uint | flags, | ||
const QSPOLAR & | position | ||
) |
Sets the relative position of a channel using polar co-ordinates
iChannel | Channel number |
Flags | Flags |
position | Polar position for channel |
void Titanic::QMixer::qsWaveMixSetListenerPosition | ( | const QSVECTOR & | position, |
uint | flags = 0 |
||
) |
Sets the listener position
void Titanic::QMixer::qsWaveMixSetListenerOrientation | ( | const QSVECTOR & | direction, |
const QSVECTOR & | up, | ||
uint | flags = 0 |
||
) |
Sets the listener orientation
void Titanic::QMixer::qsWaveMixSetDistanceMapping | ( | int | iChannel, |
uint | flags, | ||
const QMIX_DISTANCES & | distances | ||
) |
Sets the mapping ditance range
void Titanic::QMixer::qsWaveMixSetFrequency | ( | int | iChannel, |
uint | flags, | ||
uint | frequency | ||
) |
Sets the frequency/rate of sound playback
void Titanic::QMixer::qsWaveMixSetSourceVelocity | ( | int | iChannel, |
uint | flags, | ||
const QSVECTOR & | velocity | ||
) |
Sets the velocity of the source (listener)
int Titanic::QMixer::qsWaveMixPlayEx | ( | int | iChannel, |
uint | flags, | ||
CWaveFile * | waveFile, | ||
int | loops, | ||
const QMIXPLAYPARAMS & | params | ||
) |
Plays sound
iChannel | The channel number to be played on |
flags | Play flags |
mixWave | Data for the sound to be played |
loops | Number of loops to play (-1 for forever) |
params | Playback parameter data |
bool Titanic::QMixer::qsWaveMixIsChannelDone | ( | int | iChannel | ) | const |
Returns true if there are no more buffers playing or queued on the channel
void Titanic::QMixer::qsWaveMixPump | ( | ) |
Handles regularly updating the mixer