Midi: correct pitch bend in ALSA driver

MIDI standard pitch bend center position is 0x2000 but ALSA's is 0
This commit is contained in:
Adrien Moulin 2019-08-14 21:47:54 +02:00
parent a545499496
commit 9cecf6623f

View File

@ -435,7 +435,7 @@ static bool alsa_midi_write(void *p, const midi_event_t *event)
else if (ev.type == SND_SEQ_EVENT_PITCHBEND)
{
ev.data.control.channel = event->data[0] & 0x0F;
ev.data.control.value = event->data[1] | (event->data[2] << 7);
ev.data.control.value = (event->data[1] | (event->data[2] << 7)) - 0x2000;
}
else if (ev.type == SND_SEQ_EVENT_SYSEX)
{