dlls/winmm/winealsa/midi.c: Bug in MIDI_CMD_BENDER fixed
Johannes Koch
Admin at darkvb.de
Tue Jul 26 16:52:55 CDT 2005
The pitch value was wrongly converted and has to be centered around zero.
Changelog
Fixed pitch bending in the alsa midi driver.
-------------- next part --------------
? patch.diff
Index: dlls/winmm/winealsa/midi.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/winealsa/midi.c,v
retrieving revision 1.16
diff -u -p -r1.16 midi.c
--- dlls/winmm/winealsa/midi.c 27 Apr 2005 09:39:56 -0000 1.16
+++ dlls/winmm/winealsa/midi.c 26 Jul 2005 21:31:05 -0000
@@ -833,7 +833,7 @@ static DWORD modData(WORD wDevID, DWORD
snd_seq_ev_set_controller(&event, evt&0x0F, d1, d2);
break;
case MIDI_CMD_BENDER:
- snd_seq_ev_set_pitchbend(&event, evt&0x0F, ((WORD)d1 << 7) | (WORD)d2);
+ snd_seq_ev_set_pitchbend(&event, evt&0x0F, ((WORD)d2 << 7 | (WORD)d1) - 0x2000);
break;
case MIDI_CMD_PGM_CHANGE:
snd_seq_ev_set_pgmchange(&event, evt&0x0F, d1);
More information about the wine-patches
mailing list