Logo Search packages:      
Sourcecode: scummvm version File versions  Download package

Audio::Mixer Class Reference

#include <mixer.h>

Inherited by DSAudioMixer.

List of all members.

Detailed Description

The main audio mixer handles mixing of an arbitrary number of input audio streams (in the form of AudioStream instances).

Definition at line 60 of file mixer.h.

Public Types

enum  { kMaxChannelVolume = 255, kMaxMixerVolume = 256 }
enum  RawFlags {
  FLAG_UNSIGNED = 1 << 0, FLAG_16BITS = 1 << 1, FLAG_LITTLE_ENDIAN = 1 << 2, FLAG_STEREO = 1 << 3,
  FLAG_REVERSE_STEREO = 1 << 4, FLAG_AUTOFREE = 1 << 5, FLAG_LOOP = 1 << 6
enum  SoundType { kPlainSoundType = 0, kMusicSoundType = 1, kSFXSoundType = 2, kSpeechSoundType = 3 }

Public Member Functions

uint getOutputRate () const
uint32 getSoundElapsedTime (SoundHandle handle)
int getSoundID (SoundHandle handle)
int getVolumeForSoundType (SoundType type) const
bool hasActiveChannelOfType (SoundType type)
bool isReady () const
bool isSoundHandleActive (SoundHandle handle)
bool isSoundIDActive (int id)
void pauseAll (bool paused)
void pauseHandle (SoundHandle handle, bool paused)
void pauseID (int id, bool paused)
void playInputStream (SoundType type, SoundHandle *handle, AudioStream *input, int id=-1, byte volume=255, int8 balance=0, bool autofreeStream=true, bool permanent=false, bool reverseStereo=false)
void playRaw (SoundType type, SoundHandle *handle, void *sound, uint32 size, uint rate, byte flags, int id=-1, byte volume=255, int8 balance=0, uint32 loopStart=0, uint32 loopEnd=0)
void setChannelBalance (SoundHandle handle, int8 balance)
void setChannelVolume (SoundHandle handle, byte volume)
void setReady (bool ready)
void setVolumeForSoundType (SoundType type, int volume)
void stopAll ()
void stopHandle (SoundHandle handle)
void stopID (int id)

Static Public Member Functions

static void mixCallback (void *s, byte *samples, int len)

Protected Member Functions

void insertChannel (SoundHandle *handle, Channel *chan)
void mix (int16 *buf, uint len)

Private Types

enum  { NUM_CHANNELS = 16 }

Private Attributes

Channel_channels [NUM_CHANNELS]
uint32 _handleSeed
bool _mixerReady
Common::Mutex _mutex
int _volumeForSoundType [4]

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

Generated by  Doxygen 1.6.0   Back to index