[Scummvm-cvs-logs] scummvm master -> 11c7d38e09f2c71bacd6ea5517b03561e13b370b

Kirben kirben at optusnet.com.au
Fri Jul 24 12:36:04 CEST 2015


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
11c7d38e09 AGOS: Fix music looping in disk version of Simon1, a regression from svn 22907.


Commit: 11c7d38e09f2c71bacd6ea5517b03561e13b370b
    https://github.com/scummvm/scummvm/commit/11c7d38e09f2c71bacd6ea5517b03561e13b370b
Author: Kirben (kirben at optusnet.com.au)
Date: 2015-07-24T20:34:52+10:00

Commit Message:
AGOS: Fix music looping in disk version of Simon1, a regression from svn 22907.

Changed paths:
    engines/agos/midi.cpp



diff --git a/engines/agos/midi.cpp b/engines/agos/midi.cpp
index f636c13..d11ff20 100644
--- a/engines/agos/midi.cpp
+++ b/engines/agos/midi.cpp
@@ -623,26 +623,27 @@ void MidiPlayer::loadSMF(Common::File *in, int song, bool sfx) {
 		// 1 BYTE : Major version
 		// 1 BYTE : Minor version
 		// 1 BYTE : Ticks (Ranges from 2 - 8, always 2 for SFX)
-		// 1 BYTE : Loop control. 0 = no loop, 1 = loop
-
-		// In the original, the ticks value indicated how many
-		// times the music timer was called before it actually
-		// did something. The larger the value the slower the
-		// music.
-		//
-		// We, on the other hand, have a timer rate which is
-		// used to control by how much the music advances on
-		// each onTimer() call. The larger the value, the
-		// faster the music.
-		//
-		// It seems that 4 corresponds to our base tempo, so
-		// this should be the right way to calculate it.
-		timerRate = (4 * _driver->getBaseTempo()) / p->data[5];
-
-		// According to bug #1004919 calling setLoop() from
-		// within a lock causes a lockup, though I have no
-		// idea when this actually happens.
-		_loopTrack = (p->data[6] != 0);
+		// 1 BYTE : Loop control. 0 = no loop, 1 = loop (Music only)
+		if (!sfx) {
+			// In the original, the ticks value indicated how many
+			// times the music timer was called before it actually
+			// did something. The larger the value the slower the
+			// music.
+			//
+			// We, on the other hand, have a timer rate which is
+			// used to control by how much the music advances on
+			// each onTimer() call. The larger the value, the
+			// faster the music.
+			//
+			// It seems that 4 corresponds to our base tempo, so
+			// this should be the right way to calculate it.
+			timerRate = (4 * _driver->getBaseTempo()) / p->data[5];
+
+			// According to bug #1004919 calling setLoop() from
+			// within a lock causes a lockup, though I have no
+			// idea when this actually happens.
+			_loopTrack = (p->data[6] != 0);
+		}
 	}
 
 	MidiParser *parser = MidiParser::createParser_SMF();






More information about the Scummvm-git-logs mailing list