diff options
author | Torbjörn Andersson | 2007-07-21 14:39:12 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2007-07-21 14:39:12 +0000 |
commit | b16d398eb1ad11d3c976ae81427d02609584a571 (patch) | |
tree | b062ce9f2616de7e6e77141620b167dcdb6a2a0c /engines | |
parent | b01f07a548fa883ffde48ac00599de69fab93f5c (diff) | |
download | scummvm-rg350-b16d398eb1ad11d3c976ae81427d02609584a571.tar.gz scummvm-rg350-b16d398eb1ad11d3c976ae81427d02609584a571.tar.bz2 scummvm-rg350-b16d398eb1ad11d3c976ae81427d02609584a571.zip |
The mixer no longer allows unpausing channels that aren't paused. So don't.
svn-id: r28155
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sword2/music.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/engines/sword2/music.cpp b/engines/sword2/music.cpp index b442b6194f..c2374dad9f 100644 --- a/engines/sword2/music.cpp +++ b/engines/sword2/music.cpp @@ -667,8 +667,10 @@ void Sound::muteSpeech(bool mute) { */ void Sound::pauseSpeech() { - _speechPaused = true; - _vm->_mixer->pauseHandle(_soundHandleSpeech, true); + if (!_speechPaused) { + _speechPaused = true; + _vm->_mixer->pauseHandle(_soundHandleSpeech, true); + } } /** @@ -676,8 +678,10 @@ void Sound::pauseSpeech() { */ void Sound::unpauseSpeech() { - _speechPaused = false; - _vm->_mixer->pauseHandle(_soundHandleSpeech, false); + if (_speechPaused) { + _speechPaused = false; + _vm->_mixer->pauseHandle(_soundHandleSpeech, false); + } } /** @@ -801,26 +805,22 @@ int32 Sound::setFxIdVolumePan(int32 id, int vol, int pan) { } void Sound::pauseFx() { - if (_fxPaused) - return; - - for (int i = 0; i < FXQ_LENGTH; i++) { - if (_fxQueue[i].resource) - _vm->_mixer->pauseHandle(_fxQueue[i].handle, true); + if (!_fxPaused) { + for (int i = 0; i < FXQ_LENGTH; i++) { + if (_fxQueue[i].resource) + _vm->_mixer->pauseHandle(_fxQueue[i].handle, true); + } + _fxPaused = true; } - - _fxPaused = true; } void Sound::unpauseFx() { - if (!_fxPaused) - return; - - for (int i = 0; i < FXQ_LENGTH; i++) - if (_fxQueue[i].resource) - _vm->_mixer->pauseHandle(_fxQueue[i].handle, false); - - _fxPaused = false; + if (_fxPaused) { + for (int i = 0; i < FXQ_LENGTH; i++) + if (_fxQueue[i].resource) + _vm->_mixer->pauseHandle(_fxQueue[i].handle, false); + _fxPaused = false; + } } } // End of namespace Sword2 |