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

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Tue Jun 8 11:36:27 CEST 2010


Revision: 49500
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49500&view=rev
Author:   m_kiewitz
Date:     2010-06-08 09:36:27 +0000 (Tue, 08 Jun 2010)

Log Message:
-----------
SCI: if song isn't playing, set signal and don't set fadeout/fadein variables - fixes lsl3 music lost after entering/exiting tv room (bug #3007406)

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

Modified: scummvm/trunk/engines/sci/sound/soundcmd.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/soundcmd.cpp	2010-06-08 03:31:27 UTC (rev 49499)
+++ scummvm/trunk/engines/sci/sound/soundcmd.cpp	2010-06-08 09:36:27 UTC (rev 49500)
@@ -666,6 +666,13 @@
 
 	int volume = musicSlot->volume;
 
+	// If sound is not playing currently, set signal directly
+	if (musicSlot->status != kSoundPlaying) {
+		warning("cmdFadeSound: fading requested, but sound is currently not playing");
+		writeSelectorValue(_segMan, obj, SELECTOR(signal), SIGNAL_OFFSET);
+		return;
+	}
+
 	switch (_argc) {
 	case 2: // SCI0
 		// SCI0 fades out all the time and when fadeout is done it will also stop the music from playing
@@ -688,12 +695,6 @@
 		error("cmdFadeSound: unsupported argc %d", _argc);
 	}
 
-	// If sound is not playing currently, set signal directly
-	if (musicSlot->status != kSoundPlaying) {
-		warning("cmdFadeSound: fading requested, but sound is currently not playing");
-		writeSelectorValue(_segMan, obj, SELECTOR(signal), SIGNAL_OFFSET);
-	}
-
 	debugC(2, kDebugLevelSound, "cmdFadeSound: to %d, step %d, ticker %d", musicSlot->fadeTo, musicSlot->fadeStep, musicSlot->fadeTickerStep);
 #endif
 }


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