[Scummvm-cvs-logs] CVS: scummvm/queen music.cpp,1.32,1.33
Jerome Fisher
kingguppy at users.sourceforge.net
Sun Apr 3 15:04:18 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/simon midi.cpp,1.67,1.68
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.415,2.416 object.cpp,1.217,1.218 resource.cpp,1.298,1.299 resource_v3.cpp,1.31,1.32 scumm.cpp,1.398,1.399 scumm.h,1.558,1.559
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30995/queen
Modified Files:
music.cpp
Log Message:
Committed patch #1168149 (Shared GM/MT-32 mapping) by eriktorbjorn as-is. This does the following:
- Replaces multiple identical MT-32-to-General MIDI mapping tables with a common one in MidiDriver.
- Changes Sky's GmChannel class to allow NULL instrument and velocity mapping tables, giving a 1-to-1 mapping without creating a dummy table.
Index: music.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/music.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- music.cpp 10 Jan 2005 20:49:35 -0000 1.32
+++ music.cpp 3 Apr 2005 22:01:22 -0000 1.33
@@ -29,19 +29,6 @@
namespace Queen {
-// Instrument mapping for MT32 tracks emulated under GM.
-static const byte mt32_to_gm[128] = {
-// 0 1 2 3 4 5 6 7 8 9 A B C D E F
- 0, 1, 0, 2, 4, 4, 5, 3, 16, 17, 18, 16, 16, 19, 20, 21, // 0x
- 6, 6, 6, 7, 7, 7, 8, 112, 62, 62, 63, 63, 38, 38, 39, 39, // 1x
- 88, 95, 52, 98, 97, 99, 14, 54, 102, 96, 53, 102, 81, 100, 14, 80, // 2x
- 48, 48, 49, 45, 41, 40, 42, 42, 43, 46, 45, 24, 25, 28, 27, 104, // 3x
- 32, 32, 34, 33, 36, 37, 35, 35, 79, 73, 72, 72, 74, 75, 64, 65, // 4x
- 66, 67, 71, 71, 68, 69, 70, 22, 56, 59, 57, 57, 60, 60, 58, 61, // 5x
- 61, 11, 11, 98, 14, 9, 14, 13, 12, 107, 107, 77, 78, 78, 76, 76, // 6x
- 47, 117, 127, 118, 118, 116, 115, 119, 115, 112, 55, 124, 123, 0, 14, 117 // 7x
-};
-
MusicPlayer::MusicPlayer(MidiDriver *driver, byte *data, uint32 size) : _driver(driver), _isPlaying(false), _looping(false), _randomLoop(false), _masterVolume(192), _queuePos(0), _musicData(data), _musicDataSize(size), _passThrough(false), _buf(0) {
memset(_channel, 0, sizeof(_channel));
queueClear();
@@ -142,7 +129,7 @@
volume = volume * _masterVolume / 255;
b = (b & 0xFF00FFFF) | (volume << 16);
} else if ((b & 0xF0) == 0xC0 && !_nativeMT32) {
- b = (b & 0xFFFF00FF) | mt32_to_gm[(b >> 8) & 0xFF] << 8;
+ b = (b & 0xFFFF00FF) | MidiDriver::_mt32ToGm[(b >> 8) & 0xFF] << 8;
}
else if ((b & 0xFFF0) == 0x007BB0) {
//Only respond to All Notes Off if this channel
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/simon midi.cpp,1.67,1.68
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.415,2.416 object.cpp,1.217,1.218 resource.cpp,1.298,1.299 resource_v3.cpp,1.31,1.32 scumm.cpp,1.398,1.399 scumm.h,1.558,1.559
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list