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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Jan 14 17:39:47 CET 2010


Revision: 47298
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47298&view=rev
Author:   thebluegr
Date:     2010-01-14 16:39:47 +0000 (Thu, 14 Jan 2010)

Log Message:
-----------
Hold pedal is now reset as well when a sound is unloaded

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

Modified: scummvm/trunk/engines/sci/sound/midiparser_sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/midiparser_sci.cpp	2010-01-14 01:44:11 UTC (rev 47297)
+++ scummvm/trunk/engines/sci/sound/midiparser_sci.cpp	2010-01-14 16:39:47 UTC (rev 47298)
@@ -94,16 +94,15 @@
 		_mixedData = NULL;
 	}
 
-	// Center the pitch wheels in preparation for the next piece of music
+	// Center the pitch wheels and hold pedal in preparation for the next piece of music
 	// TODO: We should monitor what channels are used by each song, and only
 	// reset these channels, not all of them!
 	if (_driver) {
 		for (int i = 0; i < 16; ++i) {
-			_driver->send(0xE0 | i, 0, 0x40);
+			_driver->send(0xE0 | i, 0, 0x40);	// Reset pitch wheel
+			_driver->send(0xB0 | i, 0x40, 0);	// Reset hold pedal
 		}
 	}
-
-	// TODO: Reset hold pedal
 }
 
 void MidiParser_SCI::parseNextEvent(EventInfo &info) {


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