From 35b6cfcd9c7cb4d9554a7ba1e8a62612adaa23db Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Thu, 25 Jan 2007 23:17:05 +0000 Subject: fixed kSfxFlagRestart svn-id: r25196 --- engines/scumm/he/cup_player_he.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'engines/scumm') 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(); -- cgit v1.2.3