aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMax Horn2003-12-24 02:25:59 +0000
committerMax Horn2003-12-24 02:25:59 +0000
commite9b193f2e5237fe7521951f33003183715f3d1ef (patch)
tree137659bcd69d5f177e67afcdbbde6f7ea1a68243 /backends
parent3cd69b641f9de8a4e7a8d1358c4aa49e18dd7559 (diff)
downloadscummvm-rg350-e9b193f2e5237fe7521951f33003183715f3d1ef.tar.gz
scummvm-rg350-e9b193f2e5237fe7521951f33003183715f3d1ef.tar.bz2
scummvm-rg350-e9b193f2e5237fe7521951f33003183715f3d1ef.zip
fix drum channel
svn-id: r11883
Diffstat (limited to 'backends')
-rw-r--r--backends/midi/quicktime.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/backends/midi/quicktime.cpp b/backends/midi/quicktime.cpp
index bbc8d7c320..6d7e40abcb 100644
--- a/backends/midi/quicktime.cpp
+++ b/backends/midi/quicktime.cpp
@@ -94,6 +94,9 @@ int MidiDriver_QT::open() {
qtErr = NANewNoteChannel(qtNoteAllocator, &simpleNoteRequest, &(qtNoteChannel[i]));
if ((qtErr != noErr) || (qtNoteChannel == NULL))
goto bail;
+ // Channel 10 (i.e. index 9) is the drum channel. Set it up as such.
+ // All other channels default to piano.
+ NASetInstrumentNumber(qtNoteAllocator, qtNoteChannel[i], (i == 9 ? kFirstDrumkit : kFirstGMInstrument) + 1);
}
return 0;
@@ -200,8 +203,11 @@ void MidiDriver_QT::send(uint32 b) {
break;
case 0xC0: // Program change
- // FIXME: For chanID 9 (drum channel), shouldn't we use kFirstDrumkit instead of kFirstGMInstrument ?
- NASetInstrumentNumber(qtNoteAllocator, qtNoteChannel[chanID], midiCmd[1] + kFirstGMInstrument);
+ // Don't change instrument for the drum channel (I have no idea how a
+ // program change for the drum channel would work; maybe we would just
+ // have to use 'midiCmd[1] + kFirstDrumkit' ?).
+ if (chanID != 9)
+ NASetInstrumentNumber(qtNoteAllocator, qtNoteChannel[chanID], midiCmd[1] + kFirstGMInstrument);
break;
case 0xE0:{ // Pitch bend