Rust JACK

License: MIT

crates.io docs.rs

Build Status Coverage Status

Nice Rust bindings for JACK Audio Connection Kit

Documentation for Master

Check out the examples directory for usage.

Crates

Stable

toml [dependencies] jack = "0.5.2"

Master

toml [dependencies] jack = { git = "https://github.com/RustAudio/rust-jack.git" }

Completeness

For details on which functions from the JACK headers have been implemented, see ffi_completeness.md.

More high-level, creating clients, creating/reading/writing/connecting ports, audio, and midi are supported.

Missing categories include, JACK threading, synchronous processing, transport and control functionality.

Running

Testing

Testing is a little awkward to setup since it relies on a JACK server.

Setting Up JACK Dummy Server

bash $ ./dummy_jack_server.sh

which runs the command

bash $ jackd -r -ddummy -r44100 -p1024 & # Start the dummy JACK server

Testing expects there to be an available JACK server running at a sample rate of 44.1kHz and a buffer size of 1024 samples.

Running the tests

bash $ cargo test

If you want test coverage as well, try cargo kcov.

bash $ cargo install cargo-kcov $ cargo kcov

Possible Issues

If the tests are failing, a possible gotcha may be timing issues.

  1. Rust runs tests in parallel, it may be possible that the JACK server is not keeping up. Set the environment variable RUST_TEST_THREADS to 1.
  2. Increase the value used by sleep_on_test in client/common.rs.

Another case is that libjack may be broken on your setup. Try switching between libjack and libjack2 (they have the same API and libjack2 isn't necessarily newer than libjack), or using a different version.

"C" & Rust API differences

C JACK API

Main Page