[Scummvm-cvs-logs] SF.net SVN: scummvm: [25196] scummvm/trunk/engines/scumm/he/cup_player_he. cpp

cyx at users.sourceforge.net cyx at users.sourceforge.net
Fri Jan 26 00:17:06 CET 2007


Revision: 25196
          http://scummvm.svn.sourceforge.net/scummvm/?rev=25196&view=rev
Author:   cyx
Date:     2007-01-25 15:17:05 -0800 (Thu, 25 Jan 2007)

Log Message:
-----------
fixed kSfxFlagRestart

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/he/cup_player_he.cpp

Modified: scummvm/trunk/engines/scumm/he/cup_player_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/cup_player_he.cpp	2007-01-25 21:42:18 UTC (rev 25195)
+++ scummvm/trunk/engines/scumm/he/cup_player_he.cpp	2007-01-25 23:17:05 UTC (rev 25196)
@@ -137,17 +137,13 @@
 			}
 			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::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();


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list