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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
/* automatically generated by rust-bindgen */

#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SRC_STATE_tag {
    _unused: [u8; 0],
}
pub type SRC_STATE = SRC_STATE_tag;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SRC_DATA {
    pub data_in: *const f32,
    pub data_out: *mut f32,
    pub input_frames: ::std::os::raw::c_long,
    pub output_frames: ::std::os::raw::c_long,
    pub input_frames_used: ::std::os::raw::c_long,
    pub output_frames_gen: ::std::os::raw::c_long,
    pub end_of_input: ::std::os::raw::c_int,
    pub src_ratio: f64,
}
#[test]
fn bindgen_test_layout_SRC_DATA() {
    assert_eq!(
        ::std::mem::size_of::<SRC_DATA>(),
        64usize,
        concat!("Size of: ", stringify!(SRC_DATA))
    );
    assert_eq!(
        ::std::mem::align_of::<SRC_DATA>(),
        8usize,
        concat!("Alignment of ", stringify!(SRC_DATA))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SRC_DATA>())).data_in as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SRC_DATA),
            "::",
            stringify!(data_in)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SRC_DATA>())).data_out as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(SRC_DATA),
            "::",
            stringify!(data_out)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SRC_DATA>())).input_frames as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(SRC_DATA),
            "::",
            stringify!(input_frames)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SRC_DATA>())).output_frames as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(SRC_DATA),
            "::",
            stringify!(output_frames)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SRC_DATA>())).input_frames_used as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(SRC_DATA),
            "::",
            stringify!(input_frames_used)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SRC_DATA>())).output_frames_gen as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(SRC_DATA),
            "::",
            stringify!(output_frames_gen)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SRC_DATA>())).end_of_input as *const _ as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(SRC_DATA),
            "::",
            stringify!(end_of_input)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<SRC_DATA>())).src_ratio as *const _ as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(SRC_DATA),
            "::",
            stringify!(src_ratio)
        )
    );
}
pub type src_callback_t = ::std::option::Option<
    unsafe extern "C" fn(
        cb_data: *mut ::std::os::raw::c_void,
        data: *mut *mut f32,
    ) -> ::std::os::raw::c_long,
>;
extern "C" {
    pub fn src_new(
        converter_type: ::std::os::raw::c_int,
        channels: ::std::os::raw::c_int,
        error: *mut ::std::os::raw::c_int,
    ) -> *mut SRC_STATE;
}
extern "C" {
    pub fn src_clone(orig: *mut SRC_STATE, error: *mut ::std::os::raw::c_int) -> *mut SRC_STATE;
}
extern "C" {
    pub fn src_callback_new(
        func: src_callback_t,
        converter_type: ::std::os::raw::c_int,
        channels: ::std::os::raw::c_int,
        error: *mut ::std::os::raw::c_int,
        cb_data: *mut ::std::os::raw::c_void,
    ) -> *mut SRC_STATE;
}
extern "C" {
    pub fn src_delete(state: *mut SRC_STATE) -> *mut SRC_STATE;
}
extern "C" {
    pub fn src_process(state: *mut SRC_STATE, data: *mut SRC_DATA) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn src_callback_read(
        state: *mut SRC_STATE,
        src_ratio: f64,
        frames: ::std::os::raw::c_long,
        data: *mut f32,
    ) -> ::std::os::raw::c_long;
}
extern "C" {
    pub fn src_simple(
        data: *mut SRC_DATA,
        converter_type: ::std::os::raw::c_int,
        channels: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn src_get_name(converter_type: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn src_get_description(
        converter_type: ::std::os::raw::c_int,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn src_get_version() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn src_set_ratio(state: *mut SRC_STATE, new_ratio: f64) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn src_get_channels(state: *mut SRC_STATE) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn src_reset(state: *mut SRC_STATE) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn src_is_valid_ratio(ratio: f64) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn src_error(state: *mut SRC_STATE) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn src_strerror(error: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
}
pub const SRC_SINC_BEST_QUALITY: _bindgen_ty_1 = 0;
pub const SRC_SINC_MEDIUM_QUALITY: _bindgen_ty_1 = 1;
pub const SRC_SINC_FASTEST: _bindgen_ty_1 = 2;
pub const SRC_ZERO_ORDER_HOLD: _bindgen_ty_1 = 3;
pub const SRC_LINEAR: _bindgen_ty_1 = 4;
pub type _bindgen_ty_1 = u32;
extern "C" {
    pub fn src_short_to_float_array(
        in_: *const ::std::os::raw::c_short,
        out: *mut f32,
        len: ::std::os::raw::c_int,
    );
}
extern "C" {
    pub fn src_float_to_short_array(
        in_: *const f32,
        out: *mut ::std::os::raw::c_short,
        len: ::std::os::raw::c_int,
    );
}
extern "C" {
    pub fn src_int_to_float_array(
        in_: *const ::std::os::raw::c_int,
        out: *mut f32,
        len: ::std::os::raw::c_int,
    );
}
extern "C" {
    pub fn src_float_to_int_array(
        in_: *const f32,
        out: *mut ::std::os::raw::c_int,
        len: ::std::os::raw::c_int,
    );
}