[Scummvm-cvs-logs] CVS: scummvm/scumm imuse_digi.cpp,1.68,1.69

Max Horn fingolfin at users.sourceforge.net
Wed Dec 24 08:54:01 CET 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv1752

Modified Files:
	imuse_digi.cpp 
Log Message:
cleanup (code should be 100% equivalent)

Index: imuse_digi.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse_digi.cpp,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- imuse_digi.cpp	24 Dec 2003 00:24:57 -0000	1.68
+++ imuse_digi.cpp	24 Dec 2003 16:52:57 -0000	1.69
@@ -787,21 +787,15 @@
 				debug(5, "Fade: sound(%d), Vol(%d)", _channel[l].idSound, _channel[l].vol / 1000);
 			}
 
-			int32 new_size = _channel[l].mixerSize;
-			int32 mixer_size = new_size;
-
-			if (_channel[l].offset + mixer_size > _channel[l].size) {
-				new_size = _channel[l].size - _channel[l].offset;
-			}
+			int32 mixer_size = _channel[l].mixerSize;
 
 			if (_channel[l].offset + mixer_size > _channel[l].size) {
-				new_size = _channel[l].size - _channel[l].offset;
+				mixer_size = _channel[l].size - _channel[l].offset;
 				_channel[l].toBeRemoved = true;
-				mixer_size = new_size;
 			}
 
 			byte *buf = (byte *)malloc(mixer_size);
-			memcpy(buf, _channel[l].data + _channel[l].offset, new_size);
+			memcpy(buf, _channel[l].data + _channel[l].offset, mixer_size);
 			_channel[l].offset += mixer_size;
 
 			if (_scumm->_silentDigitalImuse == false) {





More information about the Scummvm-git-logs mailing list