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" 31 class RewindableAudioStream;
36 class MohawkEngine_Riven;
77 void playSound(uint16
id, uint16 volume = 255,
bool playOnDraw =
false);
80 void playCardSound(
const Common::String &name, uint16 volume = 255,
bool playOnDraw =
false);
83 void triggerDrawSound();
86 bool isEffectPlaying()
const;
95 void stopAllSLST(
bool fade =
false);
101 struct AmbientSound {
109 struct AmbientSoundList {
118 kFadeOutPreviousSounds = 1,
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);
163 bool isPlaying()
const;
169 uint16 getVolume()
const;
172 void setVolume(uint16 volume);
175 int16 getBalance()
const;
178 void setBalance(int16 balance);
181 void setLooping(
bool loop);
184 static byte convertVolume(uint16 volume);
185 static int8 convertBalance(int16 balance);
Definition: riven_sound.h:42
SoundType
Definition: mixer.h:62
Definition: riven_sound.h:65
Definition: audiostream.h:109
Definition: riven_sound.h:154