[Scummvm-cvs-logs] SF.net SVN: scummvm:[46895] scummvm/trunk/engines/sci/sfx/soundcmd.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sat Jan 2 20:01:34 CET 2010


Revision: 46895
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46895&view=rev
Author:   thebluegr
Date:     2010-01-02 19:01:34 +0000 (Sat, 02 Jan 2010)

Log Message:
-----------
Properly fixed cmdUpdateCues() for SCI0, removing a hack

Modified Paths:
--------------
    scummvm/trunk/engines/sci/sfx/soundcmd.cpp

Modified: scummvm/trunk/engines/sci/sfx/soundcmd.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/soundcmd.cpp	2010-01-02 18:22:58 UTC (rev 46894)
+++ scummvm/trunk/engines/sci/sfx/soundcmd.cpp	2010-01-02 19:01:34 UTC (rev 46895)
@@ -767,13 +767,6 @@
 		return;
 	}
 
-	// In SCI0, make absolutely sure that the sound object hasn't
-	// been deleted (can happen e.g. at the ending of QFG1)
-	if (_soundVersion <= SCI_VERSION_0_LATE) {
-		if (!_segMan->getObject(musicSlot->soundObj))
-			return;
-	}
-
 	// Update digital sound effect slots here
 	Audio::Mixer *mixer = g_system->getMixer();
 
@@ -987,6 +980,11 @@
 
 	const MusicList::iterator end = _music->getPlayListEnd();
 	for (MusicList::iterator i = _music->getPlayListStart(); i != end; ++i) {
+		// Is the sound stopped, and the sound object updated too? If yes, skip
+		// this sound, as SCI0 only allows one active song
+		if ((*i)->signal == 0 && (*i)->status != kSoundPlaying)
+			continue;
+
 		cmdUpdateCues((*i)->soundObj, 0);
 	}
 }


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