aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorGregory Montoir2007-01-25 23:17:05 +0000
committerGregory Montoir2007-01-25 23:17:05 +0000
commit35b6cfcd9c7cb4d9554a7ba1e8a62612adaa23db (patch)
tree3e773b35b5b85e360c4aaa87364f18b9b8b94e4b /engines/scumm
parent519af02245354ced0680ad3b0381eb62c69a92ed (diff)
downloadscummvm-rg350-35b6cfcd9c7cb4d9554a7ba1e8a62612adaa23db.tar.gz
scummvm-rg350-35b6cfcd9c7cb4d9554a7ba1e8a62612adaa23db.tar.bz2
scummvm-rg350-35b6cfcd9c7cb4d9554a7ba1e8a62612adaa23db.zip
fixed kSfxFlagRestart
svn-id: r25196
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/he/cup_player_he.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/engines/scumm/he/cup_player_he.cpp b/engines/scumm/he/cup_player_he.cpp
index a6d6da22b6..695d298be6 100644
--- a/engines/scumm/he/cup_player_he.cpp
+++ b/engines/scumm/he/cup_player_he.cpp
@@ -137,17 +137,13 @@ void CUP_Player::updateSfx() {
}
continue;
}
- if ((sfx->flags & kSfxFlagRestart) == 0) {
- bool alreadyPlaying = false;
+ if ((sfx->flags & kSfxFlagRestart) != 0) {
for (int ch = 0; ch < kSfxChannels; ++ch) {
if (_mixer->isSoundHandleActive(_sfxChannels[ch].handle) && _sfxChannels[ch].sfxNum == sfx->num) {
- alreadyPlaying = true;
+ _mixer->stopHandle(_sfxChannels[ch].handle);
break;
}
}
- if (alreadyPlaying) {
- continue;
- }
}
CUP_SfxChannel *sfxChannel = 0;
for (int ch = 0; ch < kSfxChannels; ++ch) {
@@ -185,6 +181,7 @@ void CUP_Player::updateSfx() {
void CUP_Player::waitForSfxChannel(int channel) {
assert(channel >= 0 && channel < kSfxChannels);
CUP_SfxChannel *sfxChannel = &_sfxChannels[channel];
+ debug(1, "waitForSfxChannel %d", channel);
if ((sfxChannel->flags & kSfxFlagLoop) == 0) {
while (_mixer->isSoundHandleActive(sfxChannel->handle) && !_vm->_quit) {
_vm->parseEvents();