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

virtual void Audio::Mixer::playStream ( SoundType  type,
SoundHandle handle,
AudioStream stream,
int  id = -1,
byte  volume = kMaxChannelVolume,
int8  balance = 0,
DisposeAfterUse::Flag  autofreeStream = DisposeAfterUse::YES,
bool  permanent = false,
bool  reverseStereo = false 
) [pure virtual]

Start playing the given audio stream.

Note that the sound id assigned below is unique. At most one stream with a given id can play at any given time. Trying to play a sound with an id that is already in use causes the new sound to be not played.

type the type (voice/sfx/music) of the stream
handle a SoundHandle which can be used to reference and control the stream via suitable mixer methods
stream the actual AudioStream to be played
id a unique id assigned to this stream
volume the volume with which to play the sound, ranging from 0 to 255
balance the balance with which to play the sound, ranging from -128 to 127
autofreeStream a flag indicating whether the stream should be freed after playback finished
permanent a flag indicating whether a plain stopAll call should not stop this particular stream
reverseStereo a flag indicating whether left and right channels shall be swapped

Implemented in Audio::MixerImpl.

Referenced by Graphics::SmackerDecoder::decodeNextFrame(), Kyra::SoundDigital::playSound(), and Scumm::Player_V4A::startSound().

Generated by  Doxygen 1.6.0   Back to index