minimp3_sys/
bindings.rs

1/* automatically generated by rust-bindgen 0.71.1 */
2
3pub const _STDINT_H: u32 = 1;
4pub const _FEATURES_H: u32 = 1;
5pub const _DEFAULT_SOURCE: u32 = 1;
6pub const __GLIBC_USE_ISOC23: u32 = 0;
7pub const __USE_ISOC11: u32 = 1;
8pub const __USE_ISOC99: u32 = 1;
9pub const __USE_ISOC95: u32 = 1;
10pub const __USE_POSIX_IMPLICITLY: u32 = 1;
11pub const _POSIX_SOURCE: u32 = 1;
12pub const _POSIX_C_SOURCE: u32 = 200809;
13pub const __USE_POSIX: u32 = 1;
14pub const __USE_POSIX2: u32 = 1;
15pub const __USE_POSIX199309: u32 = 1;
16pub const __USE_POSIX199506: u32 = 1;
17pub const __USE_XOPEN2K: u32 = 1;
18pub const __USE_XOPEN2K8: u32 = 1;
19pub const _ATFILE_SOURCE: u32 = 1;
20pub const __WORDSIZE: u32 = 64;
21pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
22pub const __SYSCALL_WORDSIZE: u32 = 64;
23pub const __TIMESIZE: u32 = 64;
24pub const __USE_TIME_BITS64: u32 = 1;
25pub const __USE_MISC: u32 = 1;
26pub const __USE_ATFILE: u32 = 1;
27pub const __USE_FORTIFY_LEVEL: u32 = 0;
28pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
29pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
30pub const __GLIBC_USE_C23_STRTOL: u32 = 0;
31pub const _STDC_PREDEF_H: u32 = 1;
32pub const __STDC_IEC_559__: u32 = 1;
33pub const __STDC_IEC_60559_BFP__: u32 = 201404;
34pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
35pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404;
36pub const __STDC_ISO_10646__: u32 = 201706;
37pub const __GNU_LIBRARY__: u32 = 6;
38pub const __GLIBC__: u32 = 2;
39pub const __GLIBC_MINOR__: u32 = 40;
40pub const _SYS_CDEFS_H: u32 = 1;
41pub const __glibc_c99_flexarr_available: u32 = 1;
42pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0;
43pub const __HAVE_GENERIC_SELECTION: u32 = 1;
44pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
45pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
46pub const __GLIBC_USE_IEC_60559_BFP_EXT_C23: u32 = 0;
47pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0;
48pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
49pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C23: u32 = 0;
50pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
51pub const _BITS_TYPES_H: u32 = 1;
52pub const _BITS_TYPESIZES_H: u32 = 1;
53pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
54pub const __INO_T_MATCHES_INO64_T: u32 = 1;
55pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
56pub const __STATFS_MATCHES_STATFS64: u32 = 1;
57pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 1;
58pub const __FD_SETSIZE: u32 = 1024;
59pub const _BITS_TIME64_H: u32 = 1;
60pub const _BITS_WCHAR_H: u32 = 1;
61pub const _BITS_STDINT_INTN_H: u32 = 1;
62pub const _BITS_STDINT_UINTN_H: u32 = 1;
63pub const _BITS_STDINT_LEAST_H: u32 = 1;
64pub const INT8_MIN: i32 = -128;
65pub const INT16_MIN: i32 = -32768;
66pub const INT32_MIN: i32 = -2147483648;
67pub const INT8_MAX: u32 = 127;
68pub const INT16_MAX: u32 = 32767;
69pub const INT32_MAX: u32 = 2147483647;
70pub const UINT8_MAX: u32 = 255;
71pub const UINT16_MAX: u32 = 65535;
72pub const UINT32_MAX: u32 = 4294967295;
73pub const INT_LEAST8_MIN: i32 = -128;
74pub const INT_LEAST16_MIN: i32 = -32768;
75pub const INT_LEAST32_MIN: i32 = -2147483648;
76pub const INT_LEAST8_MAX: u32 = 127;
77pub const INT_LEAST16_MAX: u32 = 32767;
78pub const INT_LEAST32_MAX: u32 = 2147483647;
79pub const UINT_LEAST8_MAX: u32 = 255;
80pub const UINT_LEAST16_MAX: u32 = 65535;
81pub const UINT_LEAST32_MAX: u32 = 4294967295;
82pub const INT_FAST8_MIN: i32 = -128;
83pub const INT_FAST16_MIN: i64 = -9223372036854775808;
84pub const INT_FAST32_MIN: i64 = -9223372036854775808;
85pub const INT_FAST8_MAX: u32 = 127;
86pub const INT_FAST16_MAX: u64 = 9223372036854775807;
87pub const INT_FAST32_MAX: u64 = 9223372036854775807;
88pub const UINT_FAST8_MAX: u32 = 255;
89pub const UINT_FAST16_MAX: i32 = -1;
90pub const UINT_FAST32_MAX: i32 = -1;
91pub const INTPTR_MIN: i64 = -9223372036854775808;
92pub const INTPTR_MAX: u64 = 9223372036854775807;
93pub const UINTPTR_MAX: i32 = -1;
94pub const PTRDIFF_MIN: i64 = -9223372036854775808;
95pub const PTRDIFF_MAX: u64 = 9223372036854775807;
96pub const SIG_ATOMIC_MIN: i32 = -2147483648;
97pub const SIG_ATOMIC_MAX: u32 = 2147483647;
98pub const SIZE_MAX: i32 = -1;
99pub const WINT_MIN: u32 = 0;
100pub const WINT_MAX: u32 = 4294967295;
101pub const MINIMP3_MAX_SAMPLES_PER_FRAME: u32 = 2304;
102pub type __u_char = ::core::ffi::c_uchar;
103pub type __u_short = ::core::ffi::c_ushort;
104pub type __u_int = ::core::ffi::c_uint;
105pub type __u_long = ::core::ffi::c_ulong;
106pub type __int8_t = ::core::ffi::c_schar;
107pub type __uint8_t = ::core::ffi::c_uchar;
108pub type __int16_t = ::core::ffi::c_short;
109pub type __uint16_t = ::core::ffi::c_ushort;
110pub type __int32_t = ::core::ffi::c_int;
111pub type __uint32_t = ::core::ffi::c_uint;
112pub type __int64_t = ::core::ffi::c_long;
113pub type __uint64_t = ::core::ffi::c_ulong;
114pub type __int_least8_t = __int8_t;
115pub type __uint_least8_t = __uint8_t;
116pub type __int_least16_t = __int16_t;
117pub type __uint_least16_t = __uint16_t;
118pub type __int_least32_t = __int32_t;
119pub type __uint_least32_t = __uint32_t;
120pub type __int_least64_t = __int64_t;
121pub type __uint_least64_t = __uint64_t;
122pub type __quad_t = ::core::ffi::c_long;
123pub type __u_quad_t = ::core::ffi::c_ulong;
124pub type __intmax_t = ::core::ffi::c_long;
125pub type __uintmax_t = ::core::ffi::c_ulong;
126pub type __dev_t = ::core::ffi::c_ulong;
127pub type __uid_t = ::core::ffi::c_uint;
128pub type __gid_t = ::core::ffi::c_uint;
129pub type __ino_t = ::core::ffi::c_ulong;
130pub type __ino64_t = ::core::ffi::c_ulong;
131pub type __mode_t = ::core::ffi::c_uint;
132pub type __nlink_t = ::core::ffi::c_ulong;
133pub type __off_t = ::core::ffi::c_long;
134pub type __off64_t = ::core::ffi::c_long;
135pub type __pid_t = ::core::ffi::c_int;
136#[repr(C)]
137#[derive(Debug, Copy, Clone)]
138pub struct __fsid_t {
139    pub __val: [::core::ffi::c_int; 2usize],
140}
141#[allow(clippy::unnecessary_operation, clippy::identity_op)]
142const _: () = {
143    ["Size of __fsid_t"][::core::mem::size_of::<__fsid_t>() - 8usize];
144    ["Alignment of __fsid_t"][::core::mem::align_of::<__fsid_t>() - 4usize];
145    ["Offset of field: __fsid_t::__val"][::core::mem::offset_of!(__fsid_t, __val) - 0usize];
146};
147pub type __clock_t = ::core::ffi::c_long;
148pub type __rlim_t = ::core::ffi::c_ulong;
149pub type __rlim64_t = ::core::ffi::c_ulong;
150pub type __id_t = ::core::ffi::c_uint;
151pub type __time_t = ::core::ffi::c_long;
152pub type __useconds_t = ::core::ffi::c_uint;
153pub type __suseconds_t = ::core::ffi::c_long;
154pub type __suseconds64_t = ::core::ffi::c_long;
155pub type __daddr_t = ::core::ffi::c_int;
156pub type __key_t = ::core::ffi::c_int;
157pub type __clockid_t = ::core::ffi::c_int;
158pub type __timer_t = *mut ::core::ffi::c_void;
159pub type __blksize_t = ::core::ffi::c_long;
160pub type __blkcnt_t = ::core::ffi::c_long;
161pub type __blkcnt64_t = ::core::ffi::c_long;
162pub type __fsblkcnt_t = ::core::ffi::c_ulong;
163pub type __fsblkcnt64_t = ::core::ffi::c_ulong;
164pub type __fsfilcnt_t = ::core::ffi::c_ulong;
165pub type __fsfilcnt64_t = ::core::ffi::c_ulong;
166pub type __fsword_t = ::core::ffi::c_long;
167pub type __ssize_t = ::core::ffi::c_long;
168pub type __syscall_slong_t = ::core::ffi::c_long;
169pub type __syscall_ulong_t = ::core::ffi::c_ulong;
170pub type __loff_t = __off64_t;
171pub type __caddr_t = *mut ::core::ffi::c_char;
172pub type __intptr_t = ::core::ffi::c_long;
173pub type __socklen_t = ::core::ffi::c_uint;
174pub type __sig_atomic_t = ::core::ffi::c_int;
175pub type int_least8_t = __int_least8_t;
176pub type int_least16_t = __int_least16_t;
177pub type int_least32_t = __int_least32_t;
178pub type int_least64_t = __int_least64_t;
179pub type uint_least8_t = __uint_least8_t;
180pub type uint_least16_t = __uint_least16_t;
181pub type uint_least32_t = __uint_least32_t;
182pub type uint_least64_t = __uint_least64_t;
183pub type int_fast8_t = ::core::ffi::c_schar;
184pub type int_fast16_t = ::core::ffi::c_long;
185pub type int_fast32_t = ::core::ffi::c_long;
186pub type int_fast64_t = ::core::ffi::c_long;
187pub type uint_fast8_t = ::core::ffi::c_uchar;
188pub type uint_fast16_t = ::core::ffi::c_ulong;
189pub type uint_fast32_t = ::core::ffi::c_ulong;
190pub type uint_fast64_t = ::core::ffi::c_ulong;
191pub type intmax_t = __intmax_t;
192pub type uintmax_t = __uintmax_t;
193#[repr(C)]
194#[derive(Debug, Copy, Clone)]
195pub struct mp3dec_frame_info_t {
196    pub frame_bytes: ::core::ffi::c_int,
197    pub frame_offset: ::core::ffi::c_int,
198    pub channels: ::core::ffi::c_int,
199    pub hz: ::core::ffi::c_int,
200    pub layer: ::core::ffi::c_int,
201    pub bitrate_kbps: ::core::ffi::c_int,
202}
203#[allow(clippy::unnecessary_operation, clippy::identity_op)]
204const _: () = {
205    ["Size of mp3dec_frame_info_t"][::core::mem::size_of::<mp3dec_frame_info_t>() - 24usize];
206    ["Alignment of mp3dec_frame_info_t"][::core::mem::align_of::<mp3dec_frame_info_t>() - 4usize];
207    ["Offset of field: mp3dec_frame_info_t::frame_bytes"]
208        [::core::mem::offset_of!(mp3dec_frame_info_t, frame_bytes) - 0usize];
209    ["Offset of field: mp3dec_frame_info_t::frame_offset"]
210        [::core::mem::offset_of!(mp3dec_frame_info_t, frame_offset) - 4usize];
211    ["Offset of field: mp3dec_frame_info_t::channels"]
212        [::core::mem::offset_of!(mp3dec_frame_info_t, channels) - 8usize];
213    ["Offset of field: mp3dec_frame_info_t::hz"]
214        [::core::mem::offset_of!(mp3dec_frame_info_t, hz) - 12usize];
215    ["Offset of field: mp3dec_frame_info_t::layer"]
216        [::core::mem::offset_of!(mp3dec_frame_info_t, layer) - 16usize];
217    ["Offset of field: mp3dec_frame_info_t::bitrate_kbps"]
218        [::core::mem::offset_of!(mp3dec_frame_info_t, bitrate_kbps) - 20usize];
219};
220#[repr(C)]
221#[derive(Debug, Copy, Clone)]
222pub struct mp3dec_t {
223    pub mdct_overlap: [[f32; 288usize]; 2usize],
224    pub qmf_state: [f32; 960usize],
225    pub reserv: ::core::ffi::c_int,
226    pub free_format_bytes: ::core::ffi::c_int,
227    pub header: [::core::ffi::c_uchar; 4usize],
228    pub reserv_buf: [::core::ffi::c_uchar; 511usize],
229}
230#[allow(clippy::unnecessary_operation, clippy::identity_op)]
231const _: () = {
232    ["Size of mp3dec_t"][::core::mem::size_of::<mp3dec_t>() - 6668usize];
233    ["Alignment of mp3dec_t"][::core::mem::align_of::<mp3dec_t>() - 4usize];
234    ["Offset of field: mp3dec_t::mdct_overlap"]
235        [::core::mem::offset_of!(mp3dec_t, mdct_overlap) - 0usize];
236    ["Offset of field: mp3dec_t::qmf_state"]
237        [::core::mem::offset_of!(mp3dec_t, qmf_state) - 2304usize];
238    ["Offset of field: mp3dec_t::reserv"][::core::mem::offset_of!(mp3dec_t, reserv) - 6144usize];
239    ["Offset of field: mp3dec_t::free_format_bytes"]
240        [::core::mem::offset_of!(mp3dec_t, free_format_bytes) - 6148usize];
241    ["Offset of field: mp3dec_t::header"][::core::mem::offset_of!(mp3dec_t, header) - 6152usize];
242    ["Offset of field: mp3dec_t::reserv_buf"]
243        [::core::mem::offset_of!(mp3dec_t, reserv_buf) - 6156usize];
244};
245unsafe extern "C" {
246    pub fn mp3dec_init(dec: *mut mp3dec_t);
247}
248pub type mp3d_sample_t = i16;
249unsafe extern "C" {
250    pub fn mp3dec_decode_frame(
251        dec: *mut mp3dec_t,
252        mp3: *const u8,
253        mp3_bytes: ::core::ffi::c_int,
254        pcm: *mut mp3d_sample_t,
255        info: *mut mp3dec_frame_info_t,
256    ) -> ::core::ffi::c_int;
257}