[Scummvm-cvs-logs] SF.net SVN: scummvm: [22412] scummvm/trunk/engines/simon/midi.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Fri May 12 03:44:58 CEST 2006


Revision: 22412
Author:   eriktorbjorn
Date:     2006-05-12 03:29:58 -0700 (Fri, 12 May 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22412&view=rev

Log Message:
-----------
In Simon 1, when returning to normal size, the MIDI music contains "All
Controllers Off" messages. This should, among other things, reset the channel
volume to 100. Until now, however, we did not re-adjust the volume by the
master volume (like we do for ordinary volume control changes), so all of a
sudden there would be channels playing at the wrong volume.

This was particularly noticeable if you first turned down the music volume to
really low.

Modified Paths:
--------------
    scummvm/trunk/engines/simon/midi.cpp
Modified: scummvm/trunk/engines/simon/midi.cpp
===================================================================
--- scummvm/trunk/engines/simon/midi.cpp	2006-05-12 08:49:04 UTC (rev 22411)
+++ scummvm/trunk/engines/simon/midi.cpp	2006-05-12 10:29:58 UTC (rev 22412)
@@ -110,6 +110,12 @@
 		// has already been allocated.
 		if (!_current->channel[b & 0x0F])
 			return;
+	} else if ((b & 0xFFF0) == 0x79B0) {
+		// A minimum implementation of "All controllers off" should set
+		// the volume to 100. We have to make sure that volume is
+		// re-adjusted by the master volume afterwards. This happens in
+		// Simon 1, on eating the mushroom to turn back to normal size.
+		_current->volume[channel] = 100;
 	}
 
 	if (!_current->channel[channel])
@@ -118,6 +124,8 @@
 		if (channel == 9)
 			_current->channel[9]->volume(_current->volume[9] * _masterVolume / 255);
 		_current->channel[channel]->send(b);
+		if ((b & 0xFFF0) == 0x79B0)
+			_current->channel[channel]->volume(_current->volume[channel] * _masterVolume / 255);
 	}
 }
 


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