|
| 1 | + |
| 2 | +# Table of Contents |
| 3 | + |
| 4 | +1. [Overview](#Overview-9s7h6d81ktj0) |
| 5 | +2. [Testing](#Testing-7y451e81ktj0) |
| 6 | + 1. [Possible Issues](#TestingPossibleIssues-8u551e81ktj0) |
| 7 | + |
| 8 | +- [](https://opensource.org/licenses/MIT) |
| 9 | +- [](https://github.com/RustAudio/rust-jack/actions) |
| 10 | +- [](https://crates.io/crates/jack) |
| 11 | +- [](https://docs.rs/jack) |
| 12 | + |
| 13 | + |
| 14 | +<a id="Overview-9s7h6d81ktj0"></a> |
| 15 | + |
| 16 | +# Overview |
| 17 | + |
| 18 | +Rust bindings for the [JACK Audio Connection Kit](<https://jackaudio.org>). These bindings work on every |
| 19 | +operating system that JACK does. |
| 20 | + |
| 21 | +The JACK server is usually started by the user or system. Clients can request that the JACK server is |
| 22 | +started on demand when they connect, but this can be disabled by the user and is the recommended |
| 23 | +configuration. |
| 24 | + |
| 25 | +- Linux and BSD users may install JACK1, JACK2, or Pipewire JACK from their |
| 26 | + system package manager. |
| 27 | +- Windows users may install JACK from the |
| 28 | + |
| 29 | +[official website](<http://jackaudio.org/downloads/>) or |
| 30 | +[Chocolatey](<https://community.chocolatey.org/packages/jack>). |
| 31 | + |
| 32 | +- macOS users may install JACK from the [official website](<http://jackaudio.org/downloads/>) or |
| 33 | + |
| 34 | +[Homebrew](<https://formulae.brew.sh/formula/jack>). |
| 35 | + |
| 36 | +[:heart: Sponsor](<https://github.com/sponsors/wmedrano>) |
| 37 | + |
| 38 | +Refer to the [documentation](<https://docs.rs/jack/>) for details about the API, building, and packaging. |
| 39 | +Also take a look at the `examples` directory for usage. |
| 40 | + |
| 41 | + |
| 42 | +<a id="Testing-7y451e81ktj0"></a> |
| 43 | + |
| 44 | +# Testing |
| 45 | + |
| 46 | +Testing requires setting up a dummy server and running the tests using a single |
| 47 | +thread. |
| 48 | + |
| 49 | +```sh |
| 50 | +# Set up a dummy server for tests. The script is included in this repository. |
| 51 | +./dummy_jack_server.sh & |
| 52 | +# Run tests with limited concurrency. Optionally, `cargo nextest run` is set up |
| 53 | +# to run single threaded by default. |
| 54 | +RUST_TEST_THREADS=1 cargo test |
| 55 | + |
| 56 | +``` |
| 57 | + |
| 58 | +**Note**: We use a single thread for tests since too many client instantiations |
| 59 | +in short periods of time cause some unit tests to interact negatively with each |
| 60 | +other. Additionally the JACK server may become flaky. |
| 61 | + |
| 62 | + |
| 63 | +<a id="TestingPossibleIssues-8u551e81ktj0"></a> |
| 64 | + |
| 65 | +## Possible Issues |
| 66 | + |
| 67 | +If the tests are failing, a possible gotcha may be timing issues. |
| 68 | + |
| 69 | +1. Increase the value used by `sleep_on_test` in `client/common.rs`. |
| 70 | + |
| 71 | +Another case is that libjack may be broken on your setup. Try using libjack2 or |
| 72 | +pipewire-jack. |
0 commit comments