diff options
| author | Travis Howell | 2004-09-02 04:23:13 +0000 |
|---|---|---|
| committer | Travis Howell | 2004-09-02 04:23:13 +0000 |
| commit | 0c5db81d0dc6df0ba82c2b9d40902882d4a2a616 (patch) | |
| tree | b94097c35c688c9c0b055c41dc2695a03739531c | |
| parent | a8a75eb009a98871829295112d1fd2674a85d7a4 (diff) | |
| download | scummvm-rg350-0c5db81d0dc6df0ba82c2b9d40902882d4a2a616.tar.gz scummvm-rg350-0c5db81d0dc6df0ba82c2b9d40902882d4a2a616.tar.bz2 scummvm-rg350-0c5db81d0dc6df0ba82c2b9d40902882d4a2a616.zip | |
Add extra sound check for HE games
svn-id: r14860
| -rw-r--r-- | scumm/sound.cpp | 20 | ||||
| -rw-r--r-- | scumm/sound.h | 2 |
2 files changed, 13 insertions, 9 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp index da15d35327..3538db72a4 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -748,7 +748,9 @@ int Sound::isSoundRunning(int sound) const { return pollCD(); if (_vm->_features & GF_HUMONGOUS) { - if (sound == -2 || sound == 10001) { + if (sound == 10002) { + return !_talkChannelHandle.isActive(); + } else if (sound == -2 || sound == 10001) { return !isSfxFinished(); } else if (sound == -1 || sound == 10000 || sound == _currentMusic) { // getSoundStatus(), with a -1, will return the @@ -825,13 +827,15 @@ bool Sound::isSoundInQueue(int sound) const { return false; } -void Sound::stopSound(int a) { +void Sound::stopSound(int sound) { int i; if (_vm->_features & GF_HUMONGOUS) { - if (a == -2 || a == 10001) { + if (sound == 10002) { + _vm->stopTalk(); + } else if (sound == -2 || sound == 10001) { // Stop current sfx - } else if (a == -1 || a == 10000) { + } else if (sound == -1 || sound == 10000) { // Stop current music if (_vm->_heversion >= 70 || _currentMusic) _vm->_mixer->stopID(_currentMusic); @@ -840,20 +844,20 @@ void Sound::stopSound(int a) { } } - if (a != 0 && a == _currentCDSound) { + if (sound != 0 && sound == _currentCDSound) { _currentCDSound = 0; stopCD(); stopCDTimer(); } if (!(_vm->_features & GF_DIGI_IMUSE)) - _vm->_mixer->stopID(a); + _vm->_mixer->stopID(sound); if (_vm->_musicEngine) - _vm->_musicEngine->stopSound(a); + _vm->_musicEngine->stopSound(sound); for (i = 0; i < ARRAYSIZE(_soundQue2Sound); i++) { - if (_soundQue2Sound[i] == a) { + if (_soundQue2Sound[i] == sound) { _soundQue2Sound[i] = 0; _soundQue2Offset[i] = 0; } diff --git a/scumm/sound.h b/scumm/sound.h index d426e9c625..f743082e4c 100644 --- a/scumm/sound.h +++ b/scumm/sound.h @@ -95,7 +95,7 @@ public: bool isMouthSyncOff(uint pos); int isSoundRunning(int sound) const; bool isSoundInUse(int sound) const; - void stopSound(int a); + void stopSound(int sound); void stopAllSounds(); void soundKludge(int *list, int num); void talkSound(uint32 a, uint32 b, int mode, int channel = 0); |
