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:
parent
a545499496
commit
9cecf6623f
|
@ -435,7 +435,7 @@ static bool alsa_midi_write(void *p, const midi_event_t *event)
|
||||||
else if (ev.type == SND_SEQ_EVENT_PITCHBEND)
|
else if (ev.type == SND_SEQ_EVENT_PITCHBEND)
|
||||||
{
|
{
|
||||||
ev.data.control.channel = event->data[0] & 0x0F;
|
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)
|
else if (ev.type == SND_SEQ_EVENT_SYSEX)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue