Boddlnagg / midir

Cross-platform realtime MIDI processing in Rust.
MIT License
611 stars 76 forks source link

Jack backend #2

Closed Boddlnagg closed 9 years ago

Boddlnagg commented 9 years ago

See https://github.com/thestk/rtmidi/blob/master/RtMidi.cpp#L2406-L2818 for reference.

Probably can use https://github.com/nicklan/rust-jack (Update: I checked now, and not all functions used in RtMidi are bound here ... missing are namely jack_get_ports and several jack_ringbuffer_ ones; probably it's best to bindgen new complete bindings and publishing them as jack-sys).

Jack should be selectable via Cargo feature jack statically (i.e. instead of ALSA/CoreMIDI – the feature has no influence on Windows). Maybe there also is a way to select the best backend automatically (e.g. always use Jack if Jack is installed on the system).

Additionally, it would be nice to have a way to compile with support for both Jack and the other backend and give applications the ability to choose the backend at runtime.

Boddlnagg commented 9 years ago

This is done. Filed a followup for the dynamic backend selection at #4.