opus_sys2/
lib.rs

1#![allow(non_upper_case_globals)]
2#![allow(non_camel_case_types)]
3#![allow(non_snake_case)]
4#![allow(dead_code)]
5
6/* automatically generated by rust-bindgen */
7
8pub const __MINGW64_VERSION_MAJOR: u32 = 8;
9pub const __MINGW64_VERSION_MINOR: u32 = 0;
10pub const __MINGW64_VERSION_BUGFIX: u32 = 0;
11pub const __MINGW64_VERSION_RC: u32 = 0;
12pub const __MINGW64_VERSION_STATE: &'static [u8; 6usize] = b"alpha\0";
13pub const __MINGW32_MAJOR_VERSION: u32 = 3;
14pub const __MINGW32_MINOR_VERSION: u32 = 11;
15pub const _M_AMD64: u32 = 100;
16pub const _M_X64: u32 = 100;
17pub const __: u32 = 1;
18pub const __MINGW_USE_UNDERSCORE_PREFIX: u32 = 0;
19pub const __MINGW_HAVE_ANSI_C99_PRINTF: u32 = 1;
20pub const __MINGW_HAVE_WIDE_C99_PRINTF: u32 = 1;
21pub const __MINGW_HAVE_ANSI_C99_SCANF: u32 = 1;
22pub const __MINGW_HAVE_WIDE_C99_SCANF: u32 = 1;
23pub const __MINGW_SEC_WARN_STR : & 'static [ u8 ; 92usize ] = b"This function or variable may be unsafe, use _CRT_SECURE_NO_WARNINGS to disable deprecation\0" ;
24pub const __MINGW_MSVC2005_DEPREC_STR : & 'static [ u8 ; 117usize ] = b"This POSIX function is deprecated beginning in Visual C++ 2005, use _CRT_NONSTDC_NO_DEPRECATE to disable deprecation\0" ;
25pub const __MINGW_FORTIFY_LEVEL: u32 = 0;
26pub const __MINGW_FORTIFY_VA_ARG: u32 = 0;
27pub const _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES: u32 = 0;
28pub const _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY: u32 = 0;
29pub const _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES: u32 = 0;
30pub const _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT: u32 = 0;
31pub const _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY: u32 = 0;
32pub const __USE_CRTIMP: u32 = 1;
33pub const USE___UUIDOF: u32 = 0;
34pub const __CRT__NO_INLINE: u32 = 1;
35pub const __MSVCRT_VERSION__: u32 = 1792;
36pub const _WIN32_WINNT: u32 = 1537;
37pub const MINGW_HAS_SECURE_API: u32 = 1;
38pub const __STDC_SECURE_LIB__: u32 = 200411;
39pub const __GOT_SECURE_LIB__: u32 = 200411;
40pub const MINGW_HAS_DDK_H: u32 = 1;
41pub const _CRT_PACKING: u32 = 8;
42pub const _SECURECRT_FILL_BUFFER_PATTERN: u32 = 253;
43pub const _ARGMAX: u32 = 100;
44pub const __USE_MINGW_ANSI_STDIO: u32 = 0;
45pub const INT8_MIN: i32 = -128;
46pub const INT16_MIN: i32 = -32768;
47pub const INT32_MIN: i32 = -2147483648;
48pub const INT64_MIN: i64 = -9223372036854775808;
49pub const INT8_MAX: u32 = 127;
50pub const INT16_MAX: u32 = 32767;
51pub const INT32_MAX: u32 = 2147483647;
52pub const INT64_MAX: u64 = 9223372036854775807;
53pub const UINT8_MAX: u32 = 255;
54pub const UINT16_MAX: u32 = 65535;
55pub const UINT32_MAX: u32 = 4294967295;
56pub const UINT64_MAX: i32 = -1;
57pub const INT_LEAST8_MIN: i32 = -128;
58pub const INT_LEAST16_MIN: i32 = -32768;
59pub const INT_LEAST32_MIN: i32 = -2147483648;
60pub const INT_LEAST64_MIN: i64 = -9223372036854775808;
61pub const INT_LEAST8_MAX: u32 = 127;
62pub const INT_LEAST16_MAX: u32 = 32767;
63pub const INT_LEAST32_MAX: u32 = 2147483647;
64pub const INT_LEAST64_MAX: u64 = 9223372036854775807;
65pub const UINT_LEAST8_MAX: u32 = 255;
66pub const UINT_LEAST16_MAX: u32 = 65535;
67pub const UINT_LEAST32_MAX: u32 = 4294967295;
68pub const UINT_LEAST64_MAX: i32 = -1;
69pub const INT_FAST8_MIN: i32 = -128;
70pub const INT_FAST16_MIN: i32 = -32768;
71pub const INT_FAST32_MIN: i32 = -2147483648;
72pub const INT_FAST64_MIN: i64 = -9223372036854775808;
73pub const INT_FAST8_MAX: u32 = 127;
74pub const INT_FAST16_MAX: u32 = 32767;
75pub const INT_FAST32_MAX: u32 = 2147483647;
76pub const INT_FAST64_MAX: u64 = 9223372036854775807;
77pub const UINT_FAST8_MAX: u32 = 255;
78pub const UINT_FAST16_MAX: u32 = 65535;
79pub const UINT_FAST32_MAX: u32 = 4294967295;
80pub const UINT_FAST64_MAX: i32 = -1;
81pub const INTPTR_MIN: i64 = -9223372036854775808;
82pub const INTPTR_MAX: u64 = 9223372036854775807;
83pub const UINTPTR_MAX: i32 = -1;
84pub const INTMAX_MIN: i64 = -9223372036854775808;
85pub const INTMAX_MAX: u64 = 9223372036854775807;
86pub const UINTMAX_MAX: i32 = -1;
87pub const PTRDIFF_MIN: i64 = -9223372036854775808;
88pub const PTRDIFF_MAX: u64 = 9223372036854775807;
89pub const SIG_ATOMIC_MIN: i32 = -2147483648;
90pub const SIG_ATOMIC_MAX: u32 = 2147483647;
91pub const SIZE_MAX: i32 = -1;
92pub const WCHAR_MIN: u32 = 0;
93pub const WCHAR_MAX: u32 = 65535;
94pub const WINT_MIN: u32 = 0;
95pub const WINT_MAX: u32 = 65535;
96pub const OPUS_OK: u32 = 0;
97pub const OPUS_BAD_ARG: i32 = -1;
98pub const OPUS_BUFFER_TOO_SMALL: i32 = -2;
99pub const OPUS_INTERNAL_ERROR: i32 = -3;
100pub const OPUS_INVALID_PACKET: i32 = -4;
101pub const OPUS_UNIMPLEMENTED: i32 = -5;
102pub const OPUS_INVALID_STATE: i32 = -6;
103pub const OPUS_ALLOC_FAIL: i32 = -7;
104pub const OPUS_SET_APPLICATION_REQUEST: u32 = 4000;
105pub const OPUS_GET_APPLICATION_REQUEST: u32 = 4001;
106pub const OPUS_SET_BITRATE_REQUEST: u32 = 4002;
107pub const OPUS_GET_BITRATE_REQUEST: u32 = 4003;
108pub const OPUS_SET_MAX_BANDWIDTH_REQUEST: u32 = 4004;
109pub const OPUS_GET_MAX_BANDWIDTH_REQUEST: u32 = 4005;
110pub const OPUS_SET_VBR_REQUEST: u32 = 4006;
111pub const OPUS_GET_VBR_REQUEST: u32 = 4007;
112pub const OPUS_SET_BANDWIDTH_REQUEST: u32 = 4008;
113pub const OPUS_GET_BANDWIDTH_REQUEST: u32 = 4009;
114pub const OPUS_SET_COMPLEXITY_REQUEST: u32 = 4010;
115pub const OPUS_GET_COMPLEXITY_REQUEST: u32 = 4011;
116pub const OPUS_SET_INBAND_FEC_REQUEST: u32 = 4012;
117pub const OPUS_GET_INBAND_FEC_REQUEST: u32 = 4013;
118pub const OPUS_SET_PACKET_LOSS_PERC_REQUEST: u32 = 4014;
119pub const OPUS_GET_PACKET_LOSS_PERC_REQUEST: u32 = 4015;
120pub const OPUS_SET_DTX_REQUEST: u32 = 4016;
121pub const OPUS_GET_DTX_REQUEST: u32 = 4017;
122pub const OPUS_SET_VBR_CONSTRAINT_REQUEST: u32 = 4020;
123pub const OPUS_GET_VBR_CONSTRAINT_REQUEST: u32 = 4021;
124pub const OPUS_SET_FORCE_CHANNELS_REQUEST: u32 = 4022;
125pub const OPUS_GET_FORCE_CHANNELS_REQUEST: u32 = 4023;
126pub const OPUS_SET_SIGNAL_REQUEST: u32 = 4024;
127pub const OPUS_GET_SIGNAL_REQUEST: u32 = 4025;
128pub const OPUS_GET_LOOKAHEAD_REQUEST: u32 = 4027;
129pub const OPUS_GET_SAMPLE_RATE_REQUEST: u32 = 4029;
130pub const OPUS_GET_FINAL_RANGE_REQUEST: u32 = 4031;
131pub const OPUS_GET_PITCH_REQUEST: u32 = 4033;
132pub const OPUS_SET_GAIN_REQUEST: u32 = 4034;
133pub const OPUS_GET_GAIN_REQUEST: u32 = 4045;
134pub const OPUS_SET_LSB_DEPTH_REQUEST: u32 = 4036;
135pub const OPUS_GET_LSB_DEPTH_REQUEST: u32 = 4037;
136pub const OPUS_GET_LAST_PACKET_DURATION_REQUEST: u32 = 4039;
137pub const OPUS_SET_EXPERT_FRAME_DURATION_REQUEST: u32 = 4040;
138pub const OPUS_GET_EXPERT_FRAME_DURATION_REQUEST: u32 = 4041;
139pub const OPUS_SET_PREDICTION_DISABLED_REQUEST: u32 = 4042;
140pub const OPUS_GET_PREDICTION_DISABLED_REQUEST: u32 = 4043;
141pub const OPUS_SET_PHASE_INVERSION_DISABLED_REQUEST: u32 = 4046;
142pub const OPUS_GET_PHASE_INVERSION_DISABLED_REQUEST: u32 = 4047;
143pub const OPUS_GET_IN_DTX_REQUEST: u32 = 4049;
144pub const OPUS_AUTO: i32 = -1000;
145pub const OPUS_BITRATE_MAX: i32 = -1;
146pub const OPUS_APPLICATION_VOIP: u32 = 2048;
147pub const OPUS_APPLICATION_AUDIO: u32 = 2049;
148pub const OPUS_APPLICATION_RESTRICTED_LOWDELAY: u32 = 2051;
149pub const OPUS_SIGNAL_VOICE: u32 = 3001;
150pub const OPUS_SIGNAL_MUSIC: u32 = 3002;
151pub const OPUS_BANDWIDTH_NARROWBAND: u32 = 1101;
152pub const OPUS_BANDWIDTH_MEDIUMBAND: u32 = 1102;
153pub const OPUS_BANDWIDTH_WIDEBAND: u32 = 1103;
154pub const OPUS_BANDWIDTH_SUPERWIDEBAND: u32 = 1104;
155pub const OPUS_BANDWIDTH_FULLBAND: u32 = 1105;
156pub const OPUS_FRAMESIZE_ARG: u32 = 5000;
157pub const OPUS_FRAMESIZE_2_5_MS: u32 = 5001;
158pub const OPUS_FRAMESIZE_5_MS: u32 = 5002;
159pub const OPUS_FRAMESIZE_10_MS: u32 = 5003;
160pub const OPUS_FRAMESIZE_20_MS: u32 = 5004;
161pub const OPUS_FRAMESIZE_40_MS: u32 = 5005;
162pub const OPUS_FRAMESIZE_60_MS: u32 = 5006;
163pub const OPUS_FRAMESIZE_80_MS: u32 = 5007;
164pub const OPUS_FRAMESIZE_100_MS: u32 = 5008;
165pub const OPUS_FRAMESIZE_120_MS: u32 = 5009;
166pub const OPUS_RESET_STATE: u32 = 4028;
167pub type __gnuc_va_list = __builtin_va_list;
168pub type va_list = __gnuc_va_list;
169extern "C" {
170    pub fn __debugbreak();
171}
172extern "C" {
173    pub fn __mingw_get_crt_info() -> *const ::std::os::raw::c_char;
174}
175pub type size_t = ::std::os::raw::c_ulonglong;
176pub type ssize_t = ::std::os::raw::c_longlong;
177pub type rsize_t = size_t;
178pub type wchar_t = ::std::os::raw::c_ushort;
179pub type wint_t = ::std::os::raw::c_ushort;
180pub type wctype_t = ::std::os::raw::c_ushort;
181pub type errno_t = ::std::os::raw::c_int;
182pub type __time32_t = ::std::os::raw::c_long;
183pub type __time64_t = ::std::os::raw::c_longlong;
184pub type time_t = __time64_t;
185#[repr(C)]
186#[derive(Debug, Copy, Clone)]
187pub struct threadmbcinfostruct {
188    _unused: [u8; 0],
189}
190pub type pthreadlocinfo = *mut threadlocaleinfostruct;
191pub type pthreadmbcinfo = *mut threadmbcinfostruct;
192#[repr(C)]
193#[derive(Debug, Copy, Clone)]
194pub struct __lc_time_data {
195    _unused: [u8; 0],
196}
197#[repr(C)]
198#[derive(Debug, Copy, Clone)]
199pub struct localeinfo_struct {
200    pub locinfo: pthreadlocinfo,
201    pub mbcinfo: pthreadmbcinfo,
202}
203#[test]
204fn bindgen_test_layout_localeinfo_struct() {
205    assert_eq!(
206        ::std::mem::size_of::<localeinfo_struct>(),
207        16usize,
208        concat!("Size of: ", stringify!(localeinfo_struct))
209    );
210    assert_eq!(
211        ::std::mem::align_of::<localeinfo_struct>(),
212        8usize,
213        concat!("Alignment of ", stringify!(localeinfo_struct))
214    );
215    assert_eq!(
216        unsafe { &(*(::std::ptr::null::<localeinfo_struct>())).locinfo as *const _ as usize },
217        0usize,
218        concat!(
219            "Offset of field: ",
220            stringify!(localeinfo_struct),
221            "::",
222            stringify!(locinfo)
223        )
224    );
225    assert_eq!(
226        unsafe { &(*(::std::ptr::null::<localeinfo_struct>())).mbcinfo as *const _ as usize },
227        8usize,
228        concat!(
229            "Offset of field: ",
230            stringify!(localeinfo_struct),
231            "::",
232            stringify!(mbcinfo)
233        )
234    );
235}
236pub type _locale_tstruct = localeinfo_struct;
237pub type _locale_t = *mut localeinfo_struct;
238#[repr(C)]
239#[derive(Debug, Copy, Clone)]
240pub struct tagLC_ID {
241    pub wLanguage: ::std::os::raw::c_ushort,
242    pub wCountry: ::std::os::raw::c_ushort,
243    pub wCodePage: ::std::os::raw::c_ushort,
244}
245#[test]
246fn bindgen_test_layout_tagLC_ID() {
247    assert_eq!(
248        ::std::mem::size_of::<tagLC_ID>(),
249        6usize,
250        concat!("Size of: ", stringify!(tagLC_ID))
251    );
252    assert_eq!(
253        ::std::mem::align_of::<tagLC_ID>(),
254        2usize,
255        concat!("Alignment of ", stringify!(tagLC_ID))
256    );
257    assert_eq!(
258        unsafe { &(*(::std::ptr::null::<tagLC_ID>())).wLanguage as *const _ as usize },
259        0usize,
260        concat!(
261            "Offset of field: ",
262            stringify!(tagLC_ID),
263            "::",
264            stringify!(wLanguage)
265        )
266    );
267    assert_eq!(
268        unsafe { &(*(::std::ptr::null::<tagLC_ID>())).wCountry as *const _ as usize },
269        2usize,
270        concat!(
271            "Offset of field: ",
272            stringify!(tagLC_ID),
273            "::",
274            stringify!(wCountry)
275        )
276    );
277    assert_eq!(
278        unsafe { &(*(::std::ptr::null::<tagLC_ID>())).wCodePage as *const _ as usize },
279        4usize,
280        concat!(
281            "Offset of field: ",
282            stringify!(tagLC_ID),
283            "::",
284            stringify!(wCodePage)
285        )
286    );
287}
288pub type LC_ID = tagLC_ID;
289pub type LPLC_ID = *mut tagLC_ID;
290#[repr(C)]
291#[derive(Debug, Copy, Clone)]
292pub struct threadlocaleinfostruct {
293    pub refcount: ::std::os::raw::c_int,
294    pub lc_codepage: ::std::os::raw::c_uint,
295    pub lc_collate_cp: ::std::os::raw::c_uint,
296    pub lc_handle: [::std::os::raw::c_ulong; 6usize],
297    pub lc_id: [LC_ID; 6usize],
298    pub lc_category: [threadlocaleinfostruct__bindgen_ty_1; 6usize],
299    pub lc_clike: ::std::os::raw::c_int,
300    pub mb_cur_max: ::std::os::raw::c_int,
301    pub lconv_intl_refcount: *mut ::std::os::raw::c_int,
302    pub lconv_num_refcount: *mut ::std::os::raw::c_int,
303    pub lconv_mon_refcount: *mut ::std::os::raw::c_int,
304    pub lconv: *mut lconv,
305    pub ctype1_refcount: *mut ::std::os::raw::c_int,
306    pub ctype1: *mut ::std::os::raw::c_ushort,
307    pub pctype: *const ::std::os::raw::c_ushort,
308    pub pclmap: *const ::std::os::raw::c_uchar,
309    pub pcumap: *const ::std::os::raw::c_uchar,
310    pub lc_time_curr: *mut __lc_time_data,
311}
312#[repr(C)]
313#[derive(Debug, Copy, Clone)]
314pub struct threadlocaleinfostruct__bindgen_ty_1 {
315    pub locale: *mut ::std::os::raw::c_char,
316    pub wlocale: *mut wchar_t,
317    pub refcount: *mut ::std::os::raw::c_int,
318    pub wrefcount: *mut ::std::os::raw::c_int,
319}
320#[test]
321fn bindgen_test_layout_threadlocaleinfostruct__bindgen_ty_1() {
322    assert_eq!(
323        ::std::mem::size_of::<threadlocaleinfostruct__bindgen_ty_1>(),
324        32usize,
325        concat!(
326            "Size of: ",
327            stringify!(threadlocaleinfostruct__bindgen_ty_1)
328        )
329    );
330    assert_eq!(
331        ::std::mem::align_of::<threadlocaleinfostruct__bindgen_ty_1>(),
332        8usize,
333        concat!(
334            "Alignment of ",
335            stringify!(threadlocaleinfostruct__bindgen_ty_1)
336        )
337    );
338    assert_eq!(
339        unsafe {
340            &(*(::std::ptr::null::<threadlocaleinfostruct__bindgen_ty_1>())).locale as *const _
341                as usize
342        },
343        0usize,
344        concat!(
345            "Offset of field: ",
346            stringify!(threadlocaleinfostruct__bindgen_ty_1),
347            "::",
348            stringify!(locale)
349        )
350    );
351    assert_eq!(
352        unsafe {
353            &(*(::std::ptr::null::<threadlocaleinfostruct__bindgen_ty_1>())).wlocale as *const _
354                as usize
355        },
356        8usize,
357        concat!(
358            "Offset of field: ",
359            stringify!(threadlocaleinfostruct__bindgen_ty_1),
360            "::",
361            stringify!(wlocale)
362        )
363    );
364    assert_eq!(
365        unsafe {
366            &(*(::std::ptr::null::<threadlocaleinfostruct__bindgen_ty_1>())).refcount as *const _
367                as usize
368        },
369        16usize,
370        concat!(
371            "Offset of field: ",
372            stringify!(threadlocaleinfostruct__bindgen_ty_1),
373            "::",
374            stringify!(refcount)
375        )
376    );
377    assert_eq!(
378        unsafe {
379            &(*(::std::ptr::null::<threadlocaleinfostruct__bindgen_ty_1>())).wrefcount as *const _
380                as usize
381        },
382        24usize,
383        concat!(
384            "Offset of field: ",
385            stringify!(threadlocaleinfostruct__bindgen_ty_1),
386            "::",
387            stringify!(wrefcount)
388        )
389    );
390}
391#[test]
392fn bindgen_test_layout_threadlocaleinfostruct() {
393    assert_eq!(
394        ::std::mem::size_of::<threadlocaleinfostruct>(),
395        352usize,
396        concat!("Size of: ", stringify!(threadlocaleinfostruct))
397    );
398    assert_eq!(
399        ::std::mem::align_of::<threadlocaleinfostruct>(),
400        8usize,
401        concat!("Alignment of ", stringify!(threadlocaleinfostruct))
402    );
403    assert_eq!(
404        unsafe { &(*(::std::ptr::null::<threadlocaleinfostruct>())).refcount as *const _ as usize },
405        0usize,
406        concat!(
407            "Offset of field: ",
408            stringify!(threadlocaleinfostruct),
409            "::",
410            stringify!(refcount)
411        )
412    );
413    assert_eq!(
414        unsafe {
415            &(*(::std::ptr::null::<threadlocaleinfostruct>())).lc_codepage as *const _ as usize
416        },
417        4usize,
418        concat!(
419            "Offset of field: ",
420            stringify!(threadlocaleinfostruct),
421            "::",
422            stringify!(lc_codepage)
423        )
424    );
425    assert_eq!(
426        unsafe {
427            &(*(::std::ptr::null::<threadlocaleinfostruct>())).lc_collate_cp as *const _ as usize
428        },
429        8usize,
430        concat!(
431            "Offset of field: ",
432            stringify!(threadlocaleinfostruct),
433            "::",
434            stringify!(lc_collate_cp)
435        )
436    );
437    assert_eq!(
438        unsafe {
439            &(*(::std::ptr::null::<threadlocaleinfostruct>())).lc_handle as *const _ as usize
440        },
441        12usize,
442        concat!(
443            "Offset of field: ",
444            stringify!(threadlocaleinfostruct),
445            "::",
446            stringify!(lc_handle)
447        )
448    );
449    assert_eq!(
450        unsafe { &(*(::std::ptr::null::<threadlocaleinfostruct>())).lc_id as *const _ as usize },
451        36usize,
452        concat!(
453            "Offset of field: ",
454            stringify!(threadlocaleinfostruct),
455            "::",
456            stringify!(lc_id)
457        )
458    );
459    assert_eq!(
460        unsafe {
461            &(*(::std::ptr::null::<threadlocaleinfostruct>())).lc_category as *const _ as usize
462        },
463        72usize,
464        concat!(
465            "Offset of field: ",
466            stringify!(threadlocaleinfostruct),
467            "::",
468            stringify!(lc_category)
469        )
470    );
471    assert_eq!(
472        unsafe { &(*(::std::ptr::null::<threadlocaleinfostruct>())).lc_clike as *const _ as usize },
473        264usize,
474        concat!(
475            "Offset of field: ",
476            stringify!(threadlocaleinfostruct),
477            "::",
478            stringify!(lc_clike)
479        )
480    );
481    assert_eq!(
482        unsafe {
483            &(*(::std::ptr::null::<threadlocaleinfostruct>())).mb_cur_max as *const _ as usize
484        },
485        268usize,
486        concat!(
487            "Offset of field: ",
488            stringify!(threadlocaleinfostruct),
489            "::",
490            stringify!(mb_cur_max)
491        )
492    );
493    assert_eq!(
494        unsafe {
495            &(*(::std::ptr::null::<threadlocaleinfostruct>())).lconv_intl_refcount as *const _
496                as usize
497        },
498        272usize,
499        concat!(
500            "Offset of field: ",
501            stringify!(threadlocaleinfostruct),
502            "::",
503            stringify!(lconv_intl_refcount)
504        )
505    );
506    assert_eq!(
507        unsafe {
508            &(*(::std::ptr::null::<threadlocaleinfostruct>())).lconv_num_refcount as *const _
509                as usize
510        },
511        280usize,
512        concat!(
513            "Offset of field: ",
514            stringify!(threadlocaleinfostruct),
515            "::",
516            stringify!(lconv_num_refcount)
517        )
518    );
519    assert_eq!(
520        unsafe {
521            &(*(::std::ptr::null::<threadlocaleinfostruct>())).lconv_mon_refcount as *const _
522                as usize
523        },
524        288usize,
525        concat!(
526            "Offset of field: ",
527            stringify!(threadlocaleinfostruct),
528            "::",
529            stringify!(lconv_mon_refcount)
530        )
531    );
532    assert_eq!(
533        unsafe { &(*(::std::ptr::null::<threadlocaleinfostruct>())).lconv as *const _ as usize },
534        296usize,
535        concat!(
536            "Offset of field: ",
537            stringify!(threadlocaleinfostruct),
538            "::",
539            stringify!(lconv)
540        )
541    );
542    assert_eq!(
543        unsafe {
544            &(*(::std::ptr::null::<threadlocaleinfostruct>())).ctype1_refcount as *const _ as usize
545        },
546        304usize,
547        concat!(
548            "Offset of field: ",
549            stringify!(threadlocaleinfostruct),
550            "::",
551            stringify!(ctype1_refcount)
552        )
553    );
554    assert_eq!(
555        unsafe { &(*(::std::ptr::null::<threadlocaleinfostruct>())).ctype1 as *const _ as usize },
556        312usize,
557        concat!(
558            "Offset of field: ",
559            stringify!(threadlocaleinfostruct),
560            "::",
561            stringify!(ctype1)
562        )
563    );
564    assert_eq!(
565        unsafe { &(*(::std::ptr::null::<threadlocaleinfostruct>())).pctype as *const _ as usize },
566        320usize,
567        concat!(
568            "Offset of field: ",
569            stringify!(threadlocaleinfostruct),
570            "::",
571            stringify!(pctype)
572        )
573    );
574    assert_eq!(
575        unsafe { &(*(::std::ptr::null::<threadlocaleinfostruct>())).pclmap as *const _ as usize },
576        328usize,
577        concat!(
578            "Offset of field: ",
579            stringify!(threadlocaleinfostruct),
580            "::",
581            stringify!(pclmap)
582        )
583    );
584    assert_eq!(
585        unsafe { &(*(::std::ptr::null::<threadlocaleinfostruct>())).pcumap as *const _ as usize },
586        336usize,
587        concat!(
588            "Offset of field: ",
589            stringify!(threadlocaleinfostruct),
590            "::",
591            stringify!(pcumap)
592        )
593    );
594    assert_eq!(
595        unsafe {
596            &(*(::std::ptr::null::<threadlocaleinfostruct>())).lc_time_curr as *const _ as usize
597        },
598        344usize,
599        concat!(
600            "Offset of field: ",
601            stringify!(threadlocaleinfostruct),
602            "::",
603            stringify!(lc_time_curr)
604        )
605    );
606}
607pub type threadlocinfo = threadlocaleinfostruct;
608pub type int_least8_t = ::std::os::raw::c_schar;
609pub type uint_least8_t = ::std::os::raw::c_uchar;
610pub type int_least16_t = ::std::os::raw::c_short;
611pub type uint_least16_t = ::std::os::raw::c_ushort;
612pub type int_least32_t = ::std::os::raw::c_int;
613pub type uint_least32_t = ::std::os::raw::c_uint;
614pub type int_least64_t = ::std::os::raw::c_longlong;
615pub type uint_least64_t = ::std::os::raw::c_ulonglong;
616pub type int_fast8_t = ::std::os::raw::c_schar;
617pub type uint_fast8_t = ::std::os::raw::c_uchar;
618pub type int_fast16_t = ::std::os::raw::c_short;
619pub type uint_fast16_t = ::std::os::raw::c_ushort;
620pub type int_fast32_t = ::std::os::raw::c_int;
621pub type uint_fast32_t = ::std::os::raw::c_uint;
622pub type int_fast64_t = ::std::os::raw::c_longlong;
623pub type uint_fast64_t = ::std::os::raw::c_ulonglong;
624pub type intmax_t = ::std::os::raw::c_longlong;
625pub type uintmax_t = ::std::os::raw::c_ulonglong;
626pub type opus_int8 = i8;
627pub type opus_uint8 = u8;
628pub type opus_int16 = i16;
629pub type opus_uint16 = u16;
630pub type opus_int32 = i32;
631pub type opus_uint32 = u32;
632pub type opus_int64 = i64;
633pub type opus_uint64 = u64;
634extern "C" {
635    #[doc = " Converts an opus error code into a human readable string."]
636    #[doc = ""]
637    #[doc = " @param[in] error <tt>int</tt>: Error number"]
638    #[doc = " @returns Error string"]
639    pub fn opus_strerror(error: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
640}
641extern "C" {
642    #[doc = " Gets the libopus version string."]
643    #[doc = ""]
644    #[doc = " Applications may look for the substring \"-fixed\" in the version string to"]
645    #[doc = " determine whether they have a fixed-point or floating-point build at"]
646    #[doc = " runtime."]
647    #[doc = ""]
648    #[doc = " @returns Version string"]
649    pub fn opus_get_version_string() -> *const ::std::os::raw::c_char;
650}
651#[repr(C)]
652#[derive(Debug, Copy, Clone)]
653pub struct OpusEncoder {
654    _unused: [u8; 0],
655}
656extern "C" {
657    #[doc = " Gets the size of an <code>OpusEncoder</code> structure."]
658    #[doc = " @param[in] channels <tt>int</tt>: Number of channels."]
659    #[doc = "                                   This must be 1 or 2."]
660    #[doc = " @returns The size in bytes."]
661    pub fn opus_encoder_get_size(channels: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
662}
663extern "C" {
664    #[doc = " Allocates and initializes an encoder state."]
665    #[doc = " There are three coding modes:"]
666    #[doc = ""]
667    #[doc = " @ref OPUS_APPLICATION_VOIP gives best quality at a given bitrate for voice"]
668    #[doc = "    signals. It enhances the  input signal by high-pass filtering and"]
669    #[doc = "    emphasizing formants and harmonics. Optionally  it includes in-band"]
670    #[doc = "    forward error correction to protect against packet loss. Use this"]
671    #[doc = "    mode for typical VoIP applications. Because of the enhancement,"]
672    #[doc = "    even at high bitrates the output may sound different from the input."]
673    #[doc = ""]
674    #[doc = " @ref OPUS_APPLICATION_AUDIO gives best quality at a given bitrate for most"]
675    #[doc = "    non-voice signals like music. Use this mode for music and mixed"]
676    #[doc = "    (music/voice) content, broadcast, and applications requiring less"]
677    #[doc = "    than 15 ms of coding delay."]
678    #[doc = ""]
679    #[doc = " @ref OPUS_APPLICATION_RESTRICTED_LOWDELAY configures low-delay mode that"]
680    #[doc = "    disables the speech-optimized mode in exchange for slightly reduced delay."]
681    #[doc = "    This mode can only be set on an newly initialized or freshly reset encoder"]
682    #[doc = "    because it changes the codec delay."]
683    #[doc = ""]
684    #[doc = " This is useful when the caller knows that the speech-optimized modes will not be needed (use with caution)."]
685    #[doc = " @param [in] Fs <tt>opus_int32</tt>: Sampling rate of input signal (Hz)"]
686    #[doc = "                                     This must be one of 8000, 12000, 16000,"]
687    #[doc = "                                     24000, or 48000."]
688    #[doc = " @param [in] channels <tt>int</tt>: Number of channels (1 or 2) in input signal"]
689    #[doc = " @param [in] application <tt>int</tt>: Coding mode (@ref OPUS_APPLICATION_VOIP/@ref OPUS_APPLICATION_AUDIO/@ref OPUS_APPLICATION_RESTRICTED_LOWDELAY)"]
690    #[doc = " @param [out] error <tt>int*</tt>: @ref opus_errorcodes"]
691    #[doc = " @note Regardless of the sampling rate and number channels selected, the Opus encoder"]
692    #[doc = " can switch to a lower audio bandwidth or number of channels if the bitrate"]
693    #[doc = " selected is too low. This also means that it is safe to always use 48 kHz stereo input"]
694    #[doc = " and let the encoder optimize the encoding."]
695    pub fn opus_encoder_create(
696        Fs: opus_int32,
697        channels: ::std::os::raw::c_int,
698        application: ::std::os::raw::c_int,
699        error: *mut ::std::os::raw::c_int,
700    ) -> *mut OpusEncoder;
701}
702extern "C" {
703    #[doc = " Initializes a previously allocated encoder state"]
704    #[doc = " The memory pointed to by st must be at least the size returned by opus_encoder_get_size()."]
705    #[doc = " This is intended for applications which use their own allocator instead of malloc."]
706    #[doc = " @see opus_encoder_create(),opus_encoder_get_size()"]
707    #[doc = " To reset a previously initialized state, use the #OPUS_RESET_STATE CTL."]
708    #[doc = " @param [in] st <tt>OpusEncoder*</tt>: Encoder state"]
709    #[doc = " @param [in] Fs <tt>opus_int32</tt>: Sampling rate of input signal (Hz)"]
710    #[doc = "                                      This must be one of 8000, 12000, 16000,"]
711    #[doc = "                                      24000, or 48000."]
712    #[doc = " @param [in] channels <tt>int</tt>: Number of channels (1 or 2) in input signal"]
713    #[doc = " @param [in] application <tt>int</tt>: Coding mode (OPUS_APPLICATION_VOIP/OPUS_APPLICATION_AUDIO/OPUS_APPLICATION_RESTRICTED_LOWDELAY)"]
714    #[doc = " @retval #OPUS_OK Success or @ref opus_errorcodes"]
715    pub fn opus_encoder_init(
716        st: *mut OpusEncoder,
717        Fs: opus_int32,
718        channels: ::std::os::raw::c_int,
719        application: ::std::os::raw::c_int,
720    ) -> ::std::os::raw::c_int;
721}
722extern "C" {
723    #[doc = " Encodes an Opus frame."]
724    #[doc = " @param [in] st <tt>OpusEncoder*</tt>: Encoder state"]
725    #[doc = " @param [in] pcm <tt>opus_int16*</tt>: Input signal (interleaved if 2 channels). length is frame_size*channels*sizeof(opus_int16)"]
726    #[doc = " @param [in] frame_size <tt>int</tt>: Number of samples per channel in the"]
727    #[doc = "                                      input signal."]
728    #[doc = "                                      This must be an Opus frame size for"]
729    #[doc = "                                      the encoder's sampling rate."]
730    #[doc = "                                      For example, at 48 kHz the permitted"]
731    #[doc = "                                      values are 120, 240, 480, 960, 1920,"]
732    #[doc = "                                      and 2880."]
733    #[doc = "                                      Passing in a duration of less than"]
734    #[doc = "                                      10 ms (480 samples at 48 kHz) will"]
735    #[doc = "                                      prevent the encoder from using the LPC"]
736    #[doc = "                                      or hybrid modes."]
737    #[doc = " @param [out] data <tt>unsigned char*</tt>: Output payload."]
738    #[doc = "                                            This must contain storage for at"]
739    #[doc = "                                            least \\a max_data_bytes."]
740    #[doc = " @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated"]
741    #[doc = "                                                 memory for the output"]
742    #[doc = "                                                 payload. This may be"]
743    #[doc = "                                                 used to impose an upper limit on"]
744    #[doc = "                                                 the instant bitrate, but should"]
745    #[doc = "                                                 not be used as the only bitrate"]
746    #[doc = "                                                 control. Use #OPUS_SET_BITRATE to"]
747    #[doc = "                                                 control the bitrate."]
748    #[doc = " @returns The length of the encoded packet (in bytes) on success or a"]
749    #[doc = "          negative error code (see @ref opus_errorcodes) on failure."]
750    pub fn opus_encode(
751        st: *mut OpusEncoder,
752        pcm: *const opus_int16,
753        frame_size: ::std::os::raw::c_int,
754        data: *mut ::std::os::raw::c_uchar,
755        max_data_bytes: opus_int32,
756    ) -> opus_int32;
757}
758extern "C" {
759    #[doc = " Encodes an Opus frame from floating point input."]
760    #[doc = " @param [in] st <tt>OpusEncoder*</tt>: Encoder state"]
761    #[doc = " @param [in] pcm <tt>float*</tt>: Input in float format (interleaved if 2 channels), with a normal range of +/-1.0."]
762    #[doc = "          Samples with a range beyond +/-1.0 are supported but will"]
763    #[doc = "          be clipped by decoders using the integer API and should"]
764    #[doc = "          only be used if it is known that the far end supports"]
765    #[doc = "          extended dynamic range."]
766    #[doc = "          length is frame_size*channels*sizeof(float)"]
767    #[doc = " @param [in] frame_size <tt>int</tt>: Number of samples per channel in the"]
768    #[doc = "                                      input signal."]
769    #[doc = "                                      This must be an Opus frame size for"]
770    #[doc = "                                      the encoder's sampling rate."]
771    #[doc = "                                      For example, at 48 kHz the permitted"]
772    #[doc = "                                      values are 120, 240, 480, 960, 1920,"]
773    #[doc = "                                      and 2880."]
774    #[doc = "                                      Passing in a duration of less than"]
775    #[doc = "                                      10 ms (480 samples at 48 kHz) will"]
776    #[doc = "                                      prevent the encoder from using the LPC"]
777    #[doc = "                                      or hybrid modes."]
778    #[doc = " @param [out] data <tt>unsigned char*</tt>: Output payload."]
779    #[doc = "                                            This must contain storage for at"]
780    #[doc = "                                            least \\a max_data_bytes."]
781    #[doc = " @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated"]
782    #[doc = "                                                 memory for the output"]
783    #[doc = "                                                 payload. This may be"]
784    #[doc = "                                                 used to impose an upper limit on"]
785    #[doc = "                                                 the instant bitrate, but should"]
786    #[doc = "                                                 not be used as the only bitrate"]
787    #[doc = "                                                 control. Use #OPUS_SET_BITRATE to"]
788    #[doc = "                                                 control the bitrate."]
789    #[doc = " @returns The length of the encoded packet (in bytes) on success or a"]
790    #[doc = "          negative error code (see @ref opus_errorcodes) on failure."]
791    pub fn opus_encode_float(
792        st: *mut OpusEncoder,
793        pcm: *const f32,
794        frame_size: ::std::os::raw::c_int,
795        data: *mut ::std::os::raw::c_uchar,
796        max_data_bytes: opus_int32,
797    ) -> opus_int32;
798}
799extern "C" {
800    #[doc = " Frees an <code>OpusEncoder</code> allocated by opus_encoder_create()."]
801    #[doc = " @param[in] st <tt>OpusEncoder*</tt>: State to be freed."]
802    pub fn opus_encoder_destroy(st: *mut OpusEncoder);
803}
804extern "C" {
805    #[doc = " Perform a CTL function on an Opus encoder."]
806    #[doc = ""]
807    #[doc = " Generally the request and subsequent arguments are generated"]
808    #[doc = " by a convenience macro."]
809    #[doc = " @param st <tt>OpusEncoder*</tt>: Encoder state."]
810    #[doc = " @param request This and all remaining parameters should be replaced by one"]
811    #[doc = "                of the convenience macros in @ref opus_genericctls or"]
812    #[doc = "                @ref opus_encoderctls."]
813    #[doc = " @see opus_genericctls"]
814    #[doc = " @see opus_encoderctls"]
815    pub fn opus_encoder_ctl(
816        st: *mut OpusEncoder,
817        request: ::std::os::raw::c_int,
818        ...
819    ) -> ::std::os::raw::c_int;
820}
821#[repr(C)]
822#[derive(Debug, Copy, Clone)]
823pub struct OpusDecoder {
824    _unused: [u8; 0],
825}
826extern "C" {
827    #[doc = " Gets the size of an <code>OpusDecoder</code> structure."]
828    #[doc = " @param [in] channels <tt>int</tt>: Number of channels."]
829    #[doc = "                                    This must be 1 or 2."]
830    #[doc = " @returns The size in bytes."]
831    pub fn opus_decoder_get_size(channels: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
832}
833extern "C" {
834    #[doc = " Allocates and initializes a decoder state."]
835    #[doc = " @param [in] Fs <tt>opus_int32</tt>: Sample rate to decode at (Hz)."]
836    #[doc = "                                     This must be one of 8000, 12000, 16000,"]
837    #[doc = "                                     24000, or 48000."]
838    #[doc = " @param [in] channels <tt>int</tt>: Number of channels (1 or 2) to decode"]
839    #[doc = " @param [out] error <tt>int*</tt>: #OPUS_OK Success or @ref opus_errorcodes"]
840    #[doc = ""]
841    #[doc = " Internally Opus stores data at 48000 Hz, so that should be the default"]
842    #[doc = " value for Fs. However, the decoder can efficiently decode to buffers"]
843    #[doc = " at 8, 12, 16, and 24 kHz so if for some reason the caller cannot use"]
844    #[doc = " data at the full sample rate, or knows the compressed data doesn't"]
845    #[doc = " use the full frequency range, it can request decoding at a reduced"]
846    #[doc = " rate. Likewise, the decoder is capable of filling in either mono or"]
847    #[doc = " interleaved stereo pcm buffers, at the caller's request."]
848    pub fn opus_decoder_create(
849        Fs: opus_int32,
850        channels: ::std::os::raw::c_int,
851        error: *mut ::std::os::raw::c_int,
852    ) -> *mut OpusDecoder;
853}
854extern "C" {
855    #[doc = " Initializes a previously allocated decoder state."]
856    #[doc = " The state must be at least the size returned by opus_decoder_get_size()."]
857    #[doc = " This is intended for applications which use their own allocator instead of malloc. @see opus_decoder_create,opus_decoder_get_size"]
858    #[doc = " To reset a previously initialized state, use the #OPUS_RESET_STATE CTL."]
859    #[doc = " @param [in] st <tt>OpusDecoder*</tt>: Decoder state."]
860    #[doc = " @param [in] Fs <tt>opus_int32</tt>: Sampling rate to decode to (Hz)."]
861    #[doc = "                                     This must be one of 8000, 12000, 16000,"]
862    #[doc = "                                     24000, or 48000."]
863    #[doc = " @param [in] channels <tt>int</tt>: Number of channels (1 or 2) to decode"]
864    #[doc = " @retval #OPUS_OK Success or @ref opus_errorcodes"]
865    pub fn opus_decoder_init(
866        st: *mut OpusDecoder,
867        Fs: opus_int32,
868        channels: ::std::os::raw::c_int,
869    ) -> ::std::os::raw::c_int;
870}
871extern "C" {
872    #[doc = " Decode an Opus packet."]
873    #[doc = " @param [in] st <tt>OpusDecoder*</tt>: Decoder state"]
874    #[doc = " @param [in] data <tt>char*</tt>: Input payload. Use a NULL pointer to indicate packet loss"]
875    #[doc = " @param [in] len <tt>opus_int32</tt>: Number of bytes in payload*"]
876    #[doc = " @param [out] pcm <tt>opus_int16*</tt>: Output signal (interleaved if 2 channels). length"]
877    #[doc = "  is frame_size*channels*sizeof(opus_int16)"]
878    #[doc = " @param [in] frame_size Number of samples per channel of available space in \\a pcm."]
879    #[doc = "  If this is less than the maximum packet duration (120ms; 5760 for 48kHz), this function will"]
880    #[doc = "  not be capable of decoding some packets. In the case of PLC (data==NULL) or FEC (decode_fec=1),"]
881    #[doc = "  then frame_size needs to be exactly the duration of audio that is missing, otherwise the"]
882    #[doc = "  decoder will not be in the optimal state to decode the next incoming packet. For the PLC and"]
883    #[doc = "  FEC cases, frame_size <b>must</b> be a multiple of 2.5 ms."]
884    #[doc = " @param [in] decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band forward error correction data be"]
885    #[doc = "  decoded. If no such data is available, the frame is decoded as if it were lost."]
886    #[doc = " @returns Number of decoded samples or @ref opus_errorcodes"]
887    pub fn opus_decode(
888        st: *mut OpusDecoder,
889        data: *const ::std::os::raw::c_uchar,
890        len: opus_int32,
891        pcm: *mut opus_int16,
892        frame_size: ::std::os::raw::c_int,
893        decode_fec: ::std::os::raw::c_int,
894    ) -> ::std::os::raw::c_int;
895}
896extern "C" {
897    #[doc = " Decode an Opus packet with floating point output."]
898    #[doc = " @param [in] st <tt>OpusDecoder*</tt>: Decoder state"]
899    #[doc = " @param [in] data <tt>char*</tt>: Input payload. Use a NULL pointer to indicate packet loss"]
900    #[doc = " @param [in] len <tt>opus_int32</tt>: Number of bytes in payload"]
901    #[doc = " @param [out] pcm <tt>float*</tt>: Output signal (interleaved if 2 channels). length"]
902    #[doc = "  is frame_size*channels*sizeof(float)"]
903    #[doc = " @param [in] frame_size Number of samples per channel of available space in \\a pcm."]
904    #[doc = "  If this is less than the maximum packet duration (120ms; 5760 for 48kHz), this function will"]
905    #[doc = "  not be capable of decoding some packets. In the case of PLC (data==NULL) or FEC (decode_fec=1),"]
906    #[doc = "  then frame_size needs to be exactly the duration of audio that is missing, otherwise the"]
907    #[doc = "  decoder will not be in the optimal state to decode the next incoming packet. For the PLC and"]
908    #[doc = "  FEC cases, frame_size <b>must</b> be a multiple of 2.5 ms."]
909    #[doc = " @param [in] decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band forward error correction data be"]
910    #[doc = "  decoded. If no such data is available the frame is decoded as if it were lost."]
911    #[doc = " @returns Number of decoded samples or @ref opus_errorcodes"]
912    pub fn opus_decode_float(
913        st: *mut OpusDecoder,
914        data: *const ::std::os::raw::c_uchar,
915        len: opus_int32,
916        pcm: *mut f32,
917        frame_size: ::std::os::raw::c_int,
918        decode_fec: ::std::os::raw::c_int,
919    ) -> ::std::os::raw::c_int;
920}
921extern "C" {
922    #[doc = " Perform a CTL function on an Opus decoder."]
923    #[doc = ""]
924    #[doc = " Generally the request and subsequent arguments are generated"]
925    #[doc = " by a convenience macro."]
926    #[doc = " @param st <tt>OpusDecoder*</tt>: Decoder state."]
927    #[doc = " @param request This and all remaining parameters should be replaced by one"]
928    #[doc = "                of the convenience macros in @ref opus_genericctls or"]
929    #[doc = "                @ref opus_decoderctls."]
930    #[doc = " @see opus_genericctls"]
931    #[doc = " @see opus_decoderctls"]
932    pub fn opus_decoder_ctl(
933        st: *mut OpusDecoder,
934        request: ::std::os::raw::c_int,
935        ...
936    ) -> ::std::os::raw::c_int;
937}
938extern "C" {
939    #[doc = " Frees an <code>OpusDecoder</code> allocated by opus_decoder_create()."]
940    #[doc = " @param[in] st <tt>OpusDecoder*</tt>: State to be freed."]
941    pub fn opus_decoder_destroy(st: *mut OpusDecoder);
942}
943extern "C" {
944    #[doc = " Parse an opus packet into one or more frames."]
945    #[doc = " Opus_decode will perform this operation internally so most applications do"]
946    #[doc = " not need to use this function."]
947    #[doc = " This function does not copy the frames, the returned pointers are pointers into"]
948    #[doc = " the input packet."]
949    #[doc = " @param [in] data <tt>char*</tt>: Opus packet to be parsed"]
950    #[doc = " @param [in] len <tt>opus_int32</tt>: size of data"]
951    #[doc = " @param [out] out_toc <tt>char*</tt>: TOC pointer"]
952    #[doc = " @param [out] frames <tt>char*[48]</tt> encapsulated frames"]
953    #[doc = " @param [out] size <tt>opus_int16[48]</tt> sizes of the encapsulated frames"]
954    #[doc = " @param [out] payload_offset <tt>int*</tt>: returns the position of the payload within the packet (in bytes)"]
955    #[doc = " @returns number of frames"]
956    pub fn opus_packet_parse(
957        data: *const ::std::os::raw::c_uchar,
958        len: opus_int32,
959        out_toc: *mut ::std::os::raw::c_uchar,
960        frames: *mut *const ::std::os::raw::c_uchar,
961        size: *mut opus_int16,
962        payload_offset: *mut ::std::os::raw::c_int,
963    ) -> ::std::os::raw::c_int;
964}
965extern "C" {
966    #[doc = " Gets the bandwidth of an Opus packet."]
967    #[doc = " @param [in] data <tt>char*</tt>: Opus packet"]
968    #[doc = " @retval OPUS_BANDWIDTH_NARROWBAND Narrowband (4kHz bandpass)"]
969    #[doc = " @retval OPUS_BANDWIDTH_MEDIUMBAND Mediumband (6kHz bandpass)"]
970    #[doc = " @retval OPUS_BANDWIDTH_WIDEBAND Wideband (8kHz bandpass)"]
971    #[doc = " @retval OPUS_BANDWIDTH_SUPERWIDEBAND Superwideband (12kHz bandpass)"]
972    #[doc = " @retval OPUS_BANDWIDTH_FULLBAND Fullband (20kHz bandpass)"]
973    #[doc = " @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type"]
974    pub fn opus_packet_get_bandwidth(data: *const ::std::os::raw::c_uchar)
975        -> ::std::os::raw::c_int;
976}
977extern "C" {
978    #[doc = " Gets the number of samples per frame from an Opus packet."]
979    #[doc = " @param [in] data <tt>char*</tt>: Opus packet."]
980    #[doc = "                                  This must contain at least one byte of"]
981    #[doc = "                                  data."]
982    #[doc = " @param [in] Fs <tt>opus_int32</tt>: Sampling rate in Hz."]
983    #[doc = "                                     This must be a multiple of 400, or"]
984    #[doc = "                                     inaccurate results will be returned."]
985    #[doc = " @returns Number of samples per frame."]
986    pub fn opus_packet_get_samples_per_frame(
987        data: *const ::std::os::raw::c_uchar,
988        Fs: opus_int32,
989    ) -> ::std::os::raw::c_int;
990}
991extern "C" {
992    #[doc = " Gets the number of channels from an Opus packet."]
993    #[doc = " @param [in] data <tt>char*</tt>: Opus packet"]
994    #[doc = " @returns Number of channels"]
995    #[doc = " @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type"]
996    pub fn opus_packet_get_nb_channels(
997        data: *const ::std::os::raw::c_uchar,
998    ) -> ::std::os::raw::c_int;
999}
1000extern "C" {
1001    #[doc = " Gets the number of frames in an Opus packet."]
1002    #[doc = " @param [in] packet <tt>char*</tt>: Opus packet"]
1003    #[doc = " @param [in] len <tt>opus_int32</tt>: Length of packet"]
1004    #[doc = " @returns Number of frames"]
1005    #[doc = " @retval OPUS_BAD_ARG Insufficient data was passed to the function"]
1006    #[doc = " @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type"]
1007    pub fn opus_packet_get_nb_frames(
1008        packet: *const ::std::os::raw::c_uchar,
1009        len: opus_int32,
1010    ) -> ::std::os::raw::c_int;
1011}
1012extern "C" {
1013    #[doc = " Gets the number of samples of an Opus packet."]
1014    #[doc = " @param [in] packet <tt>char*</tt>: Opus packet"]
1015    #[doc = " @param [in] len <tt>opus_int32</tt>: Length of packet"]
1016    #[doc = " @param [in] Fs <tt>opus_int32</tt>: Sampling rate in Hz."]
1017    #[doc = "                                     This must be a multiple of 400, or"]
1018    #[doc = "                                     inaccurate results will be returned."]
1019    #[doc = " @returns Number of samples"]
1020    #[doc = " @retval OPUS_BAD_ARG Insufficient data was passed to the function"]
1021    #[doc = " @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type"]
1022    pub fn opus_packet_get_nb_samples(
1023        packet: *const ::std::os::raw::c_uchar,
1024        len: opus_int32,
1025        Fs: opus_int32,
1026    ) -> ::std::os::raw::c_int;
1027}
1028extern "C" {
1029    #[doc = " Gets the number of samples of an Opus packet."]
1030    #[doc = " @param [in] dec <tt>OpusDecoder*</tt>: Decoder state"]
1031    #[doc = " @param [in] packet <tt>char*</tt>: Opus packet"]
1032    #[doc = " @param [in] len <tt>opus_int32</tt>: Length of packet"]
1033    #[doc = " @returns Number of samples"]
1034    #[doc = " @retval OPUS_BAD_ARG Insufficient data was passed to the function"]
1035    #[doc = " @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type"]
1036    pub fn opus_decoder_get_nb_samples(
1037        dec: *const OpusDecoder,
1038        packet: *const ::std::os::raw::c_uchar,
1039        len: opus_int32,
1040    ) -> ::std::os::raw::c_int;
1041}
1042extern "C" {
1043    #[doc = " Applies soft-clipping to bring a float signal within the [-1,1] range. If"]
1044    #[doc = " the signal is already in that range, nothing is done. If there are values"]
1045    #[doc = " outside of [-1,1], then the signal is clipped as smoothly as possible to"]
1046    #[doc = " both fit in the range and avoid creating excessive distortion in the"]
1047    #[doc = " process."]
1048    #[doc = " @param [in,out] pcm <tt>float*</tt>: Input PCM and modified PCM"]
1049    #[doc = " @param [in] frame_size <tt>int</tt> Number of samples per channel to process"]
1050    #[doc = " @param [in] channels <tt>int</tt>: Number of channels"]
1051    #[doc = " @param [in,out] softclip_mem <tt>float*</tt>: State memory for the soft clipping process (one float per channel, initialized to zero)"]
1052    pub fn opus_pcm_soft_clip(
1053        pcm: *mut f32,
1054        frame_size: ::std::os::raw::c_int,
1055        channels: ::std::os::raw::c_int,
1056        softclip_mem: *mut f32,
1057    );
1058}
1059#[repr(C)]
1060#[derive(Debug, Copy, Clone)]
1061pub struct OpusRepacketizer {
1062    _unused: [u8; 0],
1063}
1064extern "C" {
1065    #[doc = " Gets the size of an <code>OpusRepacketizer</code> structure."]
1066    #[doc = " @returns The size in bytes."]
1067    pub fn opus_repacketizer_get_size() -> ::std::os::raw::c_int;
1068}
1069extern "C" {
1070    #[doc = " (Re)initializes a previously allocated repacketizer state."]
1071    #[doc = " The state must be at least the size returned by opus_repacketizer_get_size()."]
1072    #[doc = " This can be used for applications which use their own allocator instead of"]
1073    #[doc = " malloc()."]
1074    #[doc = " It must also be called to reset the queue of packets waiting to be"]
1075    #[doc = " repacketized, which is necessary if the maximum packet duration of 120 ms"]
1076    #[doc = " is reached or if you wish to submit packets with a different Opus"]
1077    #[doc = " configuration (coding mode, audio bandwidth, frame size, or channel count)."]
1078    #[doc = " Failure to do so will prevent a new packet from being added with"]
1079    #[doc = " opus_repacketizer_cat()."]
1080    #[doc = " @see opus_repacketizer_create"]
1081    #[doc = " @see opus_repacketizer_get_size"]
1082    #[doc = " @see opus_repacketizer_cat"]
1083    #[doc = " @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state to"]
1084    #[doc = "                                       (re)initialize."]
1085    #[doc = " @returns A pointer to the same repacketizer state that was passed in."]
1086    pub fn opus_repacketizer_init(rp: *mut OpusRepacketizer) -> *mut OpusRepacketizer;
1087}
1088extern "C" {
1089    #[doc = " Allocates memory and initializes the new repacketizer with"]
1090    #[doc = " opus_repacketizer_init()."]
1091    pub fn opus_repacketizer_create() -> *mut OpusRepacketizer;
1092}
1093extern "C" {
1094    #[doc = " Frees an <code>OpusRepacketizer</code> allocated by"]
1095    #[doc = " opus_repacketizer_create()."]
1096    #[doc = " @param[in] rp <tt>OpusRepacketizer*</tt>: State to be freed."]
1097    pub fn opus_repacketizer_destroy(rp: *mut OpusRepacketizer);
1098}
1099extern "C" {
1100    #[doc = " Add a packet to the current repacketizer state."]
1101    #[doc = " This packet must match the configuration of any packets already submitted"]
1102    #[doc = " for repacketization since the last call to opus_repacketizer_init()."]
1103    #[doc = " This means that it must have the same coding mode, audio bandwidth, frame"]
1104    #[doc = " size, and channel count."]
1105    #[doc = " This can be checked in advance by examining the top 6 bits of the first"]
1106    #[doc = " byte of the packet, and ensuring they match the top 6 bits of the first"]
1107    #[doc = " byte of any previously submitted packet."]
1108    #[doc = " The total duration of audio in the repacketizer state also must not exceed"]
1109    #[doc = " 120 ms, the maximum duration of a single packet, after adding this packet."]
1110    #[doc = ""]
1111    #[doc = " The contents of the current repacketizer state can be extracted into new"]
1112    #[doc = " packets using opus_repacketizer_out() or opus_repacketizer_out_range()."]
1113    #[doc = ""]
1114    #[doc = " In order to add a packet with a different configuration or to add more"]
1115    #[doc = " audio beyond 120 ms, you must clear the repacketizer state by calling"]
1116    #[doc = " opus_repacketizer_init()."]
1117    #[doc = " If a packet is too large to add to the current repacketizer state, no part"]
1118    #[doc = " of it is added, even if it contains multiple frames, some of which might"]
1119    #[doc = " fit."]
1120    #[doc = " If you wish to be able to add parts of such packets, you should first use"]
1121    #[doc = " another repacketizer to split the packet into pieces and add them"]
1122    #[doc = " individually."]
1123    #[doc = " @see opus_repacketizer_out_range"]
1124    #[doc = " @see opus_repacketizer_out"]
1125    #[doc = " @see opus_repacketizer_init"]
1126    #[doc = " @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state to which to"]
1127    #[doc = "                                       add the packet."]
1128    #[doc = " @param[in] data <tt>const unsigned char*</tt>: The packet data."]
1129    #[doc = "                                                The application must ensure"]
1130    #[doc = "                                                this pointer remains valid"]
1131    #[doc = "                                                until the next call to"]
1132    #[doc = "                                                opus_repacketizer_init() or"]
1133    #[doc = "                                                opus_repacketizer_destroy()."]
1134    #[doc = " @param len <tt>opus_int32</tt>: The number of bytes in the packet data."]
1135    #[doc = " @returns An error code indicating whether or not the operation succeeded."]
1136    #[doc = " @retval #OPUS_OK The packet's contents have been added to the repacketizer"]
1137    #[doc = "                  state."]
1138    #[doc = " @retval #OPUS_INVALID_PACKET The packet did not have a valid TOC sequence,"]
1139    #[doc = "                              the packet's TOC sequence was not compatible"]
1140    #[doc = "                              with previously submitted packets (because"]
1141    #[doc = "                              the coding mode, audio bandwidth, frame size,"]
1142    #[doc = "                              or channel count did not match), or adding"]
1143    #[doc = "                              this packet would increase the total amount of"]
1144    #[doc = "                              audio stored in the repacketizer state to more"]
1145    #[doc = "                              than 120 ms."]
1146    pub fn opus_repacketizer_cat(
1147        rp: *mut OpusRepacketizer,
1148        data: *const ::std::os::raw::c_uchar,
1149        len: opus_int32,
1150    ) -> ::std::os::raw::c_int;
1151}
1152extern "C" {
1153    #[doc = " Construct a new packet from data previously submitted to the repacketizer"]
1154    #[doc = " state via opus_repacketizer_cat()."]
1155    #[doc = " @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state from which to"]
1156    #[doc = "                                       construct the new packet."]
1157    #[doc = " @param begin <tt>int</tt>: The index of the first frame in the current"]
1158    #[doc = "                            repacketizer state to include in the output."]
1159    #[doc = " @param end <tt>int</tt>: One past the index of the last frame in the"]
1160    #[doc = "                          current repacketizer state to include in the"]
1161    #[doc = "                          output."]
1162    #[doc = " @param[out] data <tt>const unsigned char*</tt>: The buffer in which to"]
1163    #[doc = "                                                 store the output packet."]
1164    #[doc = " @param maxlen <tt>opus_int32</tt>: The maximum number of bytes to store in"]
1165    #[doc = "                                    the output buffer. In order to guarantee"]
1166    #[doc = "                                    success, this should be at least"]
1167    #[doc = "                                    <code>1276</code> for a single frame,"]
1168    #[doc = "                                    or for multiple frames,"]
1169    #[doc = "                                    <code>1277*(end-begin)</code>."]
1170    #[doc = "                                    However, <code>1*(end-begin)</code> plus"]
1171    #[doc = "                                    the size of all packet data submitted to"]
1172    #[doc = "                                    the repacketizer since the last call to"]
1173    #[doc = "                                    opus_repacketizer_init() or"]
1174    #[doc = "                                    opus_repacketizer_create() is also"]
1175    #[doc = "                                    sufficient, and possibly much smaller."]
1176    #[doc = " @returns The total size of the output packet on success, or an error code"]
1177    #[doc = "          on failure."]
1178    #[doc = " @retval #OPUS_BAD_ARG <code>[begin,end)</code> was an invalid range of"]
1179    #[doc = "                       frames (begin < 0, begin >= end, or end >"]
1180    #[doc = "                       opus_repacketizer_get_nb_frames())."]
1181    #[doc = " @retval #OPUS_BUFFER_TOO_SMALL \\a maxlen was insufficient to contain the"]
1182    #[doc = "                                complete output packet."]
1183    pub fn opus_repacketizer_out_range(
1184        rp: *mut OpusRepacketizer,
1185        begin: ::std::os::raw::c_int,
1186        end: ::std::os::raw::c_int,
1187        data: *mut ::std::os::raw::c_uchar,
1188        maxlen: opus_int32,
1189    ) -> opus_int32;
1190}
1191extern "C" {
1192    #[doc = " Return the total number of frames contained in packet data submitted to"]
1193    #[doc = " the repacketizer state so far via opus_repacketizer_cat() since the last"]
1194    #[doc = " call to opus_repacketizer_init() or opus_repacketizer_create()."]
1195    #[doc = " This defines the valid range of packets that can be extracted with"]
1196    #[doc = " opus_repacketizer_out_range() or opus_repacketizer_out()."]
1197    #[doc = " @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state containing the"]
1198    #[doc = "                                       frames."]
1199    #[doc = " @returns The total number of frames contained in the packet data submitted"]
1200    #[doc = "          to the repacketizer state."]
1201    pub fn opus_repacketizer_get_nb_frames(rp: *mut OpusRepacketizer) -> ::std::os::raw::c_int;
1202}
1203extern "C" {
1204    #[doc = " Construct a new packet from data previously submitted to the repacketizer"]
1205    #[doc = " state via opus_repacketizer_cat()."]
1206    #[doc = " This is a convenience routine that returns all the data submitted so far"]
1207    #[doc = " in a single packet."]
1208    #[doc = " It is equivalent to calling"]
1209    #[doc = " @code"]
1210    #[doc = " opus_repacketizer_out_range(rp, 0, opus_repacketizer_get_nb_frames(rp),"]
1211    #[doc = "                             data, maxlen)"]
1212    #[doc = " @endcode"]
1213    #[doc = " @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state from which to"]
1214    #[doc = "                                       construct the new packet."]
1215    #[doc = " @param[out] data <tt>const unsigned char*</tt>: The buffer in which to"]
1216    #[doc = "                                                 store the output packet."]
1217    #[doc = " @param maxlen <tt>opus_int32</tt>: The maximum number of bytes to store in"]
1218    #[doc = "                                    the output buffer. In order to guarantee"]
1219    #[doc = "                                    success, this should be at least"]
1220    #[doc = "                                    <code>1277*opus_repacketizer_get_nb_frames(rp)</code>."]
1221    #[doc = "                                    However,"]
1222    #[doc = "                                    <code>1*opus_repacketizer_get_nb_frames(rp)</code>"]
1223    #[doc = "                                    plus the size of all packet data"]
1224    #[doc = "                                    submitted to the repacketizer since the"]
1225    #[doc = "                                    last call to opus_repacketizer_init() or"]
1226    #[doc = "                                    opus_repacketizer_create() is also"]
1227    #[doc = "                                    sufficient, and possibly much smaller."]
1228    #[doc = " @returns The total size of the output packet on success, or an error code"]
1229    #[doc = "          on failure."]
1230    #[doc = " @retval #OPUS_BUFFER_TOO_SMALL \\a maxlen was insufficient to contain the"]
1231    #[doc = "                                complete output packet."]
1232    pub fn opus_repacketizer_out(
1233        rp: *mut OpusRepacketizer,
1234        data: *mut ::std::os::raw::c_uchar,
1235        maxlen: opus_int32,
1236    ) -> opus_int32;
1237}
1238extern "C" {
1239    #[doc = " Pads a given Opus packet to a larger size (possibly changing the TOC sequence)."]
1240    #[doc = " @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the"]
1241    #[doc = "                                                   packet to pad."]
1242    #[doc = " @param len <tt>opus_int32</tt>: The size of the packet."]
1243    #[doc = "                                 This must be at least 1."]
1244    #[doc = " @param new_len <tt>opus_int32</tt>: The desired size of the packet after padding."]
1245    #[doc = "                                 This must be at least as large as len."]
1246    #[doc = " @returns an error code"]
1247    #[doc = " @retval #OPUS_OK \\a on success."]
1248    #[doc = " @retval #OPUS_BAD_ARG \\a len was less than 1 or new_len was less than len."]
1249    #[doc = " @retval #OPUS_INVALID_PACKET \\a data did not contain a valid Opus packet."]
1250    pub fn opus_packet_pad(
1251        data: *mut ::std::os::raw::c_uchar,
1252        len: opus_int32,
1253        new_len: opus_int32,
1254    ) -> ::std::os::raw::c_int;
1255}
1256extern "C" {
1257    #[doc = " Remove all padding from a given Opus packet and rewrite the TOC sequence to"]
1258    #[doc = " minimize space usage."]
1259    #[doc = " @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the"]
1260    #[doc = "                                                   packet to strip."]
1261    #[doc = " @param len <tt>opus_int32</tt>: The size of the packet."]
1262    #[doc = "                                 This must be at least 1."]
1263    #[doc = " @returns The new size of the output packet on success, or an error code"]
1264    #[doc = "          on failure."]
1265    #[doc = " @retval #OPUS_BAD_ARG \\a len was less than 1."]
1266    #[doc = " @retval #OPUS_INVALID_PACKET \\a data did not contain a valid Opus packet."]
1267    pub fn opus_packet_unpad(data: *mut ::std::os::raw::c_uchar, len: opus_int32) -> opus_int32;
1268}
1269extern "C" {
1270    #[doc = " Pads a given Opus multi-stream packet to a larger size (possibly changing the TOC sequence)."]
1271    #[doc = " @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the"]
1272    #[doc = "                                                   packet to pad."]
1273    #[doc = " @param len <tt>opus_int32</tt>: The size of the packet."]
1274    #[doc = "                                 This must be at least 1."]
1275    #[doc = " @param new_len <tt>opus_int32</tt>: The desired size of the packet after padding."]
1276    #[doc = "                                 This must be at least 1."]
1277    #[doc = " @param nb_streams <tt>opus_int32</tt>: The number of streams (not channels) in the packet."]
1278    #[doc = "                                 This must be at least as large as len."]
1279    #[doc = " @returns an error code"]
1280    #[doc = " @retval #OPUS_OK \\a on success."]
1281    #[doc = " @retval #OPUS_BAD_ARG \\a len was less than 1."]
1282    #[doc = " @retval #OPUS_INVALID_PACKET \\a data did not contain a valid Opus packet."]
1283    pub fn opus_multistream_packet_pad(
1284        data: *mut ::std::os::raw::c_uchar,
1285        len: opus_int32,
1286        new_len: opus_int32,
1287        nb_streams: ::std::os::raw::c_int,
1288    ) -> ::std::os::raw::c_int;
1289}
1290extern "C" {
1291    #[doc = " Remove all padding from a given Opus multi-stream packet and rewrite the TOC sequence to"]
1292    #[doc = " minimize space usage."]
1293    #[doc = " @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the"]
1294    #[doc = "                                                   packet to strip."]
1295    #[doc = " @param len <tt>opus_int32</tt>: The size of the packet."]
1296    #[doc = "                                 This must be at least 1."]
1297    #[doc = " @param nb_streams <tt>opus_int32</tt>: The number of streams (not channels) in the packet."]
1298    #[doc = "                                 This must be at least 1."]
1299    #[doc = " @returns The new size of the output packet on success, or an error code"]
1300    #[doc = "          on failure."]
1301    #[doc = " @retval #OPUS_BAD_ARG \\a len was less than 1 or new_len was less than len."]
1302    #[doc = " @retval #OPUS_INVALID_PACKET \\a data did not contain a valid Opus packet."]
1303    pub fn opus_multistream_packet_unpad(
1304        data: *mut ::std::os::raw::c_uchar,
1305        len: opus_int32,
1306        nb_streams: ::std::os::raw::c_int,
1307    ) -> opus_int32;
1308}
1309pub type __builtin_va_list = *mut ::std::os::raw::c_char;
1310#[repr(C)]
1311#[derive(Debug, Copy, Clone)]
1312pub struct lconv {
1313    pub _address: u8,
1314}