aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMax Horn2003-06-24 11:56:43 +0000
committerMax Horn2003-06-24 11:56:43 +0000
commitc9d22c69a23d4cf3714e45d14a28280233f9362e (patch)
tree134138a895a2270dc513585b11d0e42df73abad0 /backends
parenta1f760b9443e6622d269d0f51ae9dbfe951afbe3 (diff)
downloadscummvm-rg350-c9d22c69a23d4cf3714e45d14a28280233f9362e.tar.gz
scummvm-rg350-c9d22c69a23d4cf3714e45d14a28280233f9362e.tar.bz2
scummvm-rg350-c9d22c69a23d4cf3714e45d14a28280233f9362e.zip
fixed volume controller (compared to the core midi backend, volumes are now equal; plus this is the logical implementation :-)
svn-id: r8642
Diffstat (limited to 'backends')
-rw-r--r--backends/midi/quicktime.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/backends/midi/quicktime.cpp b/backends/midi/quicktime.cpp
index 928705ba71..f1187bd01c 100644
--- a/backends/midi/quicktime.cpp
+++ b/backends/midi/quicktime.cpp
@@ -155,11 +155,11 @@ void MidiDriver_QT::send(uint32 b) {
break;
case 0x07: // Volume
- NASetController(qtNoteAllocator, qtNoteChannel[chanID], kControllerVolume, midiCmd[2] * 300);
+ NASetController(qtNoteAllocator, qtNoteChannel[chanID], kControllerVolume, midiCmd[2] << 8);
break;
case 0x0A: // Pan
- NASetController(qtNoteAllocator, qtNoteChannel[chanID], kControllerPan, (midiCmd[2] << 1) + 0xFF);
+ NASetController(qtNoteAllocator, qtNoteChannel[chanID], kControllerPan, (midiCmd[2] << 1) + 256);
break;
case 0x40: // Sustain on/off
@@ -200,7 +200,8 @@ void MidiDriver_QT::send(uint32 b) {
break;
case 0xC0: // Program change
- NASetInstrumentNumber(qtNoteAllocator, qtNoteChannel[chanID], midiCmd[1] + 1);
+ // FIXME: For chanID 9 (drum channel), shouldn't we use kFirstDrumkit instead of kFirstGMInstrument ?
+ NASetInstrumentNumber(qtNoteAllocator, qtNoteChannel[chanID], midiCmd[1] + kFirstGMInstrument);
break;
case 0xE0:{ // Pitch bend