diff options
author | Joost Peters | 2004-01-25 22:10:23 +0000 |
---|---|---|
committer | Joost Peters | 2004-01-25 22:10:23 +0000 |
commit | 0d974b9daa4df60a87255cc6f477c9696034c24f (patch) | |
tree | 762999f9d9b24e66d075660937a97276643b870c /queen/sound.h | |
parent | b106eb1e43e8f5a3c3fd78e547b2f7945969375b (diff) | |
download | scummvm-rg350-0d974b9daa4df60a87255cc6f477c9696034c24f.tar.gz scummvm-rg350-0d974b9daa4df60a87255cc6f477c9696034c24f.tar.bz2 scummvm-rg350-0d974b9daa4df60a87255cc6f477c9696034c24f.zip |
Seperate SFX and Speech.
this fixes the 'pauses' in the car-chase scene and other scene which use
speech and sfx simultaneously.
svn-id: r12599
Diffstat (limited to 'queen/sound.h')
-rw-r--r-- | queen/sound.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/queen/sound.h b/queen/sound.h index 52d24d2246..9b4897b0b9 100644 --- a/queen/sound.h +++ b/queen/sound.h @@ -53,13 +53,12 @@ class Sound { public: Sound(SoundMixer *mixer, QueenEngine *vm); virtual ~Sound(); - virtual void sfxPlay(const char *name) = 0; + virtual void sfxPlay(const char *name, bool isSpeech) = 0; static Sound *giveSound(SoundMixer *mixer, QueenEngine *vm, uint8 compression); - void waitSfxFinished(); - void playSfx(uint16 sfx); - void playSfx(const char *base); + void playSfx(uint16 sfx, bool isSpeech); + void playSfx(const char *base, bool isSpeech); void playSong(int16 songNum); - void stopSfx() { _mixer->stopHandle(_sfxHandle); } + void stopSpeech() { _mixer->stopHandle(_speechHandle); } bool sfxOn() { return _sfxToggle; } void sfxToggle(bool val) { _sfxToggle = val; } @@ -86,6 +85,8 @@ public: static const int16 _jungleList[]; protected: + void waitFinished(bool isSpeech); + SoundMixer *_mixer; QueenEngine *_vm; @@ -100,27 +101,28 @@ protected: int16 _previousSong; int16 _previousSongNum; PlayingSoundHandle _sfxHandle; + PlayingSoundHandle _speechHandle; }; class SilentSound : public Sound { public: SilentSound(SoundMixer *mixer, QueenEngine *vm) : Sound(mixer, vm) {}; - void sfxPlay(const char *name) { } + void sfxPlay(const char *name, bool isSpeech) { } }; class SBSound : public Sound { public: SBSound(SoundMixer *mixer, QueenEngine *vm) : Sound(mixer, vm) {}; - void sfxPlay(const char *name); + void sfxPlay(const char *name, bool isSpeech); protected: - void playSound(byte *sound, uint32 size); + void playSound(byte *sound, uint32 size, bool isSpeech); }; #ifdef USE_MAD class MP3Sound : public Sound { public: MP3Sound(SoundMixer *mixer, QueenEngine *vm) : Sound(mixer, vm) {}; - void sfxPlay(const char *name); + void sfxPlay(const char *name, bool isSpeech); }; #endif |