#![allow(non_camel_case_types, dead_code)]
use std::os::raw::c_char;
pub const TSAC_OK: i32 = 0;
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum TsacBackend {
Cpu = 0,
Cuda = 1,
Hip = 2,
Vulkan = 3,
Llvm = 4,
}
pub enum TSACContext {}
unsafe extern "C" {
pub fn tsac_init(
backend: TsacBackend,
n_threads: i32,
model_path: *const c_char,
) -> *mut TSACContext;
pub fn tsac_free(ctx: *mut TSACContext);
pub fn tsac_compress_file(
ctx: *mut TSACContext,
in_wav: *const c_char,
out_txc: *const c_char,
n_codebooks: i32,
) -> i32;
pub fn tsac_decompress_file(
ctx: *mut TSACContext,
in_txc: *const c_char,
out_wav: *const c_char,
) -> i32;
pub fn tsac_version() -> *const c_char;
pub fn tsac_rlx_conv_weight(
ctx: *mut TSACContext,
prefix: *const c_char,
co: *mut i32,
ci: *mut i32,
k: *mut i32,
is_ct: *mut i32,
) -> *mut f32;
pub fn tsac_rlx_f32(ctx: *mut TSACContext, name: *const c_char, n: *mut i32) -> *mut f32;
pub fn tsac_rlx_weight_v_raw(
ctx: *mut TSACContext,
prefix: *const c_char,
d0: *mut i32,
d1: *mut i32,
d2: *mut i32,
) -> *mut f32;
pub fn tsac_rlx_read_codes(
in_txc: *const c_char,
n_frames: *mut i32,
n_cb: *mut i32,
) -> *mut i32;
pub fn tsac_free_buffer(ptr: *mut std::os::raw::c_void);
}