22#ifndef MOHAWK_RIVEN_SOUND_H
23#define MOHAWK_RIVEN_SOUND_H
25#include "common/array.h"
26#include "common/str.h"
28#include "audio/mixer.h"
31class RewindableAudioStream;
36class MohawkEngine_Riven;
77 void playSound(uint16
id, uint16 volume = 255,
bool playOnDraw =
false);
101 struct AmbientSound {
109 struct AmbientSoundList {
118 kFadeOutPreviousSounds = 1,
122 MohawkEngine_Riven *_vm;
124 int16 _mainAmbientSoundId;
125 AmbientSoundList _ambientSounds;
126 AmbientSoundList _previousAmbientSounds;
127 uint32 _nextFadeUpdate;
130 bool _effectPlayOnDraw;
135 void addAmbientSounds(
const SLSTRecord &record);
136 void playAmbientSounds();
137 void pauseAmbientSounds();
138 void moveAmbientSoundsToPreviousSounds();
139 void freePreviousAmbientSounds();
142 void setTargetVolumes(
const SLSTRecord &record);
143 void applyTargetVolumes();
144 void startFadingAmbientSounds(uint16 flags);
145 void fadeAmbientSoundList(AmbientSoundList &list);
146 bool fadeVolume(AmbientSound &ambientSound);
147 bool fadeBalance(AmbientSound &ambientSound);
148 void setAmbientLooping(
bool loop);
184 static byte convertVolume(uint16 volume);
185 static int8 convertBalance(int16 balance);
SoundType
Definition: mixer.h:73
Definition: audiostream.h:109
Definition: riven_sound.h:154
void setVolume(uint16 volume)
void setLooping(bool loop)
void setBalance(int16 balance)
Definition: riven_sound.h:65
void playSound(uint16 id, uint16 volume=255, bool playOnDraw=false)
bool isEffectPlaying() const
void playCardSound(const Common::String &name, uint16 volume=255, bool playOnDraw=false)
void stopAllSLST(bool fade=false)
void playSLST(const SLSTRecord &slstRecord)
Definition: riven_sound.h:42