libsamplerate_sys/
bindings.rs1#[repr(C)]
4#[derive(Debug, Copy, Clone)]
5pub struct SRC_STATE_tag {
6 _unused: [u8; 0],
7}
8pub type SRC_STATE = SRC_STATE_tag;
9#[repr(C)]
10#[derive(Debug, Copy, Clone)]
11pub struct SRC_DATA {
12 pub data_in: *const f32,
13 pub data_out: *mut f32,
14 pub input_frames: ::std::os::raw::c_long,
15 pub output_frames: ::std::os::raw::c_long,
16 pub input_frames_used: ::std::os::raw::c_long,
17 pub output_frames_gen: ::std::os::raw::c_long,
18 pub end_of_input: ::std::os::raw::c_int,
19 pub src_ratio: f64,
20}
21pub type src_callback_t = ::std::option::Option<
22 unsafe extern "C" fn(
23 cb_data: *mut ::std::os::raw::c_void,
24 data: *mut *mut f32,
25 ) -> ::std::os::raw::c_long,
26>;
27extern "C" {
28 pub fn src_new(
29 converter_type: ::std::os::raw::c_int,
30 channels: ::std::os::raw::c_int,
31 error: *mut ::std::os::raw::c_int,
32 ) -> *mut SRC_STATE;
33}
34extern "C" {
35 pub fn src_clone(orig: *mut SRC_STATE, error: *mut ::std::os::raw::c_int) -> *mut SRC_STATE;
36}
37extern "C" {
38 pub fn src_callback_new(
39 func: src_callback_t,
40 converter_type: ::std::os::raw::c_int,
41 channels: ::std::os::raw::c_int,
42 error: *mut ::std::os::raw::c_int,
43 cb_data: *mut ::std::os::raw::c_void,
44 ) -> *mut SRC_STATE;
45}
46extern "C" {
47 pub fn src_delete(state: *mut SRC_STATE) -> *mut SRC_STATE;
48}
49extern "C" {
50 pub fn src_process(state: *mut SRC_STATE, data: *mut SRC_DATA) -> ::std::os::raw::c_int;
51}
52extern "C" {
53 pub fn src_callback_read(
54 state: *mut SRC_STATE,
55 src_ratio: f64,
56 frames: ::std::os::raw::c_long,
57 data: *mut f32,
58 ) -> ::std::os::raw::c_long;
59}
60extern "C" {
61 pub fn src_simple(
62 data: *mut SRC_DATA,
63 converter_type: ::std::os::raw::c_int,
64 channels: ::std::os::raw::c_int,
65 ) -> ::std::os::raw::c_int;
66}
67extern "C" {
68 pub fn src_get_name(converter_type: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
69}
70extern "C" {
71 pub fn src_get_description(
72 converter_type: ::std::os::raw::c_int,
73 ) -> *const ::std::os::raw::c_char;
74}
75extern "C" {
76 pub fn src_get_version() -> *const ::std::os::raw::c_char;
77}
78extern "C" {
79 pub fn src_set_ratio(state: *mut SRC_STATE, new_ratio: f64) -> ::std::os::raw::c_int;
80}
81extern "C" {
82 pub fn src_get_channels(state: *mut SRC_STATE) -> ::std::os::raw::c_int;
83}
84extern "C" {
85 pub fn src_reset(state: *mut SRC_STATE) -> ::std::os::raw::c_int;
86}
87extern "C" {
88 pub fn src_is_valid_ratio(ratio: f64) -> ::std::os::raw::c_int;
89}
90extern "C" {
91 pub fn src_error(state: *mut SRC_STATE) -> ::std::os::raw::c_int;
92}
93extern "C" {
94 pub fn src_strerror(error: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
95}
96pub const SRC_SINC_BEST_QUALITY: ::std::os::raw::c_uint = 0;
97pub const SRC_SINC_MEDIUM_QUALITY: ::std::os::raw::c_uint = 1;
98pub const SRC_SINC_FASTEST: ::std::os::raw::c_uint = 2;
99pub const SRC_ZERO_ORDER_HOLD: ::std::os::raw::c_uint = 3;
100pub const SRC_LINEAR: ::std::os::raw::c_uint = 4;
101pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
102extern "C" {
103 pub fn src_short_to_float_array(
104 in_: *const ::std::os::raw::c_short,
105 out: *mut f32,
106 len: ::std::os::raw::c_int,
107 );
108}
109extern "C" {
110 pub fn src_float_to_short_array(
111 in_: *const f32,
112 out: *mut ::std::os::raw::c_short,
113 len: ::std::os::raw::c_int,
114 );
115}
116extern "C" {
117 pub fn src_int_to_float_array(
118 in_: *const ::std::os::raw::c_int,
119 out: *mut f32,
120 len: ::std::os::raw::c_int,
121 );
122}
123extern "C" {
124 pub fn src_float_to_int_array(
125 in_: *const f32,
126 out: *mut ::std::os::raw::c_int,
127 len: ::std::os::raw::c_int,
128 );
129}