You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I call sendMessage on ALSA, there is a delay before it actually gets sent.
If RtMidiOut is destroyed too soon after the sendMessage(), the message never transmits.
In a MIDI player program, I want to send final events to restore the state of the instrument after playing, but they don't happen.
If you run this and connect it to gmidimonitor, you may be able to reproduce the problem.
Steps
Run the program, and press enter at each step when prompted.
In the monitor, you see a NoteOn event happen, but not NoteOff.
Compile and run again, but uncommenting a 1 second temporization before the end.
You should see the two events.
Notes
The ALSA api returned 0 on snd_seq_drain_output(), which suggests the event was sent, but in reality it wasn't (yet).
A relevant API may be snd_seq_sync_output_queue() but I couldn't get anything of it in all I tried.
i was not able to reproduce this - i see the Note Off event in both cases. using Linux 4.8.0-53-generic #56~16.04.1-Ubuntu SMP, with libasound2 version 1.1.0 and RtMidi version 3.0.0 (latest release).
Just now I find myself unable to reproduce the bug too.
And I realize it's because I was connecting through a2j before. And it was a2j the culprit of the bug all along... Under ordinary conditions it works. So I'm closing this.
When I call sendMessage on ALSA, there is a delay before it actually gets sent.
If RtMidiOut is destroyed too soon after the sendMessage(), the message never transmits.
In a MIDI player program, I want to send final events to restore the state of the instrument after playing, but they don't happen.
Minimal test program: miditest.cc
If you run this and connect it to gmidimonitor, you may be able to reproduce the problem.
In the monitor, you see a NoteOn event happen, but not NoteOff.
You should see the two events.
The ALSA api returned 0 on
snd_seq_drain_output()
, which suggests the event was sent, but in reality it wasn't (yet).A relevant API may be
snd_seq_sync_output_queue()
but I couldn't get anything of it in all I tried.Linux quad 4.15.15-1-ARCH Fix rtmidi-config, add install/uninstall targets, support --prefix. #1 SMP PREEMPT Sat Mar 31 23:59:25 UTC 2018 x86_64 GNU/Linux
alsa-lib 1.1.5
The text was updated successfully, but these errors were encountered: