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
#![allow(non_camel_case_types)]
#![allow(clippy::redundant_static_lifetimes)]
include!("generated.rs");
pub type soxr_fn_state_t = *const std::os::raw::c_void;
pub type soxr_fn_state_t_mut = *mut std::os::raw::c_void;
pub const SOXR_HQ: u32 = SOXR_20_BITQ;
pub const SOXR_VHQ: u32 = SOXR_28_BITQ;
#[test]
fn test_version() {
use std::ffi::CStr;
let version = unsafe { soxr_version() };
let cstr = unsafe { CStr::from_ptr(version) };
let version = std::str::from_utf8(cstr.to_bytes()).unwrap();
println!("{}", version);
assert_eq!("libsoxr-0.1.3", version);
}