25 #include "audio/mixer.h" 66 virtual void playSfx(uint16 sfx) {}
67 virtual void playSong(int16 songNum) {}
68 virtual void playSpeech(
const char *base) {}
70 virtual void stopSfx() {}
71 virtual void stopSong() {}
72 virtual void stopSpeech() {}
74 virtual bool isSpeechActive()
const {
return false; }
75 virtual bool isSfxActive()
const {
return false; }
77 virtual void updateMusic() {}
79 virtual void setVolume(
int vol);
80 virtual int getVolume() {
return _musicVolume; }
82 void playLastSong() { playSong(_lastOverride); }
84 bool sfxOn()
const {
return _sfxToggle; }
85 void sfxToggle(
bool val) { _sfxToggle = val; }
86 void toggleSfx() { _sfxToggle = !_sfxToggle; }
88 bool speechOn()
const {
return _speechToggle; }
89 void speechToggle(
bool val) { _speechToggle = val; }
90 void toggleSpeech() { _speechToggle = !_speechToggle; }
92 bool musicOn()
const {
return _musicToggle; }
93 void musicToggle(
bool val) { _musicToggle = val; }
94 void toggleMusic() { _musicToggle = !_musicToggle; }
96 bool speechSfxExists()
const {
return _speechSfxExists; }
98 int16 lastOverride()
const {
return _lastOverride; }
100 void saveState(byte *&ptr);
101 void loadState(uint32 ver, byte *&ptr);
107 static const char *
const _sfxName[];
108 static const int16 _jungleList[];
118 bool _speechSfxExists;
129 void playSfx(uint16 sfx)
override;
130 void playSpeech(
const char *base)
override;
131 void playSong(int16 songNum)
override;
133 void stopSfx()
override { _mixer->stopHandle(_sfxHandle); }
134 void stopSong()
override;
135 void stopSpeech()
override { _mixer->stopHandle(_speechHandle); }
137 bool isSpeechActive()
const override {
return _mixer->isSoundHandleActive(_speechHandle); }
138 bool isSfxActive()
const override {
return _mixer->isSoundHandleActive(_sfxHandle); }
140 void setVolume(
int vol)
override;
143 void playSound(
const char *base,
bool isSpeech);
156 void playSfx(uint16 sfx)
override;
157 void playSong(int16 song)
override;
159 void stopSfx()
override;
160 void stopSong()
override;
162 bool isSfxActive()
const override {
return _mixer->isSoundHandleActive(_sfxHandle); }
164 void updateMusic()
override;
168 void playSound(
const char *base);
170 void playModule(
const char *base,
int song);
171 void playPattern(
const char *base,
int pattern);
172 bool playSpecialSfx(int16 sfx);
174 int16 _fanfareRestore;
175 int _fanfareCount, _fluteCount;
Definition: algorithm.h:29
Definition: audiostream.h:50