[Scummvm-cvs-logs] scummvm master -> f280789afe397e384a81411a65e1e12a308c1125

wjp wjp at usecode.org
Tue Apr 16 23:12:57 CEST 2013


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

Summary:
457f5da095 SCI: Don't suppress end-of-track delta in SCI0 midi
f280789afe SCI: Don't suppress loop delta in SCI1 midi


Commit: 457f5da0957a964bff95dc4e545817540332d71d
    https://github.com/scummvm/scummvm/commit/457f5da0957a964bff95dc4e545817540332d71d
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2013-04-16T14:04:33-07:00

Commit Message:
SCI: Don't suppress end-of-track delta in SCI0 midi

This fixes the main part of bug #3487090.
This seems to be a conversion error from SCI1's channel mixing to SCI0's
channel filtering code.

Changed paths:
    engines/sci/sound/midiparser_sci.cpp



diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp
index 4e54797..2e66a16 100644
--- a/engines/sci/sound/midiparser_sci.cpp
+++ b/engines/sci/sound/midiparser_sci.cpp
@@ -251,15 +251,14 @@ byte *MidiParser_SCI::midiFilterChannels(int channelMask) {
 			if (curChannel != 0xF)
 				containsMidiData = true;
 
-			if (command != kEndOfTrack) {
-				// Write delta
-				while (delta > 240) {
-					*outData++ = 0xF8;
-					delta -= 240;
-				}
-				*outData++ = (byte)delta;
-				delta = 0;
+			// Write delta
+			while (delta > 240) {
+				*outData++ = 0xF8;
+				delta -= 240;
 			}
+			*outData++ = (byte)delta;
+			delta = 0;
+
 			// Write command
 			switch (command) {
 			case 0xF0: // sysEx
@@ -302,7 +301,7 @@ byte *MidiParser_SCI::midiFilterChannels(int channelMask) {
 	}
 
 	// Insert stop event
-	*outData++ = 0;    // Delta
+	// (Delta is already output above)
 	*outData++ = 0xFF; // Meta event
 	*outData++ = 0x2F; // End of track (EOT)
 	*outData++ = 0x00;


Commit: f280789afe397e384a81411a65e1e12a308c1125
    https://github.com/scummvm/scummvm/commit/f280789afe397e384a81411a65e1e12a308c1125
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2013-04-16T14:10:09-07:00

Commit Message:
SCI: Don't suppress loop delta in SCI1 midi

This fixes bug #3293354.

Changed paths:
    engines/sci/sound/midiparser_sci.cpp



diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp
index 2e66a16..9546b15 100644
--- a/engines/sci/sound/midiparser_sci.cpp
+++ b/engines/sci/sound/midiparser_sci.cpp
@@ -531,8 +531,11 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) {
 				// Check if the hold ID marker is the same as the hold ID
 				// marker set for that song by cmdSetSoundHold.
 				// If it is, loop back, but don't stop notes when jumping.
-				if (info.basic.param2 == _pSnd->hold)
+				if (info.basic.param2 == _pSnd->hold) {
+					uint32 extraDelta = info.delta;
 					jumpToTick(_loopTick, false, false);
+					_nextEvent.delta += extraDelta;
+				}
 				break;
 			case kUpdateCue:
 				_dataincAdd = true;
@@ -635,7 +638,9 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) {
 				// treats this case as an infinite loop (bug #3311911).
 				if (_pSnd->loop || _pSnd->hold > 0) {
 					// We need to play it again...
+					uint32 extraDelta = info.delta;
 					jumpToTick(_loopTick);
+					_nextEvent.delta += extraDelta;
 				} else {
 					_pSnd->status = kSoundStopped;
 					_pSnd->setSignal(SIGNAL_OFFSET);






More information about the Scummvm-git-logs mailing list