1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use jack_sys as j;
use lazy_static::lazy_static;
use std::sync::Mutex;
fn client_name_size() -> usize {
let s = unsafe { j::jack_client_name_size() - 1 };
s as usize
}
lazy_static! {
pub static ref CLIENT_NAME_SIZE: usize = client_name_size();
}
lazy_static! {
pub static ref CREATE_OR_DESTROY_CLIENT_MUTEX: Mutex<()> = Mutex::new(());
}
#[inline(always)]
pub fn sleep_on_test() {
#[cfg(test)]
{
use std::{thread, time};
thread::sleep(time::Duration::from_millis(150));
}
}