RustAudio / rust-lv2

A safe, fast, and modular framework to create LV2 plugins, written in Rust
Apache License 2.0
171 stars 23 forks source link

Midi output broken on develop #109

Open laenzlinger opened 1 year ago

laenzlinger commented 1 year ago

When compiling against the current development branch the MIDI output does not work

This can be for example tested with the plugin Example Fitfth (Rust Edition) for docs/fifth

How to reproduce:

1) jackd -d alsa 2) jalv http://lv2plug.in/plugins/eg-fifths 3) jack_midi_dump 4) jack_midiseq Sequencer 24000 0 60 8000 12000 63 8000 5) jack_connect Sequencer:out "Example Fifths (Rust Edition):in" 6) jack_connect "Example Fifths (Rust Edition):out" midi-monitor:input

The above experiment works on b6d02f38d40ade7f17af542b9a7b496044ddf821 but does not work on 44aac000be49216ddd00f46aa7e8a05bde4a09f7 (current develop branch)

I did some debugging with rust-gdb and collected the raw buffer of a Note On Midi message in jalv

0x7fe4000b60:    0x00008000    0x00000021    0x00000027    0x00000000
0x7fe4000b70:    0x00008000    0x00000021    0x0000001b    0x00000027
0x7fe4000b80:    0x00000037    0x00000000    0x00000064    0x00000000
0x7fe4000b90:    0x00000003    0x0000000d    0x007f2490 

compared to a working message one can see that there are two additional words 0x00008000 0x00000021 compared to a working sequence atom message

0x7fe4008ba0:    0x00008000    0x00000021    0x00000027    0x00000000
0x7fe4008bb0:    0x0000001b    0x00000027    0x00000037    0x00000000
0x7fe4008bc0:    0x00000064    0x00000000    0x00000003    0x0000000d
0x7fe4008bd0:    0x007f3080