[Scummvm-cvs-logs] CVS: scummvm/scumm imuse.cpp,1.100,1.101

Jamieson Christian jamieson630 at users.sourceforge.net
Tue Dec 17 23:49:02 CET 2002


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

Modified Files:
	imuse.cpp 
Log Message:
message.log

Index: imuse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.cpp,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -d -r1.100 -r1.101
--- imuse.cpp	15 Dec 2002 01:55:27 -0000	1.100
+++ imuse.cpp	18 Dec 2002 07:48:02 -0000	1.101
@@ -44,19 +44,7 @@
 #define MDPG_TAG "MDpg"
 #define MDHD_TAG "MDhd"
 
-#ifdef FORCE_MT32_SOUNDS
-static const byte mt32_to_gmidi[128] = {
-//    0    1    2    3    4    5    6    7    8    9    A    B    C    D    E    F
-	  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,  15, // 0x
-	 16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,  28,  29,  30,  31, // 1x
-	 32,  33,  34,  35,  36,  37,  38,  39,  40,  41,  42,  43,  44,  45,  46,  47, // 2x
-	 48,  49,  50,  51,  52,  53,  54,  55,  56,  57,  58,  59,  60,  61,  62,  63, // 3x
-	 64,  65,  66,  67,  68,  69,  70,  71,  72,  73,  74,  75,  76,  77,  78,  79, // 4x
-	 80,  81,  82,  83,  84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95, // 5x
-	 96,  97,  98,  99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, // 6x
-	112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127  // 7x
-};
-#else
+#ifndef FORCE_MT32_SOUNDS
 // Roland to General Midi patch table. Still needs some work.
 static const byte mt32_to_gmidi[128] = {
 //    0    1    2    3    4    5    6    7    8    9    A    B    C    D    E    F
@@ -2302,6 +2290,8 @@
 			// Roland custom instrument definition.
 			part = get_part (p[0] & 0x0F);
 			if (part) {
+#ifndef FORCE_MT32_SOUNDS
+				// Convert to a GM program change.
 				memcpy (buf, p + 6, 10);
 				buf[10] = '\0';
 				for (b = 0; b < ARRAYSIZE(roland_to_gm_map); ++b) {
@@ -2318,6 +2308,11 @@
 					}
 				}
 				warning ("MT-32 instrument \"%s\" not supported yet", buf);
+#else
+				// Send SysEx directly.
+				p[0] = part->_mc->getNumber();
+				part->_mc->device()->sysEx (p - 1, len);
+#endif
 			}
 		} else {
 			warning ("Unknown SysEx manufacturer 0x%02X", (int) a);
@@ -3661,8 +3656,10 @@
 
 void IMuseGM::midiProgram(MidiChannel *mc, byte program, bool mt32emulate)
 {
+#ifndef FORCE_MT32_SOUNDS
 	if (mt32emulate)
 		program = mt32_to_gmidi[program];
+#endif
 	mc->programChange (program);
 }
 





More information about the Scummvm-git-logs mailing list