Merge pull request #9306 from elyosh/midi

Midi: fix MT-32 delay and ALSA off pitch playback
This commit is contained in:
Twinaphex 2019-08-14 22:37:53 +02:00 committed by GitHub
commit 20b1bf9b12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

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)
{

View File

@ -14733,7 +14733,9 @@ bool midi_driver_write(uint8_t byte, uint32_t delta_time)
midi_drv_output_event.data_size);
#endif
midi_drv_output_pending = true;
midi_drv_output_pending = true;
midi_drv_output_event.data_size = 0;
midi_drv_output_event.delta_time = 0;
}
return true;