[Scummvm-cvs-logs] CVS: scummvm/scumm imuse_digi.cpp,1.70,1.71

Pawel Kolodziejski aquadran at users.sourceforge.net
Wed Dec 24 09:31:02 CET 2003


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

Modified Files:
	imuse_digi.cpp 
Log Message:
fixed ft sounds channels initialization

Index: imuse_digi.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse_digi.cpp,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- imuse_digi.cpp	24 Dec 2003 17:03:42 -0000	1.70
+++ imuse_digi.cpp	24 Dec 2003 17:30:47 -0000	1.71
@@ -838,19 +838,20 @@
 			int t;
 
 			if (READ_UINT32(ptr) == MKID('Crea')) {
+				byte *t_ptr= readCreativeVocFile(ptr, size, _channel[l].freq);
+				_channel[l].mixerSize = _channel[l].freq * 2;
+				_channel[l].size = size;
 				_channel[l].bits = 8;
 				_channel[l].channels = 2;
 				_channel[l].mixerFlags = SoundMixer::FLAG_STEREO | SoundMixer::FLAG_REVERSE_STEREO | SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_AUTOFREE;
-				_channel[l].mixerSize = _channel[l].freq * 2;
-
-				byte *t_ptr= readCreativeVocFile(ptr, size, _channel[l].freq);
 				_channel[l].data = (byte *)malloc(size);
+
 				for (t = 0; t < size / 2; t++) {
 					*(_channel[l].data + t * 2 + 0) = *(t_ptr + t);
 					*(_channel[l].data + t * 2 + 1) = *(t_ptr + t);
 				}
+
 				free(t_ptr);
-				_channel[l].size = size;
 			} else if (READ_UINT32(ptr) == MKID('iMUS')) {
 				ptr += 16;
 				for (;;) {





More information about the Scummvm-git-logs mailing list