diff options
author | Max Horn | 2002-09-29 18:27:48 +0000 |
---|---|---|
committer | Max Horn | 2002-09-29 18:27:48 +0000 |
commit | 31daec5e1cf3d4fe4715b40db3b70028cb16fffe (patch) | |
tree | 9543f377153dd0e5335333f366725aeca2ea864c /sound | |
parent | 977aea241e849cca829ef1a333789fa90f421b13 (diff) | |
download | scummvm-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.cpp | 6 |
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; |