22 #ifndef ILLUSIONS_SOUND_H 23 #define ILLUSIONS_SOUND_H 25 #include "illusions/graphics.h" 26 #include "audio/audiostream.h" 28 #include "audio/midiplayer.h" 29 #include "audio/mixer.h" 30 #include "common/array.h" 31 #include "common/list.h" 35 class IllusionsEngine;
41 void play(uint32 musicId,
bool looping, int16 volume, int16 pan);
54 bool play(uint32 musicId);
56 bool isIdle()
const {
return _isIdle; }
60 bool _isCurrentlyPlaying;
62 uint32 _loopedMusicId;
63 uint32 _queuedMusicId;
64 uint32 _loadedMusicId;
68 void sysMidiPlay(uint32 musicId);
70 void send(uint32 b)
override;
71 void sendToChannel(byte channel, uint32 b)
override;
72 void endOfTrack()
override;
79 bool cue(
const char *voiceName);
81 void start(int16 volume, int16 pan);
98 Sound(uint32 soundEffectId, uint32 soundGroupId,
bool looping);
102 void play(int16 volume, int16 pan);
107 uint32 _soundEffectId;
108 uint32 _soundGroupId;
123 uint32 _notifyThreadId;
133 void playMusic(uint32 musicId, int16 type, int16 volume, int16 pan, uint32 notifyThreadId);
136 void playMidiMusic(uint32 musicId);
137 void stopMidiMusic();
138 void fadeMidiMusic(int16 finalVolume, int16 duration, uint32 notifyThreadId);
139 void clearMidiMusicQueue();
141 uint16 getMusicVolume();
142 uint16 getSfxVolume();
143 uint16 getSpeechVolume();
145 void setMusicVolume(uint16 volume);
146 void setSfxVolume(uint16 volume);
147 void setSpeechVolume(uint16 volume);
149 bool cueVoice(
const char *voiceName);
150 void stopCueingVoice();
151 void startVoice(int16 volume, int16 pan);
155 bool isVoicePlaying();
156 bool isVoiceEnabled();
159 void loadSound(uint32 soundEffectId, uint32 soundGroupId,
bool looping);
160 void playSound(uint32 soundEffectId, int16 volume, int16 pan);
161 void stopSound(uint32 soundEffectId);
162 void stopLoopingSounds();
163 void unloadSounds(uint32 soundGroupId);
169 uint32 _musicNotifyThreadId;
176 Sound *getSound(uint32 soundEffectId);
178 void updateMidiMusicFader();
179 uint16 calcAdjustedVolume(
const Common::String &volumeConfigKey, uint16 volume);
184 #endif // ILLUSIONS_SOUND_H Definition: midiplayer.h:63
Definition: audiostream.h:109
Definition: list_intern.h:51
Definition: illusions.h:92