diff options
author | Jamieson Christian | 2002-12-18 07:48:02 +0000 |
---|---|---|
committer | Jamieson Christian | 2002-12-18 07:48:02 +0000 |
commit | 71e7d1512fe62f52948e95fb06214c933c887c80 (patch) | |
tree | 1ea4b1817a5c77759a68ff3db952ee0a5061a258 /scumm/imuse.cpp | |
parent | 70783268093f00a61d3673f729a3aa113b5ad43a (diff) | |
download | scummvm-rg350-71e7d1512fe62f52948e95fb06214c933c887c80.tar.gz scummvm-rg350-71e7d1512fe62f52948e95fb06214c933c887c80.tar.bz2 scummvm-rg350-71e7d1512fe62f52948e95fb06214c933c887c80.zip |
message.log
svn-id: r6012
Diffstat (limited to 'scumm/imuse.cpp')
-rw-r--r-- | scumm/imuse.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/scumm/imuse.cpp b/scumm/imuse.cpp index 096b165bfe..a39834d96c 100644 --- a/scumm/imuse.cpp +++ b/scumm/imuse.cpp @@ -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 @@ void Player::parse_sysex(byte *p, uint len) // 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 @@ void Player::parse_sysex(byte *p, uint len) } } 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::midiControl0(byte chan, byte value) void IMuseGM::midiProgram(MidiChannel *mc, byte program, bool mt32emulate) { +#ifndef FORCE_MT32_SOUNDS if (mt32emulate) program = mt32_to_gmidi[program]; +#endif mc->programChange (program); } |