GithubHelp home page GithubHelp logo

rust-jack's Introduction

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

[dependencies]
jack = "0.5.0"

Master

[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

  • libjack is required. Consult your package manager or the official website.

  • The general workflow for a JACK application is to start up a JACK daemon and connect the client to it. qjackctl is a convinient way to configure and bring up a JACK server through a GUI.

  • JACK FAQ

Testing

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

Setting Up JACK Dummy Server

$ ./dummy_jack_server.sh

which runs the command

$ 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

$ cargo test

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

$ 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

  • String lengths in the "C" API include the NULL character while these Rust bindings do not. generally rust_size(x) = c_size(x) - 1.
  • "C" bindings require functions to be registered while Rust bindings register an object with a trait.
  • jack_on_shutdown has been removed, uses only jack_on_info_shutdown.
  • Rust enums vs C enums
  • Rust bitflags vs C integers used as flags
  • deprecated JACK functions are not used/implemented in Rust bindings

C JACK API

Main Page

rust-jack's People

Contributors

cramertj avatar wmedrano avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.