diff options
Diffstat (limited to 'engines/sky')
-rw-r--r-- | engines/sky/sound.cpp | 15 | ||||
-rw-r--r-- | engines/sky/sound.h | 2 |
2 files changed, 13 insertions, 4 deletions
diff --git a/engines/sky/sound.cpp b/engines/sky/sound.cpp index 928221a9a5..f15038c0b6 100644 --- a/engines/sky/sound.cpp +++ b/engines/sky/sound.cpp @@ -1025,6 +1025,7 @@ Sound::Sound(Audio::Mixer *mixer, Disk *pDisk, uint8 pVolume) { _mixer = mixer; _saveSounds[0] = _saveSounds[1] = 0xFFFF; _mainSfxVolume = pVolume; + _isPaused = false; } Sound::~Sound(void) { @@ -1254,14 +1255,20 @@ bool Sound::startSpeech(uint16 textNum) { void Sound::fnPauseFx(void) { - _mixer->pauseID(SOUND_CH0, true); - _mixer->pauseID(SOUND_CH1, true); + if (!_isPaused) { + _isPaused = true; + _mixer->pauseID(SOUND_CH0, true); + _mixer->pauseID(SOUND_CH1, true); + } } void Sound::fnUnPauseFx(void) { - _mixer->pauseID(SOUND_CH0, false); - _mixer->pauseID(SOUND_CH1, false); + if (_isPaused) { + _isPaused = false; + _mixer->pauseID(SOUND_CH0, false); + _mixer->pauseID(SOUND_CH1, false); + } } } // End of namespace Sky diff --git a/engines/sky/sound.h b/engines/sky/sound.h index 28e2e8c88a..0ad509700e 100644 --- a/engines/sky/sound.h +++ b/engines/sky/sound.h @@ -89,6 +89,8 @@ private: uint8 *_sampleRates, *_sfxInfo; uint8 _mainSfxVolume; + bool _isPaused; + static uint16 _speechConvertTable[8]; static SfxQueue _sfxQueue[MAX_QUEUED_FX]; }; |