aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMax Horn2002-09-29 18:27:48 +0000
committerMax Horn2002-09-29 18:27:48 +0000
commit31daec5e1cf3d4fe4715b40db3b70028cb16fffe (patch)
tree9543f377153dd0e5335333f366725aeca2ea864c /sound
parent977aea241e849cca829ef1a333789fa90f421b13 (diff)
downloadscummvm-rg350-31daec5e1cf3d4fe4715b40db3b70028cb16fffe.tar.gz
scummvm-rg350-31daec5e1cf3d4fe4715b40db3b70028cb16fffe.tar.bz2
scummvm-rg350-31daec5e1cf3d4fe4715b40db3b70028cb16fffe.zip
temporary pitch bend fix for the QuickTime midi driver. not quite perfect... hrm
svn-id: r5041
Diffstat (limited to 'sound')
-rw-r--r--sound/mididrv.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/mididrv.cpp b/sound/mididrv.cpp
index 1bff26c149..b7e1926089 100644
--- a/sound/mididrv.cpp
+++ b/sound/mididrv.cpp
@@ -665,7 +665,11 @@ void MidiDriver_QT::send(uint32 b)
break;
case 0xE0:{ // Pitch bend
- long theBend = ((((long)midiCmd[1] + (long)(midiCmd[2] << 8))) - 0x4000) / 4;
+ long theBend = (long)midiCmd[1] | (long)(midiCmd[2] << 8);
+ // QuickTime specifies pitchbend in semitones, using 8.8 fixed point values;
+ // but iMuse sends us the pitch bend data relative to +/- 12 semitones. Thus
+ // we have to convert it to the QT format.
+ theBend = (theBend - 0x4000) * 6 / 128;
NASetController(qtNoteAllocator, qtNoteChannel[chanID], kControllerPitchBend, theBend);
}
break;