ScummVM API documentation
Titanic::QMixer Class Reference

#include <qmixer.h>

Inheritance diagram for Titanic::QMixer:
Titanic::QSoundManager

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 &params)
 
bool qsWaveMixIsChannelDone (int iChannel) const
 
void qsWaveMixPump ()
 

Protected Attributes

Audio::Mixer_mixer
 

Detailed Description

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.

Member Function Documentation

◆ qsWaveMixInitEx()

bool Titanic::QMixer::qsWaveMixInitEx ( const QMIXCONFIG config)

Initializes the mixer

◆ qsWaveMixActivate()

void Titanic::QMixer::qsWaveMixActivate ( bool  fActivate)

Activates the mixer

◆ qsWaveMixOpenChannel()

int Titanic::QMixer::qsWaveMixOpenChannel ( int  iChannel,
QMixFlag  mode 
)

Opens channels in the mixer for access

◆ qsWaveMixEnableChannel()

int Titanic::QMixer::qsWaveMixEnableChannel ( int  iChannel,
uint  flags,
bool  enabled 
)

Enables a given channel

◆ qsWaveMixCloseSession()

void Titanic::QMixer::qsWaveMixCloseSession ( )

Closes down the mixer

◆ qsWaveMixFreeWave()

void Titanic::QMixer::qsWaveMixFreeWave ( Audio::SoundHandle handle)

Stops a sound from playing

◆ qsWaveMixFlushChannel()

void Titanic::QMixer::qsWaveMixFlushChannel ( int  iChannel,
uint  flags = 0 
)

Flushes a channel

◆ qsWaveMixSetPanRate()

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

Parameters
iChannelChannel to change
flagsFlags
ratePan rate in milliseconds

◆ qsWaveMixSetVolume()

void Titanic::QMixer::qsWaveMixSetVolume ( int  iChannel,
uint  flags,
uint  volume 
)

Sets the volume for a channel

◆ qsWaveMixSetSourcePosition()

void Titanic::QMixer::qsWaveMixSetSourcePosition ( int  iChannel,
uint  flags,
const QSVECTOR position 
)

Sets the relative position of a channel

Parameters
iChannelChannel number
FlagsFlags
positionVector position for channel

◆ qsWaveMixSetPolarPosition()

void Titanic::QMixer::qsWaveMixSetPolarPosition ( int  iChannel,
uint  flags,
const QSPOLAR position 
)

Sets the relative position of a channel using polar co-ordinates

Parameters
iChannelChannel number
FlagsFlags
positionPolar position for channel

◆ qsWaveMixSetListenerPosition()

void Titanic::QMixer::qsWaveMixSetListenerPosition ( const QSVECTOR position,
uint  flags = 0 
)

Sets the listener position

◆ qsWaveMixSetListenerOrientation()

void Titanic::QMixer::qsWaveMixSetListenerOrientation ( const QSVECTOR direction,
const QSVECTOR up,
uint  flags = 0 
)

Sets the listener orientation

◆ qsWaveMixSetDistanceMapping()

void Titanic::QMixer::qsWaveMixSetDistanceMapping ( int  iChannel,
uint  flags,
const QMIX_DISTANCES distances 
)

Sets the mapping ditance range

◆ qsWaveMixSetFrequency()

void Titanic::QMixer::qsWaveMixSetFrequency ( int  iChannel,
uint  flags,
uint  frequency 
)

Sets the frequency/rate of sound playback

◆ qsWaveMixSetSourceVelocity()

void Titanic::QMixer::qsWaveMixSetSourceVelocity ( int  iChannel,
uint  flags,
const QSVECTOR velocity 
)

Sets the velocity of the source (listener)

◆ qsWaveMixPlayEx()

int Titanic::QMixer::qsWaveMixPlayEx ( int  iChannel,
uint  flags,
CWaveFile waveFile,
int  loops,
const QMIXPLAYPARAMS params 
)

Plays sound

Parameters
iChannelThe channel number to be played on
flagsPlay flags
mixWaveData for the sound to be played
loopsNumber of loops to play (-1 for forever)
paramsPlayback parameter data

◆ qsWaveMixIsChannelDone()

bool Titanic::QMixer::qsWaveMixIsChannelDone ( int  iChannel) const

Returns true if there are no more buffers playing or queued on the channel

◆ qsWaveMixPump()

void Titanic::QMixer::qsWaveMixPump ( )

Handles regularly updating the mixer


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