opus_codec/
bindings.rs

1/* automatically generated by rust-bindgen 0.72.1 */
2
3pub const _STDINT_H: u32 = 1;
4pub const _FEATURES_H: u32 = 1;
5pub const _DEFAULT_SOURCE: u32 = 1;
6pub const __GLIBC_USE_ISOC2Y: u32 = 0;
7pub const __GLIBC_USE_ISOC23: u32 = 0;
8pub const __USE_ISOC11: u32 = 1;
9pub const __USE_ISOC99: u32 = 1;
10pub const __USE_ISOC95: u32 = 1;
11pub const __USE_POSIX_IMPLICITLY: u32 = 1;
12pub const _POSIX_SOURCE: u32 = 1;
13pub const _POSIX_C_SOURCE: u32 = 200809;
14pub const __USE_POSIX: u32 = 1;
15pub const __USE_POSIX2: u32 = 1;
16pub const __USE_POSIX199309: u32 = 1;
17pub const __USE_POSIX199506: u32 = 1;
18pub const __USE_XOPEN2K: u32 = 1;
19pub const __USE_XOPEN2K8: u32 = 1;
20pub const _ATFILE_SOURCE: u32 = 1;
21pub const __WORDSIZE: u32 = 64;
22pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
23pub const __SYSCALL_WORDSIZE: u32 = 64;
24pub const __TIMESIZE: u32 = 64;
25pub const __USE_TIME_BITS64: u32 = 1;
26pub const __USE_MISC: u32 = 1;
27pub const __USE_ATFILE: u32 = 1;
28pub const __USE_FORTIFY_LEVEL: u32 = 0;
29pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
30pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
31pub const __GLIBC_USE_C23_STRTOL: u32 = 0;
32pub const _STDC_PREDEF_H: u32 = 1;
33pub const __STDC_IEC_559__: u32 = 1;
34pub const __STDC_IEC_60559_BFP__: u32 = 201404;
35pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
36pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404;
37pub const __STDC_ISO_10646__: u32 = 201706;
38pub const __GNU_LIBRARY__: u32 = 6;
39pub const __GLIBC__: u32 = 2;
40pub const __GLIBC_MINOR__: u32 = 42;
41pub const _SYS_CDEFS_H: u32 = 1;
42pub const __glibc_c99_flexarr_available: u32 = 1;
43pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0;
44pub const __HAVE_GENERIC_SELECTION: u32 = 1;
45pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
46pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
47pub const __GLIBC_USE_IEC_60559_BFP_EXT_C23: u32 = 0;
48pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0;
49pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
50pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C23: u32 = 0;
51pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
52pub const _BITS_TYPES_H: u32 = 1;
53pub const _BITS_TYPESIZES_H: u32 = 1;
54pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
55pub const __INO_T_MATCHES_INO64_T: u32 = 1;
56pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
57pub const __STATFS_MATCHES_STATFS64: u32 = 1;
58pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 1;
59pub const __FD_SETSIZE: u32 = 1024;
60pub const _BITS_TIME64_H: u32 = 1;
61pub const _BITS_WCHAR_H: u32 = 1;
62pub const _BITS_STDINT_INTN_H: u32 = 1;
63pub const _BITS_STDINT_UINTN_H: u32 = 1;
64pub const _BITS_STDINT_LEAST_H: u32 = 1;
65pub const INT8_MIN: i32 = -128;
66pub const INT16_MIN: i32 = -32768;
67pub const INT32_MIN: i32 = -2147483648;
68pub const INT8_MAX: u32 = 127;
69pub const INT16_MAX: u32 = 32767;
70pub const INT32_MAX: u32 = 2147483647;
71pub const UINT8_MAX: u32 = 255;
72pub const UINT16_MAX: u32 = 65535;
73pub const UINT32_MAX: u32 = 4294967295;
74pub const INT_LEAST8_MIN: i32 = -128;
75pub const INT_LEAST16_MIN: i32 = -32768;
76pub const INT_LEAST32_MIN: i32 = -2147483648;
77pub const INT_LEAST8_MAX: u32 = 127;
78pub const INT_LEAST16_MAX: u32 = 32767;
79pub const INT_LEAST32_MAX: u32 = 2147483647;
80pub const UINT_LEAST8_MAX: u32 = 255;
81pub const UINT_LEAST16_MAX: u32 = 65535;
82pub const UINT_LEAST32_MAX: u32 = 4294967295;
83pub const INT_FAST8_MIN: i32 = -128;
84pub const INT_FAST16_MIN: i64 = -9223372036854775808;
85pub const INT_FAST32_MIN: i64 = -9223372036854775808;
86pub const INT_FAST8_MAX: u32 = 127;
87pub const INT_FAST16_MAX: u64 = 9223372036854775807;
88pub const INT_FAST32_MAX: u64 = 9223372036854775807;
89pub const UINT_FAST8_MAX: u32 = 255;
90pub const UINT_FAST16_MAX: i32 = -1;
91pub const UINT_FAST32_MAX: i32 = -1;
92pub const INTPTR_MIN: i64 = -9223372036854775808;
93pub const INTPTR_MAX: u64 = 9223372036854775807;
94pub const UINTPTR_MAX: i32 = -1;
95pub const PTRDIFF_MIN: i64 = -9223372036854775808;
96pub const PTRDIFF_MAX: u64 = 9223372036854775807;
97pub const SIG_ATOMIC_MIN: i32 = -2147483648;
98pub const SIG_ATOMIC_MAX: u32 = 2147483647;
99pub const SIZE_MAX: i32 = -1;
100pub const WINT_MIN: u32 = 0;
101pub const WINT_MAX: u32 = 4294967295;
102pub const OPUS_OK: u32 = 0;
103pub const OPUS_BAD_ARG: i32 = -1;
104pub const OPUS_BUFFER_TOO_SMALL: i32 = -2;
105pub const OPUS_INTERNAL_ERROR: i32 = -3;
106pub const OPUS_INVALID_PACKET: i32 = -4;
107pub const OPUS_UNIMPLEMENTED: i32 = -5;
108pub const OPUS_INVALID_STATE: i32 = -6;
109pub const OPUS_ALLOC_FAIL: i32 = -7;
110pub const OPUS_SET_APPLICATION_REQUEST: u32 = 4000;
111pub const OPUS_GET_APPLICATION_REQUEST: u32 = 4001;
112pub const OPUS_SET_BITRATE_REQUEST: u32 = 4002;
113pub const OPUS_GET_BITRATE_REQUEST: u32 = 4003;
114pub const OPUS_SET_MAX_BANDWIDTH_REQUEST: u32 = 4004;
115pub const OPUS_GET_MAX_BANDWIDTH_REQUEST: u32 = 4005;
116pub const OPUS_SET_VBR_REQUEST: u32 = 4006;
117pub const OPUS_GET_VBR_REQUEST: u32 = 4007;
118pub const OPUS_SET_BANDWIDTH_REQUEST: u32 = 4008;
119pub const OPUS_GET_BANDWIDTH_REQUEST: u32 = 4009;
120pub const OPUS_SET_COMPLEXITY_REQUEST: u32 = 4010;
121pub const OPUS_GET_COMPLEXITY_REQUEST: u32 = 4011;
122pub const OPUS_SET_INBAND_FEC_REQUEST: u32 = 4012;
123pub const OPUS_GET_INBAND_FEC_REQUEST: u32 = 4013;
124pub const OPUS_SET_PACKET_LOSS_PERC_REQUEST: u32 = 4014;
125pub const OPUS_GET_PACKET_LOSS_PERC_REQUEST: u32 = 4015;
126pub const OPUS_SET_DTX_REQUEST: u32 = 4016;
127pub const OPUS_GET_DTX_REQUEST: u32 = 4017;
128pub const OPUS_SET_VBR_CONSTRAINT_REQUEST: u32 = 4020;
129pub const OPUS_GET_VBR_CONSTRAINT_REQUEST: u32 = 4021;
130pub const OPUS_SET_FORCE_CHANNELS_REQUEST: u32 = 4022;
131pub const OPUS_GET_FORCE_CHANNELS_REQUEST: u32 = 4023;
132pub const OPUS_SET_SIGNAL_REQUEST: u32 = 4024;
133pub const OPUS_GET_SIGNAL_REQUEST: u32 = 4025;
134pub const OPUS_GET_LOOKAHEAD_REQUEST: u32 = 4027;
135pub const OPUS_GET_SAMPLE_RATE_REQUEST: u32 = 4029;
136pub const OPUS_GET_FINAL_RANGE_REQUEST: u32 = 4031;
137pub const OPUS_GET_PITCH_REQUEST: u32 = 4033;
138pub const OPUS_SET_GAIN_REQUEST: u32 = 4034;
139pub const OPUS_GET_GAIN_REQUEST: u32 = 4045;
140pub const OPUS_SET_LSB_DEPTH_REQUEST: u32 = 4036;
141pub const OPUS_GET_LSB_DEPTH_REQUEST: u32 = 4037;
142pub const OPUS_GET_LAST_PACKET_DURATION_REQUEST: u32 = 4039;
143pub const OPUS_SET_EXPERT_FRAME_DURATION_REQUEST: u32 = 4040;
144pub const OPUS_GET_EXPERT_FRAME_DURATION_REQUEST: u32 = 4041;
145pub const OPUS_SET_PREDICTION_DISABLED_REQUEST: u32 = 4042;
146pub const OPUS_GET_PREDICTION_DISABLED_REQUEST: u32 = 4043;
147pub const OPUS_SET_PHASE_INVERSION_DISABLED_REQUEST: u32 = 4046;
148pub const OPUS_GET_PHASE_INVERSION_DISABLED_REQUEST: u32 = 4047;
149pub const OPUS_GET_IN_DTX_REQUEST: u32 = 4049;
150pub const OPUS_SET_DRED_DURATION_REQUEST: u32 = 4050;
151pub const OPUS_GET_DRED_DURATION_REQUEST: u32 = 4051;
152pub const OPUS_SET_DNN_BLOB_REQUEST: u32 = 4052;
153pub const OPUS_AUTO: i32 = -1000;
154pub const OPUS_BITRATE_MAX: i32 = -1;
155pub const OPUS_APPLICATION_VOIP: u32 = 2048;
156pub const OPUS_APPLICATION_AUDIO: u32 = 2049;
157pub const OPUS_APPLICATION_RESTRICTED_LOWDELAY: u32 = 2051;
158pub const OPUS_SIGNAL_VOICE: u32 = 3001;
159pub const OPUS_SIGNAL_MUSIC: u32 = 3002;
160pub const OPUS_BANDWIDTH_NARROWBAND: u32 = 1101;
161pub const OPUS_BANDWIDTH_MEDIUMBAND: u32 = 1102;
162pub const OPUS_BANDWIDTH_WIDEBAND: u32 = 1103;
163pub const OPUS_BANDWIDTH_SUPERWIDEBAND: u32 = 1104;
164pub const OPUS_BANDWIDTH_FULLBAND: u32 = 1105;
165pub const OPUS_FRAMESIZE_ARG: u32 = 5000;
166pub const OPUS_FRAMESIZE_2_5_MS: u32 = 5001;
167pub const OPUS_FRAMESIZE_5_MS: u32 = 5002;
168pub const OPUS_FRAMESIZE_10_MS: u32 = 5003;
169pub const OPUS_FRAMESIZE_20_MS: u32 = 5004;
170pub const OPUS_FRAMESIZE_40_MS: u32 = 5005;
171pub const OPUS_FRAMESIZE_60_MS: u32 = 5006;
172pub const OPUS_FRAMESIZE_80_MS: u32 = 5007;
173pub const OPUS_FRAMESIZE_100_MS: u32 = 5008;
174pub const OPUS_FRAMESIZE_120_MS: u32 = 5009;
175pub const OPUS_RESET_STATE: u32 = 4028;
176pub const OPUS_MULTISTREAM_GET_ENCODER_STATE_REQUEST: u32 = 5120;
177pub const OPUS_MULTISTREAM_GET_DECODER_STATE_REQUEST: u32 = 5122;
178pub const OPUS_PROJECTION_GET_DEMIXING_MATRIX_GAIN_REQUEST: u32 = 6001;
179pub const OPUS_PROJECTION_GET_DEMIXING_MATRIX_SIZE_REQUEST: u32 = 6003;
180pub const OPUS_PROJECTION_GET_DEMIXING_MATRIX_REQUEST: u32 = 6005;
181pub type __u_char = ::std::os::raw::c_uchar;
182pub type __u_short = ::std::os::raw::c_ushort;
183pub type __u_int = ::std::os::raw::c_uint;
184pub type __u_long = ::std::os::raw::c_ulong;
185pub type __int8_t = ::std::os::raw::c_schar;
186pub type __uint8_t = ::std::os::raw::c_uchar;
187pub type __int16_t = ::std::os::raw::c_short;
188pub type __uint16_t = ::std::os::raw::c_ushort;
189pub type __int32_t = ::std::os::raw::c_int;
190pub type __uint32_t = ::std::os::raw::c_uint;
191pub type __int64_t = ::std::os::raw::c_long;
192pub type __uint64_t = ::std::os::raw::c_ulong;
193pub type __int_least8_t = __int8_t;
194pub type __uint_least8_t = __uint8_t;
195pub type __int_least16_t = __int16_t;
196pub type __uint_least16_t = __uint16_t;
197pub type __int_least32_t = __int32_t;
198pub type __uint_least32_t = __uint32_t;
199pub type __int_least64_t = __int64_t;
200pub type __uint_least64_t = __uint64_t;
201pub type __quad_t = ::std::os::raw::c_long;
202pub type __u_quad_t = ::std::os::raw::c_ulong;
203pub type __intmax_t = ::std::os::raw::c_long;
204pub type __uintmax_t = ::std::os::raw::c_ulong;
205pub type __dev_t = ::std::os::raw::c_ulong;
206pub type __uid_t = ::std::os::raw::c_uint;
207pub type __gid_t = ::std::os::raw::c_uint;
208pub type __ino_t = ::std::os::raw::c_ulong;
209pub type __ino64_t = ::std::os::raw::c_ulong;
210pub type __mode_t = ::std::os::raw::c_uint;
211pub type __nlink_t = ::std::os::raw::c_ulong;
212pub type __off_t = ::std::os::raw::c_long;
213pub type __off64_t = ::std::os::raw::c_long;
214pub type __pid_t = ::std::os::raw::c_int;
215#[repr(C)]
216#[derive(Debug, Copy, Clone)]
217pub struct __fsid_t {
218    pub __val: [::std::os::raw::c_int; 2usize],
219}
220#[allow(clippy::unnecessary_operation, clippy::identity_op)]
221const _: () = {
222    ["Size of __fsid_t"][::std::mem::size_of::<__fsid_t>() - 8usize];
223    ["Alignment of __fsid_t"][::std::mem::align_of::<__fsid_t>() - 4usize];
224    ["Offset of field: __fsid_t::__val"][::std::mem::offset_of!(__fsid_t, __val) - 0usize];
225};
226pub type __clock_t = ::std::os::raw::c_long;
227pub type __rlim_t = ::std::os::raw::c_ulong;
228pub type __rlim64_t = ::std::os::raw::c_ulong;
229pub type __id_t = ::std::os::raw::c_uint;
230pub type __time_t = ::std::os::raw::c_long;
231pub type __useconds_t = ::std::os::raw::c_uint;
232pub type __suseconds_t = ::std::os::raw::c_long;
233pub type __suseconds64_t = ::std::os::raw::c_long;
234pub type __daddr_t = ::std::os::raw::c_int;
235pub type __key_t = ::std::os::raw::c_int;
236pub type __clockid_t = ::std::os::raw::c_int;
237pub type __timer_t = *mut ::std::os::raw::c_void;
238pub type __blksize_t = ::std::os::raw::c_long;
239pub type __blkcnt_t = ::std::os::raw::c_long;
240pub type __blkcnt64_t = ::std::os::raw::c_long;
241pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
242pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
243pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
244pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
245pub type __fsword_t = ::std::os::raw::c_long;
246pub type __ssize_t = ::std::os::raw::c_long;
247pub type __syscall_slong_t = ::std::os::raw::c_long;
248pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
249pub type __loff_t = __off64_t;
250pub type __caddr_t = *mut ::std::os::raw::c_char;
251pub type __intptr_t = ::std::os::raw::c_long;
252pub type __socklen_t = ::std::os::raw::c_uint;
253pub type __sig_atomic_t = ::std::os::raw::c_int;
254pub type int_least8_t = __int_least8_t;
255pub type int_least16_t = __int_least16_t;
256pub type int_least32_t = __int_least32_t;
257pub type int_least64_t = __int_least64_t;
258pub type uint_least8_t = __uint_least8_t;
259pub type uint_least16_t = __uint_least16_t;
260pub type uint_least32_t = __uint_least32_t;
261pub type uint_least64_t = __uint_least64_t;
262pub type int_fast8_t = ::std::os::raw::c_schar;
263pub type int_fast16_t = ::std::os::raw::c_long;
264pub type int_fast32_t = ::std::os::raw::c_long;
265pub type int_fast64_t = ::std::os::raw::c_long;
266pub type uint_fast8_t = ::std::os::raw::c_uchar;
267pub type uint_fast16_t = ::std::os::raw::c_ulong;
268pub type uint_fast32_t = ::std::os::raw::c_ulong;
269pub type uint_fast64_t = ::std::os::raw::c_ulong;
270pub type intmax_t = __intmax_t;
271pub type uintmax_t = __uintmax_t;
272pub type opus_int8 = i8;
273pub type opus_uint8 = u8;
274pub type opus_int16 = i16;
275pub type opus_uint16 = u16;
276pub type opus_int32 = i32;
277pub type opus_uint32 = u32;
278pub type opus_int64 = i64;
279pub type opus_uint64 = u64;
280unsafe extern "C" {
281    #[doc = " Converts an opus error code into a human readable string.\n\n @param[in] error <tt>int</tt>: Error number\n @returns Error string"]
282    pub fn opus_strerror(error: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
283}
284unsafe extern "C" {
285    #[doc = " Gets the libopus version string.\n\n Applications may look for the substring \"-fixed\" in the version string to\n determine whether they have a fixed-point or floating-point build at\n runtime.\n\n @returns Version string"]
286    pub fn opus_get_version_string() -> *const ::std::os::raw::c_char;
287}
288#[repr(C)]
289#[derive(Debug, Copy, Clone)]
290pub struct OpusEncoder {
291    _unused: [u8; 0],
292}
293unsafe extern "C" {
294    #[doc = " Gets the size of an <code>OpusEncoder</code> structure.\n @param[in] channels <tt>int</tt>: Number of channels.\n                                   This must be 1 or 2.\n @returns The size in bytes."]
295    pub fn opus_encoder_get_size(channels: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
296}
297unsafe extern "C" {
298    #[doc = " Allocates and initializes an encoder state.\n There are three coding modes:\n\n @ref OPUS_APPLICATION_VOIP gives best quality at a given bitrate for voice\n    signals. It enhances the  input signal by high-pass filtering and\n    emphasizing formants and harmonics. Optionally  it includes in-band\n    forward error correction to protect against packet loss. Use this\n    mode for typical VoIP applications. Because of the enhancement,\n    even at high bitrates the output may sound different from the input.\n\n @ref OPUS_APPLICATION_AUDIO gives best quality at a given bitrate for most\n    non-voice signals like music. Use this mode for music and mixed\n    (music/voice) content, broadcast, and applications requiring less\n    than 15 ms of coding delay.\n\n @ref OPUS_APPLICATION_RESTRICTED_LOWDELAY configures low-delay mode that\n    disables the speech-optimized mode in exchange for slightly reduced delay.\n    This mode can only be set on an newly initialized or freshly reset encoder\n    because it changes the codec delay.\n\n This is useful when the caller knows that the speech-optimized modes will not be needed (use with caution).\n @param [in] Fs <tt>opus_int32</tt>: Sampling rate of input signal (Hz)\n                                     This must be one of 8000, 12000, 16000,\n                                     24000, or 48000.\n @param [in] channels <tt>int</tt>: Number of channels (1 or 2) in input signal\n @param [in] application <tt>int</tt>: Coding mode (one of @ref OPUS_APPLICATION_VOIP, @ref OPUS_APPLICATION_AUDIO, or @ref OPUS_APPLICATION_RESTRICTED_LOWDELAY)\n @param [out] error <tt>int*</tt>: @ref opus_errorcodes\n @note Regardless of the sampling rate and number channels selected, the Opus encoder\n can switch to a lower audio bandwidth or number of channels if the bitrate\n selected is too low. This also means that it is safe to always use 48 kHz stereo input\n and let the encoder optimize the encoding."]
299    pub fn opus_encoder_create(
300        Fs: opus_int32,
301        channels: ::std::os::raw::c_int,
302        application: ::std::os::raw::c_int,
303        error: *mut ::std::os::raw::c_int,
304    ) -> *mut OpusEncoder;
305}
306unsafe extern "C" {
307    #[doc = " Initializes a previously allocated encoder state\n The memory pointed to by st must be at least the size returned by opus_encoder_get_size().\n This is intended for applications which use their own allocator instead of malloc.\n @see opus_encoder_create(),opus_encoder_get_size()\n To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.\n @param [in] st <tt>OpusEncoder*</tt>: Encoder state\n @param [in] Fs <tt>opus_int32</tt>: Sampling rate of input signal (Hz)\n                                      This must be one of 8000, 12000, 16000,\n                                      24000, or 48000.\n @param [in] channels <tt>int</tt>: Number of channels (1 or 2) in input signal\n @param [in] application <tt>int</tt>: Coding mode (one of OPUS_APPLICATION_VOIP, OPUS_APPLICATION_AUDIO, or OPUS_APPLICATION_RESTRICTED_LOWDELAY)\n @retval #OPUS_OK Success or @ref opus_errorcodes"]
308    pub fn opus_encoder_init(
309        st: *mut OpusEncoder,
310        Fs: opus_int32,
311        channels: ::std::os::raw::c_int,
312        application: ::std::os::raw::c_int,
313    ) -> ::std::os::raw::c_int;
314}
315unsafe extern "C" {
316    #[doc = " Encodes an Opus frame.\n @param [in] st <tt>OpusEncoder*</tt>: Encoder state\n @param [in] pcm <tt>opus_int16*</tt>: Input signal (interleaved if 2 channels). length is frame_size*channels*sizeof(opus_int16)\n @param [in] frame_size <tt>int</tt>: Number of samples per channel in the\n                                      input signal.\n                                      This must be an Opus frame size for\n                                      the encoder's sampling rate.\n                                      For example, at 48 kHz the permitted\n                                      values are 120, 240, 480, 960, 1920,\n                                      and 2880.\n                                      Passing in a duration of less than\n                                      10 ms (480 samples at 48 kHz) will\n                                      prevent the encoder from using the LPC\n                                      or hybrid modes.\n @param [out] data <tt>unsigned char*</tt>: Output payload.\n                                            This must contain storage for at\n                                            least \\a max_data_bytes.\n @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated\n                                                 memory for the output\n                                                 payload. This may be\n                                                 used to impose an upper limit on\n                                                 the instant bitrate, but should\n                                                 not be used as the only bitrate\n                                                 control. Use #OPUS_SET_BITRATE to\n                                                 control the bitrate.\n @returns The length of the encoded packet (in bytes) on success or a\n          negative error code (see @ref opus_errorcodes) on failure."]
317    pub fn opus_encode(
318        st: *mut OpusEncoder,
319        pcm: *const opus_int16,
320        frame_size: ::std::os::raw::c_int,
321        data: *mut ::std::os::raw::c_uchar,
322        max_data_bytes: opus_int32,
323    ) -> opus_int32;
324}
325unsafe extern "C" {
326    #[doc = " Encodes an Opus frame from floating point input.\n @param [in] st <tt>OpusEncoder*</tt>: Encoder state\n @param [in] pcm <tt>float*</tt>: Input in float format (interleaved if 2 channels), with a normal range of +/-1.0.\n          Samples with a range beyond +/-1.0 are supported but will\n          be clipped by decoders using the integer API and should\n          only be used if it is known that the far end supports\n          extended dynamic range.\n          length is frame_size*channels*sizeof(float)\n @param [in] frame_size <tt>int</tt>: Number of samples per channel in the\n                                      input signal.\n                                      This must be an Opus frame size for\n                                      the encoder's sampling rate.\n                                      For example, at 48 kHz the permitted\n                                      values are 120, 240, 480, 960, 1920,\n                                      and 2880.\n                                      Passing in a duration of less than\n                                      10 ms (480 samples at 48 kHz) will\n                                      prevent the encoder from using the LPC\n                                      or hybrid modes.\n @param [out] data <tt>unsigned char*</tt>: Output payload.\n                                            This must contain storage for at\n                                            least \\a max_data_bytes.\n @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated\n                                                 memory for the output\n                                                 payload. This may be\n                                                 used to impose an upper limit on\n                                                 the instant bitrate, but should\n                                                 not be used as the only bitrate\n                                                 control. Use #OPUS_SET_BITRATE to\n                                                 control the bitrate.\n @returns The length of the encoded packet (in bytes) on success or a\n          negative error code (see @ref opus_errorcodes) on failure."]
327    pub fn opus_encode_float(
328        st: *mut OpusEncoder,
329        pcm: *const f32,
330        frame_size: ::std::os::raw::c_int,
331        data: *mut ::std::os::raw::c_uchar,
332        max_data_bytes: opus_int32,
333    ) -> opus_int32;
334}
335unsafe extern "C" {
336    #[doc = " Frees an <code>OpusEncoder</code> allocated by opus_encoder_create().\n @param[in] st <tt>OpusEncoder*</tt>: State to be freed."]
337    pub fn opus_encoder_destroy(st: *mut OpusEncoder);
338}
339unsafe extern "C" {
340    #[doc = " Perform a CTL function on an Opus encoder.\n\n Generally the request and subsequent arguments are generated\n by a convenience macro.\n @param st <tt>OpusEncoder*</tt>: Encoder state.\n @param request This and all remaining parameters should be replaced by one\n                of the convenience macros in @ref opus_genericctls or\n                @ref opus_encoderctls.\n @see opus_genericctls\n @see opus_encoderctls"]
341    pub fn opus_encoder_ctl(
342        st: *mut OpusEncoder,
343        request: ::std::os::raw::c_int,
344        ...
345    ) -> ::std::os::raw::c_int;
346}
347#[repr(C)]
348#[derive(Debug, Copy, Clone)]
349pub struct OpusDecoder {
350    _unused: [u8; 0],
351}
352#[repr(C)]
353#[derive(Debug, Copy, Clone)]
354pub struct OpusDREDDecoder {
355    _unused: [u8; 0],
356}
357#[repr(C)]
358#[derive(Debug, Copy, Clone)]
359pub struct OpusDRED {
360    _unused: [u8; 0],
361}
362unsafe extern "C" {
363    #[doc = " Gets the size of an <code>OpusDecoder</code> structure.\n @param [in] channels <tt>int</tt>: Number of channels.\n                                    This must be 1 or 2.\n @returns The size in bytes."]
364    pub fn opus_decoder_get_size(channels: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
365}
366unsafe extern "C" {
367    #[doc = " Allocates and initializes a decoder state.\n @param [in] Fs <tt>opus_int32</tt>: Sample rate to decode at (Hz).\n                                     This must be one of 8000, 12000, 16000,\n                                     24000, or 48000.\n @param [in] channels <tt>int</tt>: Number of channels (1 or 2) to decode\n @param [out] error <tt>int*</tt>: #OPUS_OK Success or @ref opus_errorcodes\n\n Internally Opus stores data at 48000 Hz, so that should be the default\n value for Fs. However, the decoder can efficiently decode to buffers\n at 8, 12, 16, and 24 kHz so if for some reason the caller cannot use\n data at the full sample rate, or knows the compressed data doesn't\n use the full frequency range, it can request decoding at a reduced\n rate. Likewise, the decoder is capable of filling in either mono or\n interleaved stereo pcm buffers, at the caller's request."]
368    pub fn opus_decoder_create(
369        Fs: opus_int32,
370        channels: ::std::os::raw::c_int,
371        error: *mut ::std::os::raw::c_int,
372    ) -> *mut OpusDecoder;
373}
374unsafe extern "C" {
375    #[doc = " Initializes a previously allocated decoder state.\n The state must be at least the size returned by opus_decoder_get_size().\n This is intended for applications which use their own allocator instead of malloc. @see opus_decoder_create,opus_decoder_get_size\n To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.\n @param [in] st <tt>OpusDecoder*</tt>: Decoder state.\n @param [in] Fs <tt>opus_int32</tt>: Sampling rate to decode to (Hz).\n                                     This must be one of 8000, 12000, 16000,\n                                     24000, or 48000.\n @param [in] channels <tt>int</tt>: Number of channels (1 or 2) to decode\n @retval #OPUS_OK Success or @ref opus_errorcodes"]
376    pub fn opus_decoder_init(
377        st: *mut OpusDecoder,
378        Fs: opus_int32,
379        channels: ::std::os::raw::c_int,
380    ) -> ::std::os::raw::c_int;
381}
382unsafe extern "C" {
383    #[doc = " Decode an Opus packet.\n @param [in] st <tt>OpusDecoder*</tt>: Decoder state\n @param [in] data <tt>char*</tt>: Input payload. Use a NULL pointer to indicate packet loss\n @param [in] len <tt>opus_int32</tt>: Number of bytes in payload*\n @param [out] pcm <tt>opus_int16*</tt>: Output signal (interleaved if 2 channels). length\n  is frame_size*channels*sizeof(opus_int16)\n @param [in] frame_size Number of samples per channel of available space in \\a pcm.\n  If this is less than the maximum packet duration (120ms; 5760 for 48kHz), this function will\n  not be capable of decoding some packets. In the case of PLC (data==NULL) or FEC (decode_fec=1),\n  then frame_size needs to be exactly the duration of audio that is missing, otherwise the\n  decoder will not be in the optimal state to decode the next incoming packet. For the PLC and\n  FEC cases, frame_size <b>must</b> be a multiple of 2.5 ms.\n @param [in] decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band forward error correction data be\n  decoded. If no such data is available, the frame is decoded as if it were lost.\n @returns Number of decoded samples or @ref opus_errorcodes"]
384    pub fn opus_decode(
385        st: *mut OpusDecoder,
386        data: *const ::std::os::raw::c_uchar,
387        len: opus_int32,
388        pcm: *mut opus_int16,
389        frame_size: ::std::os::raw::c_int,
390        decode_fec: ::std::os::raw::c_int,
391    ) -> ::std::os::raw::c_int;
392}
393unsafe extern "C" {
394    #[doc = " Decode an Opus packet with floating point output.\n @param [in] st <tt>OpusDecoder*</tt>: Decoder state\n @param [in] data <tt>char*</tt>: Input payload. Use a NULL pointer to indicate packet loss\n @param [in] len <tt>opus_int32</tt>: Number of bytes in payload\n @param [out] pcm <tt>float*</tt>: Output signal (interleaved if 2 channels). length\n  is frame_size*channels*sizeof(float)\n @param [in] frame_size Number of samples per channel of available space in \\a pcm.\n  If this is less than the maximum packet duration (120ms; 5760 for 48kHz), this function will\n  not be capable of decoding some packets. In the case of PLC (data==NULL) or FEC (decode_fec=1),\n  then frame_size needs to be exactly the duration of audio that is missing, otherwise the\n  decoder will not be in the optimal state to decode the next incoming packet. For the PLC and\n  FEC cases, frame_size <b>must</b> be a multiple of 2.5 ms.\n @param [in] decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band forward error correction data be\n  decoded. If no such data is available the frame is decoded as if it were lost.\n @returns Number of decoded samples or @ref opus_errorcodes"]
395    pub fn opus_decode_float(
396        st: *mut OpusDecoder,
397        data: *const ::std::os::raw::c_uchar,
398        len: opus_int32,
399        pcm: *mut f32,
400        frame_size: ::std::os::raw::c_int,
401        decode_fec: ::std::os::raw::c_int,
402    ) -> ::std::os::raw::c_int;
403}
404unsafe extern "C" {
405    #[doc = " Perform a CTL function on an Opus decoder.\n\n Generally the request and subsequent arguments are generated\n by a convenience macro.\n @param st <tt>OpusDecoder*</tt>: Decoder state.\n @param request This and all remaining parameters should be replaced by one\n                of the convenience macros in @ref opus_genericctls or\n                @ref opus_decoderctls.\n @see opus_genericctls\n @see opus_decoderctls"]
406    pub fn opus_decoder_ctl(
407        st: *mut OpusDecoder,
408        request: ::std::os::raw::c_int,
409        ...
410    ) -> ::std::os::raw::c_int;
411}
412unsafe extern "C" {
413    #[doc = " Frees an <code>OpusDecoder</code> allocated by opus_decoder_create().\n @param[in] st <tt>OpusDecoder*</tt>: State to be freed."]
414    pub fn opus_decoder_destroy(st: *mut OpusDecoder);
415}
416unsafe extern "C" {
417    #[doc = " Gets the size of an <code>OpusDREDDecoder</code> structure.\n @returns The size in bytes."]
418    pub fn opus_dred_decoder_get_size() -> ::std::os::raw::c_int;
419}
420unsafe extern "C" {
421    #[doc = " Allocates and initializes an OpusDREDDecoder state.\n @param [out] error <tt>int*</tt>: #OPUS_OK Success or @ref opus_errorcodes"]
422    pub fn opus_dred_decoder_create(error: *mut ::std::os::raw::c_int) -> *mut OpusDREDDecoder;
423}
424unsafe extern "C" {
425    #[doc = " Initializes an <code>OpusDREDDecoder</code> state.\n @param[in] dec <tt>OpusDREDDecoder*</tt>: State to be initialized."]
426    pub fn opus_dred_decoder_init(dec: *mut OpusDREDDecoder) -> ::std::os::raw::c_int;
427}
428unsafe extern "C" {
429    #[doc = " Frees an <code>OpusDREDDecoder</code> allocated by opus_dred_decoder_create().\n @param[in] dec <tt>OpusDREDDecoder*</tt>: State to be freed."]
430    pub fn opus_dred_decoder_destroy(dec: *mut OpusDREDDecoder);
431}
432unsafe extern "C" {
433    #[doc = " Perform a CTL function on an Opus DRED decoder.\n\n Generally the request and subsequent arguments are generated\n by a convenience macro.\n @param dred_dec <tt>OpusDREDDecoder*</tt>: DRED Decoder state.\n @param request This and all remaining parameters should be replaced by one\n                of the convenience macros in @ref opus_genericctls or\n                @ref opus_decoderctls.\n @see opus_genericctls\n @see opus_decoderctls"]
434    pub fn opus_dred_decoder_ctl(
435        dred_dec: *mut OpusDREDDecoder,
436        request: ::std::os::raw::c_int,
437        ...
438    ) -> ::std::os::raw::c_int;
439}
440unsafe extern "C" {
441    #[doc = " Gets the size of an <code>OpusDRED</code> structure.\n @returns The size in bytes."]
442    pub fn opus_dred_get_size() -> ::std::os::raw::c_int;
443}
444unsafe extern "C" {
445    #[doc = " Allocates and initializes a DRED state.\n @param [out] error <tt>int*</tt>: #OPUS_OK Success or @ref opus_errorcodes"]
446    pub fn opus_dred_alloc(error: *mut ::std::os::raw::c_int) -> *mut OpusDRED;
447}
448unsafe extern "C" {
449    #[doc = " Frees an <code>OpusDRED</code> allocated by opus_dred_create().\n @param[in] dec <tt>OpusDRED*</tt>: State to be freed."]
450    pub fn opus_dred_free(dec: *mut OpusDRED);
451}
452unsafe extern "C" {
453    #[doc = " Decode an Opus DRED packet.\n @param [in] dred_dec <tt>OpusDRED*</tt>: DRED Decoder state\n @param [in] dred <tt>OpusDRED*</tt>: DRED state\n @param [in] data <tt>char*</tt>: Input payload\n @param [in] len <tt>opus_int32</tt>: Number of bytes in payload\n @param [in] max_dred_samples <tt>opus_int32</tt>: Maximum number of DRED samples that may be needed (if available in the packet).\n @param [in] sampling_rate <tt>opus_int32</tt>: Sampling rate used for max_dred_samples argument. Needs not match the actual sampling rate of the decoder.\n @param [out] dred_end <tt>opus_int32*</tt>: Number of non-encoded (silence) samples between the DRED timestamp and the last DRED sample.\n @param [in] defer_processing <tt>int</tt>: Flag (0 or 1). If set to one, the CPU-intensive part of the DRED decoding is deferred until opus_dred_process() is called.\n @returns Offset (positive) of the first decoded DRED samples, zero if no DRED is present, or @ref opus_errorcodes"]
454    pub fn opus_dred_parse(
455        dred_dec: *mut OpusDREDDecoder,
456        dred: *mut OpusDRED,
457        data: *const ::std::os::raw::c_uchar,
458        len: opus_int32,
459        max_dred_samples: opus_int32,
460        sampling_rate: opus_int32,
461        dred_end: *mut ::std::os::raw::c_int,
462        defer_processing: ::std::os::raw::c_int,
463    ) -> ::std::os::raw::c_int;
464}
465unsafe extern "C" {
466    #[doc = " Finish decoding an Opus DRED packet. The function only needs to be called if opus_dred_parse() was called with defer_processing=1.\n The source and destination will often be the same DRED state.\n @param [in] dred_dec <tt>OpusDRED*</tt>: DRED Decoder state\n @param [in] src <tt>OpusDRED*</tt>: Source DRED state to start the processing from.\n @param [out] dst <tt>OpusDRED*</tt>: Destination DRED state to store the updated state after processing.\n @returns @ref opus_errorcodes"]
467    pub fn opus_dred_process(
468        dred_dec: *mut OpusDREDDecoder,
469        src: *const OpusDRED,
470        dst: *mut OpusDRED,
471    ) -> ::std::os::raw::c_int;
472}
473unsafe extern "C" {
474    #[doc = " Decode audio from an Opus DRED packet with floating point output.\n @param [in] st <tt>OpusDecoder*</tt>: Decoder state\n @param [in] dred <tt>OpusDRED*</tt>: DRED state\n @param [in] dred_offset <tt>opus_int32</tt>: position of the redundancy to decode (in samples before the beginning of the real audio data in the packet).\n @param [out] pcm <tt>opus_int16*</tt>: Output signal (interleaved if 2 channels). length\n  is frame_size*channels*sizeof(opus_int16)\n @param [in] frame_size Number of samples per channel to decode in \\a pcm.\n  frame_size <b>must</b> be a multiple of 2.5 ms.\n @returns Number of decoded samples or @ref opus_errorcodes"]
475    pub fn opus_decoder_dred_decode(
476        st: *mut OpusDecoder,
477        dred: *const OpusDRED,
478        dred_offset: opus_int32,
479        pcm: *mut opus_int16,
480        frame_size: opus_int32,
481    ) -> ::std::os::raw::c_int;
482}
483unsafe extern "C" {
484    #[doc = " Decode audio from an Opus DRED packet with floating point output.\n @param [in] st <tt>OpusDecoder*</tt>: Decoder state\n @param [in] dred <tt>OpusDRED*</tt>: DRED state\n @param [in] dred_offset <tt>opus_int32</tt>: position of the redundancy to decode (in samples before the beginning of the real audio data in the packet).\n @param [out] pcm <tt>float*</tt>: Output signal (interleaved if 2 channels). length\n  is frame_size*channels*sizeof(float)\n @param [in] frame_size Number of samples per channel to decode in \\a pcm.\n  frame_size <b>must</b> be a multiple of 2.5 ms.\n @returns Number of decoded samples or @ref opus_errorcodes"]
485    pub fn opus_decoder_dred_decode_float(
486        st: *mut OpusDecoder,
487        dred: *const OpusDRED,
488        dred_offset: opus_int32,
489        pcm: *mut f32,
490        frame_size: opus_int32,
491    ) -> ::std::os::raw::c_int;
492}
493unsafe extern "C" {
494    #[doc = " Parse an opus packet into one or more frames.\n Opus_decode will perform this operation internally so most applications do\n not need to use this function.\n This function does not copy the frames, the returned pointers are pointers into\n the input packet.\n @param [in] data <tt>char*</tt>: Opus packet to be parsed\n @param [in] len <tt>opus_int32</tt>: size of data\n @param [out] out_toc <tt>char*</tt>: TOC pointer\n @param [out] frames <tt>char*[48]</tt> encapsulated frames\n @param [out] size <tt>opus_int16[48]</tt> sizes of the encapsulated frames\n @param [out] payload_offset <tt>int*</tt>: returns the position of the payload within the packet (in bytes)\n @returns number of frames"]
495    pub fn opus_packet_parse(
496        data: *const ::std::os::raw::c_uchar,
497        len: opus_int32,
498        out_toc: *mut ::std::os::raw::c_uchar,
499        frames: *mut *const ::std::os::raw::c_uchar,
500        size: *mut opus_int16,
501        payload_offset: *mut ::std::os::raw::c_int,
502    ) -> ::std::os::raw::c_int;
503}
504unsafe extern "C" {
505    #[doc = " Gets the bandwidth of an Opus packet.\n @param [in] data <tt>char*</tt>: Opus packet\n @retval OPUS_BANDWIDTH_NARROWBAND Narrowband (4kHz bandpass)\n @retval OPUS_BANDWIDTH_MEDIUMBAND Mediumband (6kHz bandpass)\n @retval OPUS_BANDWIDTH_WIDEBAND Wideband (8kHz bandpass)\n @retval OPUS_BANDWIDTH_SUPERWIDEBAND Superwideband (12kHz bandpass)\n @retval OPUS_BANDWIDTH_FULLBAND Fullband (20kHz bandpass)\n @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type"]
506    pub fn opus_packet_get_bandwidth(data: *const ::std::os::raw::c_uchar)
507    -> ::std::os::raw::c_int;
508}
509unsafe extern "C" {
510    #[doc = " Gets the number of samples per frame from an Opus packet.\n @param [in] data <tt>char*</tt>: Opus packet.\n                                  This must contain at least one byte of\n                                  data.\n @param [in] Fs <tt>opus_int32</tt>: Sampling rate in Hz.\n                                     This must be a multiple of 400, or\n                                     inaccurate results will be returned.\n @returns Number of samples per frame."]
511    pub fn opus_packet_get_samples_per_frame(
512        data: *const ::std::os::raw::c_uchar,
513        Fs: opus_int32,
514    ) -> ::std::os::raw::c_int;
515}
516unsafe extern "C" {
517    #[doc = " Gets the number of channels from an Opus packet.\n @param [in] data <tt>char*</tt>: Opus packet\n @returns Number of channels\n @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type"]
518    pub fn opus_packet_get_nb_channels(
519        data: *const ::std::os::raw::c_uchar,
520    ) -> ::std::os::raw::c_int;
521}
522unsafe extern "C" {
523    #[doc = " Gets the number of frames in an Opus packet.\n @param [in] packet <tt>char*</tt>: Opus packet\n @param [in] len <tt>opus_int32</tt>: Length of packet\n @returns Number of frames\n @retval OPUS_BAD_ARG Insufficient data was passed to the function\n @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type"]
524    pub fn opus_packet_get_nb_frames(
525        packet: *const ::std::os::raw::c_uchar,
526        len: opus_int32,
527    ) -> ::std::os::raw::c_int;
528}
529unsafe extern "C" {
530    #[doc = " Gets the number of samples of an Opus packet.\n @param [in] packet <tt>char*</tt>: Opus packet\n @param [in] len <tt>opus_int32</tt>: Length of packet\n @param [in] Fs <tt>opus_int32</tt>: Sampling rate in Hz.\n                                     This must be a multiple of 400, or\n                                     inaccurate results will be returned.\n @returns Number of samples\n @retval OPUS_BAD_ARG Insufficient data was passed to the function\n @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type"]
531    pub fn opus_packet_get_nb_samples(
532        packet: *const ::std::os::raw::c_uchar,
533        len: opus_int32,
534        Fs: opus_int32,
535    ) -> ::std::os::raw::c_int;
536}
537unsafe extern "C" {
538    #[doc = " Checks whether an Opus packet has LBRR.\n @param [in] packet <tt>char*</tt>: Opus packet\n @param [in] len <tt>opus_int32</tt>: Length of packet\n @returns 1 is LBRR is present, 0 otherwise\n @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type"]
539    pub fn opus_packet_has_lbrr(
540        packet: *const ::std::os::raw::c_uchar,
541        len: opus_int32,
542    ) -> ::std::os::raw::c_int;
543}
544unsafe extern "C" {
545    #[doc = " Gets the number of samples of an Opus packet.\n @param [in] dec <tt>OpusDecoder*</tt>: Decoder state\n @param [in] packet <tt>char*</tt>: Opus packet\n @param [in] len <tt>opus_int32</tt>: Length of packet\n @returns Number of samples\n @retval OPUS_BAD_ARG Insufficient data was passed to the function\n @retval OPUS_INVALID_PACKET The compressed data passed is corrupted or of an unsupported type"]
546    pub fn opus_decoder_get_nb_samples(
547        dec: *const OpusDecoder,
548        packet: *const ::std::os::raw::c_uchar,
549        len: opus_int32,
550    ) -> ::std::os::raw::c_int;
551}
552unsafe extern "C" {
553    #[doc = " Applies soft-clipping to bring a float signal within the [-1,1] range. If\n the signal is already in that range, nothing is done. If there are values\n outside of [-1,1], then the signal is clipped as smoothly as possible to\n both fit in the range and avoid creating excessive distortion in the\n process.\n @param [in,out] pcm <tt>float*</tt>: Input PCM and modified PCM\n @param [in] frame_size <tt>int</tt> Number of samples per channel to process\n @param [in] channels <tt>int</tt>: Number of channels\n @param [in,out] softclip_mem <tt>float*</tt>: State memory for the soft clipping process (one float per channel, initialized to zero)"]
554    pub fn opus_pcm_soft_clip(
555        pcm: *mut f32,
556        frame_size: ::std::os::raw::c_int,
557        channels: ::std::os::raw::c_int,
558        softclip_mem: *mut f32,
559    );
560}
561#[repr(C)]
562#[derive(Debug, Copy, Clone)]
563pub struct OpusRepacketizer {
564    _unused: [u8; 0],
565}
566unsafe extern "C" {
567    #[doc = " Gets the size of an <code>OpusRepacketizer</code> structure.\n @returns The size in bytes."]
568    pub fn opus_repacketizer_get_size() -> ::std::os::raw::c_int;
569}
570unsafe extern "C" {
571    #[doc = " (Re)initializes a previously allocated repacketizer state.\n The state must be at least the size returned by opus_repacketizer_get_size().\n This can be used for applications which use their own allocator instead of\n malloc().\n It must also be called to reset the queue of packets waiting to be\n repacketized, which is necessary if the maximum packet duration of 120 ms\n is reached or if you wish to submit packets with a different Opus\n configuration (coding mode, audio bandwidth, frame size, or channel count).\n Failure to do so will prevent a new packet from being added with\n opus_repacketizer_cat().\n @see opus_repacketizer_create\n @see opus_repacketizer_get_size\n @see opus_repacketizer_cat\n @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state to\n                                       (re)initialize.\n @returns A pointer to the same repacketizer state that was passed in."]
572    pub fn opus_repacketizer_init(rp: *mut OpusRepacketizer) -> *mut OpusRepacketizer;
573}
574unsafe extern "C" {
575    #[doc = " Allocates memory and initializes the new repacketizer with\n opus_repacketizer_init()."]
576    pub fn opus_repacketizer_create() -> *mut OpusRepacketizer;
577}
578unsafe extern "C" {
579    #[doc = " Frees an <code>OpusRepacketizer</code> allocated by\n opus_repacketizer_create().\n @param[in] rp <tt>OpusRepacketizer*</tt>: State to be freed."]
580    pub fn opus_repacketizer_destroy(rp: *mut OpusRepacketizer);
581}
582unsafe extern "C" {
583    #[doc = " Add a packet to the current repacketizer state.\n This packet must match the configuration of any packets already submitted\n for repacketization since the last call to opus_repacketizer_init().\n This means that it must have the same coding mode, audio bandwidth, frame\n size, and channel count.\n This can be checked in advance by examining the top 6 bits of the first\n byte of the packet, and ensuring they match the top 6 bits of the first\n byte of any previously submitted packet.\n The total duration of audio in the repacketizer state also must not exceed\n 120 ms, the maximum duration of a single packet, after adding this packet.\n\n The contents of the current repacketizer state can be extracted into new\n packets using opus_repacketizer_out() or opus_repacketizer_out_range().\n\n In order to add a packet with a different configuration or to add more\n audio beyond 120 ms, you must clear the repacketizer state by calling\n opus_repacketizer_init().\n If a packet is too large to add to the current repacketizer state, no part\n of it is added, even if it contains multiple frames, some of which might\n fit.\n If you wish to be able to add parts of such packets, you should first use\n another repacketizer to split the packet into pieces and add them\n individually.\n @see opus_repacketizer_out_range\n @see opus_repacketizer_out\n @see opus_repacketizer_init\n @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state to which to\n                                       add the packet.\n @param[in] data <tt>const unsigned char*</tt>: The packet data.\n                                                The application must ensure\n                                                this pointer remains valid\n                                                until the next call to\n                                                opus_repacketizer_init() or\n                                                opus_repacketizer_destroy().\n @param len <tt>opus_int32</tt>: The number of bytes in the packet data.\n @returns An error code indicating whether or not the operation succeeded.\n @retval #OPUS_OK The packet's contents have been added to the repacketizer\n                  state.\n @retval #OPUS_INVALID_PACKET The packet did not have a valid TOC sequence,\n                              the packet's TOC sequence was not compatible\n                              with previously submitted packets (because\n                              the coding mode, audio bandwidth, frame size,\n                              or channel count did not match), or adding\n                              this packet would increase the total amount of\n                              audio stored in the repacketizer state to more\n                              than 120 ms."]
584    pub fn opus_repacketizer_cat(
585        rp: *mut OpusRepacketizer,
586        data: *const ::std::os::raw::c_uchar,
587        len: opus_int32,
588    ) -> ::std::os::raw::c_int;
589}
590unsafe extern "C" {
591    #[doc = " Construct a new packet from data previously submitted to the repacketizer\n state via opus_repacketizer_cat().\n @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state from which to\n                                       construct the new packet.\n @param begin <tt>int</tt>: The index of the first frame in the current\n                            repacketizer state to include in the output.\n @param end <tt>int</tt>: One past the index of the last frame in the\n                          current repacketizer state to include in the\n                          output.\n @param[out] data <tt>const unsigned char*</tt>: The buffer in which to\n                                                 store the output packet.\n @param maxlen <tt>opus_int32</tt>: The maximum number of bytes to store in\n                                    the output buffer. In order to guarantee\n                                    success, this should be at least\n                                    <code>1276</code> for a single frame,\n                                    or for multiple frames,\n                                    <code>1277*(end-begin)</code>.\n                                    However, <code>1*(end-begin)</code> plus\n                                    the size of all packet data submitted to\n                                    the repacketizer since the last call to\n                                    opus_repacketizer_init() or\n                                    opus_repacketizer_create() is also\n                                    sufficient, and possibly much smaller.\n @returns The total size of the output packet on success, or an error code\n          on failure.\n @retval #OPUS_BAD_ARG <code>[begin,end)</code> was an invalid range of\n                       frames (begin < 0, begin >= end, or end >\n                       opus_repacketizer_get_nb_frames()).\n @retval #OPUS_BUFFER_TOO_SMALL \\a maxlen was insufficient to contain the\n                                complete output packet."]
592    pub fn opus_repacketizer_out_range(
593        rp: *mut OpusRepacketizer,
594        begin: ::std::os::raw::c_int,
595        end: ::std::os::raw::c_int,
596        data: *mut ::std::os::raw::c_uchar,
597        maxlen: opus_int32,
598    ) -> opus_int32;
599}
600unsafe extern "C" {
601    #[doc = " Return the total number of frames contained in packet data submitted to\n the repacketizer state so far via opus_repacketizer_cat() since the last\n call to opus_repacketizer_init() or opus_repacketizer_create().\n This defines the valid range of packets that can be extracted with\n opus_repacketizer_out_range() or opus_repacketizer_out().\n @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state containing the\n                                       frames.\n @returns The total number of frames contained in the packet data submitted\n          to the repacketizer state."]
602    pub fn opus_repacketizer_get_nb_frames(rp: *mut OpusRepacketizer) -> ::std::os::raw::c_int;
603}
604unsafe extern "C" {
605    #[doc = " Construct a new packet from data previously submitted to the repacketizer\n state via opus_repacketizer_cat().\n This is a convenience routine that returns all the data submitted so far\n in a single packet.\n It is equivalent to calling\n @code\n opus_repacketizer_out_range(rp, 0, opus_repacketizer_get_nb_frames(rp),\n                             data, maxlen)\n @endcode\n @param rp <tt>OpusRepacketizer*</tt>: The repacketizer state from which to\n                                       construct the new packet.\n @param[out] data <tt>const unsigned char*</tt>: The buffer in which to\n                                                 store the output packet.\n @param maxlen <tt>opus_int32</tt>: The maximum number of bytes to store in\n                                    the output buffer. In order to guarantee\n                                    success, this should be at least\n                                    <code>1277*opus_repacketizer_get_nb_frames(rp)</code>.\n                                    However,\n                                    <code>1*opus_repacketizer_get_nb_frames(rp)</code>\n                                    plus the size of all packet data\n                                    submitted to the repacketizer since the\n                                    last call to opus_repacketizer_init() or\n                                    opus_repacketizer_create() is also\n                                    sufficient, and possibly much smaller.\n @returns The total size of the output packet on success, or an error code\n          on failure.\n @retval #OPUS_BUFFER_TOO_SMALL \\a maxlen was insufficient to contain the\n                                complete output packet."]
606    pub fn opus_repacketizer_out(
607        rp: *mut OpusRepacketizer,
608        data: *mut ::std::os::raw::c_uchar,
609        maxlen: opus_int32,
610    ) -> opus_int32;
611}
612unsafe extern "C" {
613    #[doc = " Pads a given Opus packet to a larger size (possibly changing the TOC sequence).\n @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the\n                                                   packet to pad.\n @param len <tt>opus_int32</tt>: The size of the packet.\n                                 This must be at least 1.\n @param new_len <tt>opus_int32</tt>: The desired size of the packet after padding.\n                                 This must be at least as large as len.\n @returns an error code\n @retval #OPUS_OK \\a on success.\n @retval #OPUS_BAD_ARG \\a len was less than 1 or new_len was less than len.\n @retval #OPUS_INVALID_PACKET \\a data did not contain a valid Opus packet."]
614    pub fn opus_packet_pad(
615        data: *mut ::std::os::raw::c_uchar,
616        len: opus_int32,
617        new_len: opus_int32,
618    ) -> ::std::os::raw::c_int;
619}
620unsafe extern "C" {
621    #[doc = " Remove all padding from a given Opus packet and rewrite the TOC sequence to\n minimize space usage.\n @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the\n                                                   packet to strip.\n @param len <tt>opus_int32</tt>: The size of the packet.\n                                 This must be at least 1.\n @returns The new size of the output packet on success, or an error code\n          on failure.\n @retval #OPUS_BAD_ARG \\a len was less than 1.\n @retval #OPUS_INVALID_PACKET \\a data did not contain a valid Opus packet."]
622    pub fn opus_packet_unpad(data: *mut ::std::os::raw::c_uchar, len: opus_int32) -> opus_int32;
623}
624unsafe extern "C" {
625    #[doc = " Pads a given Opus multi-stream packet to a larger size (possibly changing the TOC sequence).\n @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the\n                                                   packet to pad.\n @param len <tt>opus_int32</tt>: The size of the packet.\n                                 This must be at least 1.\n @param new_len <tt>opus_int32</tt>: The desired size of the packet after padding.\n                                 This must be at least 1.\n @param nb_streams <tt>opus_int32</tt>: The number of streams (not channels) in the packet.\n                                 This must be at least as large as len.\n @returns an error code\n @retval #OPUS_OK \\a on success.\n @retval #OPUS_BAD_ARG \\a len was less than 1.\n @retval #OPUS_INVALID_PACKET \\a data did not contain a valid Opus packet."]
626    pub fn opus_multistream_packet_pad(
627        data: *mut ::std::os::raw::c_uchar,
628        len: opus_int32,
629        new_len: opus_int32,
630        nb_streams: ::std::os::raw::c_int,
631    ) -> ::std::os::raw::c_int;
632}
633unsafe extern "C" {
634    #[doc = " Remove all padding from a given Opus multi-stream packet and rewrite the TOC sequence to\n minimize space usage.\n @param[in,out] data <tt>const unsigned char*</tt>: The buffer containing the\n                                                   packet to strip.\n @param len <tt>opus_int32</tt>: The size of the packet.\n                                 This must be at least 1.\n @param nb_streams <tt>opus_int32</tt>: The number of streams (not channels) in the packet.\n                                 This must be at least 1.\n @returns The new size of the output packet on success, or an error code\n          on failure.\n @retval #OPUS_BAD_ARG \\a len was less than 1 or new_len was less than len.\n @retval #OPUS_INVALID_PACKET \\a data did not contain a valid Opus packet."]
635    pub fn opus_multistream_packet_unpad(
636        data: *mut ::std::os::raw::c_uchar,
637        len: opus_int32,
638        nb_streams: ::std::os::raw::c_int,
639    ) -> opus_int32;
640}
641#[repr(C)]
642#[derive(Debug, Copy, Clone)]
643pub struct OpusMSEncoder {
644    _unused: [u8; 0],
645}
646#[repr(C)]
647#[derive(Debug, Copy, Clone)]
648pub struct OpusMSDecoder {
649    _unused: [u8; 0],
650}
651unsafe extern "C" {
652    #[doc = " Gets the size of an OpusMSEncoder structure.\n @param streams <tt>int</tt>: The total number of streams to encode from the\n                              input.\n                              This must be no more than 255.\n @param coupled_streams <tt>int</tt>: Number of coupled (2 channel) streams\n                                      to encode.\n                                      This must be no larger than the total\n                                      number of streams.\n                                      Additionally, The total number of\n                                      encoded channels (<code>streams +\n                                      coupled_streams</code>) must be no\n                                      more than 255.\n @returns The size in bytes on success, or a negative error code\n          (see @ref opus_errorcodes) on error."]
653    pub fn opus_multistream_encoder_get_size(
654        streams: ::std::os::raw::c_int,
655        coupled_streams: ::std::os::raw::c_int,
656    ) -> opus_int32;
657}
658unsafe extern "C" {
659    pub fn opus_multistream_surround_encoder_get_size(
660        channels: ::std::os::raw::c_int,
661        mapping_family: ::std::os::raw::c_int,
662    ) -> opus_int32;
663}
664unsafe extern "C" {
665    #[doc = " Allocates and initializes a multistream encoder state.\n Call opus_multistream_encoder_destroy() to release\n this object when finished.\n @param Fs <tt>opus_int32</tt>: Sampling rate of the input signal (in Hz).\n                                This must be one of 8000, 12000, 16000,\n                                24000, or 48000.\n @param channels <tt>int</tt>: Number of channels in the input signal.\n                               This must be at most 255.\n                               It may be greater than the number of\n                               coded channels (<code>streams +\n                               coupled_streams</code>).\n @param streams <tt>int</tt>: The total number of streams to encode from the\n                              input.\n                              This must be no more than the number of channels.\n @param coupled_streams <tt>int</tt>: Number of coupled (2 channel) streams\n                                      to encode.\n                                      This must be no larger than the total\n                                      number of streams.\n                                      Additionally, The total number of\n                                      encoded channels (<code>streams +\n                                      coupled_streams</code>) must be no\n                                      more than the number of input channels.\n @param[in] mapping <code>const unsigned char[channels]</code>: Mapping from\n                    encoded channels to input channels, as described in\n                    @ref opus_multistream. As an extra constraint, the\n                    multistream encoder does not allow encoding coupled\n                    streams for which one channel is unused since this\n                    is never a good idea.\n @param application <tt>int</tt>: The target encoder application.\n                                  This must be one of the following:\n <dl>\n <dt>#OPUS_APPLICATION_VOIP</dt>\n <dd>Process signal for improved speech intelligibility.</dd>\n <dt>#OPUS_APPLICATION_AUDIO</dt>\n <dd>Favor faithfulness to the original input.</dd>\n <dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt>\n <dd>Configure the minimum possible coding delay by disabling certain modes\n of operation.</dd>\n </dl>\n @param[out] error <tt>int *</tt>: Returns #OPUS_OK on success, or an error\n                                   code (see @ref opus_errorcodes) on\n                                   failure."]
666    pub fn opus_multistream_encoder_create(
667        Fs: opus_int32,
668        channels: ::std::os::raw::c_int,
669        streams: ::std::os::raw::c_int,
670        coupled_streams: ::std::os::raw::c_int,
671        mapping: *const ::std::os::raw::c_uchar,
672        application: ::std::os::raw::c_int,
673        error: *mut ::std::os::raw::c_int,
674    ) -> *mut OpusMSEncoder;
675}
676unsafe extern "C" {
677    pub fn opus_multistream_surround_encoder_create(
678        Fs: opus_int32,
679        channels: ::std::os::raw::c_int,
680        mapping_family: ::std::os::raw::c_int,
681        streams: *mut ::std::os::raw::c_int,
682        coupled_streams: *mut ::std::os::raw::c_int,
683        mapping: *mut ::std::os::raw::c_uchar,
684        application: ::std::os::raw::c_int,
685        error: *mut ::std::os::raw::c_int,
686    ) -> *mut OpusMSEncoder;
687}
688unsafe extern "C" {
689    #[doc = " Initialize a previously allocated multistream encoder state.\n The memory pointed to by \\a st must be at least the size returned by\n opus_multistream_encoder_get_size().\n This is intended for applications which use their own allocator instead of\n malloc.\n To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.\n @see opus_multistream_encoder_create\n @see opus_multistream_encoder_get_size\n @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state to initialize.\n @param Fs <tt>opus_int32</tt>: Sampling rate of the input signal (in Hz).\n                                This must be one of 8000, 12000, 16000,\n                                24000, or 48000.\n @param channels <tt>int</tt>: Number of channels in the input signal.\n                               This must be at most 255.\n                               It may be greater than the number of\n                               coded channels (<code>streams +\n                               coupled_streams</code>).\n @param streams <tt>int</tt>: The total number of streams to encode from the\n                              input.\n                              This must be no more than the number of channels.\n @param coupled_streams <tt>int</tt>: Number of coupled (2 channel) streams\n                                      to encode.\n                                      This must be no larger than the total\n                                      number of streams.\n                                      Additionally, The total number of\n                                      encoded channels (<code>streams +\n                                      coupled_streams</code>) must be no\n                                      more than the number of input channels.\n @param[in] mapping <code>const unsigned char[channels]</code>: Mapping from\n                    encoded channels to input channels, as described in\n                    @ref opus_multistream. As an extra constraint, the\n                    multistream encoder does not allow encoding coupled\n                    streams for which one channel is unused since this\n                    is never a good idea.\n @param application <tt>int</tt>: The target encoder application.\n                                  This must be one of the following:\n <dl>\n <dt>#OPUS_APPLICATION_VOIP</dt>\n <dd>Process signal for improved speech intelligibility.</dd>\n <dt>#OPUS_APPLICATION_AUDIO</dt>\n <dd>Favor faithfulness to the original input.</dd>\n <dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt>\n <dd>Configure the minimum possible coding delay by disabling certain modes\n of operation.</dd>\n </dl>\n @returns #OPUS_OK on success, or an error code (see @ref opus_errorcodes)\n          on failure."]
690    pub fn opus_multistream_encoder_init(
691        st: *mut OpusMSEncoder,
692        Fs: opus_int32,
693        channels: ::std::os::raw::c_int,
694        streams: ::std::os::raw::c_int,
695        coupled_streams: ::std::os::raw::c_int,
696        mapping: *const ::std::os::raw::c_uchar,
697        application: ::std::os::raw::c_int,
698    ) -> ::std::os::raw::c_int;
699}
700unsafe extern "C" {
701    pub fn opus_multistream_surround_encoder_init(
702        st: *mut OpusMSEncoder,
703        Fs: opus_int32,
704        channels: ::std::os::raw::c_int,
705        mapping_family: ::std::os::raw::c_int,
706        streams: *mut ::std::os::raw::c_int,
707        coupled_streams: *mut ::std::os::raw::c_int,
708        mapping: *mut ::std::os::raw::c_uchar,
709        application: ::std::os::raw::c_int,
710    ) -> ::std::os::raw::c_int;
711}
712unsafe extern "C" {
713    #[doc = " Encodes a multistream Opus frame.\n @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state.\n @param[in] pcm <tt>const opus_int16*</tt>: The input signal as interleaved\n                                            samples.\n                                            This must contain\n                                            <code>frame_size*channels</code>\n                                            samples.\n @param frame_size <tt>int</tt>: Number of samples per channel in the input\n                                 signal.\n                                 This must be an Opus frame size for the\n                                 encoder's sampling rate.\n                                 For example, at 48 kHz the permitted values\n                                 are 120, 240, 480, 960, 1920, and 2880.\n                                 Passing in a duration of less than 10 ms\n                                 (480 samples at 48 kHz) will prevent the\n                                 encoder from using the LPC or hybrid modes.\n @param[out] data <tt>unsigned char*</tt>: Output payload.\n                                           This must contain storage for at\n                                           least \\a max_data_bytes.\n @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated\n                                                 memory for the output\n                                                 payload. This may be\n                                                 used to impose an upper limit on\n                                                 the instant bitrate, but should\n                                                 not be used as the only bitrate\n                                                 control. Use #OPUS_SET_BITRATE to\n                                                 control the bitrate.\n @returns The length of the encoded packet (in bytes) on success or a\n          negative error code (see @ref opus_errorcodes) on failure."]
714    pub fn opus_multistream_encode(
715        st: *mut OpusMSEncoder,
716        pcm: *const opus_int16,
717        frame_size: ::std::os::raw::c_int,
718        data: *mut ::std::os::raw::c_uchar,
719        max_data_bytes: opus_int32,
720    ) -> ::std::os::raw::c_int;
721}
722unsafe extern "C" {
723    #[doc = " Encodes a multistream Opus frame from floating point input.\n @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state.\n @param[in] pcm <tt>const float*</tt>: The input signal as interleaved\n                                       samples with a normal range of\n                                       +/-1.0.\n                                       Samples with a range beyond +/-1.0\n                                       are supported but will be clipped by\n                                       decoders using the integer API and\n                                       should only be used if it is known\n                                       that the far end supports extended\n                                       dynamic range.\n                                       This must contain\n                                       <code>frame_size*channels</code>\n                                       samples.\n @param frame_size <tt>int</tt>: Number of samples per channel in the input\n                                 signal.\n                                 This must be an Opus frame size for the\n                                 encoder's sampling rate.\n                                 For example, at 48 kHz the permitted values\n                                 are 120, 240, 480, 960, 1920, and 2880.\n                                 Passing in a duration of less than 10 ms\n                                 (480 samples at 48 kHz) will prevent the\n                                 encoder from using the LPC or hybrid modes.\n @param[out] data <tt>unsigned char*</tt>: Output payload.\n                                           This must contain storage for at\n                                           least \\a max_data_bytes.\n @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated\n                                                 memory for the output\n                                                 payload. This may be\n                                                 used to impose an upper limit on\n                                                 the instant bitrate, but should\n                                                 not be used as the only bitrate\n                                                 control. Use #OPUS_SET_BITRATE to\n                                                 control the bitrate.\n @returns The length of the encoded packet (in bytes) on success or a\n          negative error code (see @ref opus_errorcodes) on failure."]
724    pub fn opus_multistream_encode_float(
725        st: *mut OpusMSEncoder,
726        pcm: *const f32,
727        frame_size: ::std::os::raw::c_int,
728        data: *mut ::std::os::raw::c_uchar,
729        max_data_bytes: opus_int32,
730    ) -> ::std::os::raw::c_int;
731}
732unsafe extern "C" {
733    #[doc = " Frees an <code>OpusMSEncoder</code> allocated by\n opus_multistream_encoder_create().\n @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state to be freed."]
734    pub fn opus_multistream_encoder_destroy(st: *mut OpusMSEncoder);
735}
736unsafe extern "C" {
737    #[doc = " Perform a CTL function on a multistream Opus encoder.\n\n Generally the request and subsequent arguments are generated by a\n convenience macro.\n @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state.\n @param request This and all remaining parameters should be replaced by one\n                of the convenience macros in @ref opus_genericctls,\n                @ref opus_encoderctls, or @ref opus_multistream_ctls.\n @see opus_genericctls\n @see opus_encoderctls\n @see opus_multistream_ctls"]
738    pub fn opus_multistream_encoder_ctl(
739        st: *mut OpusMSEncoder,
740        request: ::std::os::raw::c_int,
741        ...
742    ) -> ::std::os::raw::c_int;
743}
744unsafe extern "C" {
745    #[doc = " Gets the size of an <code>OpusMSDecoder</code> structure.\n @param streams <tt>int</tt>: The total number of streams coded in the\n                              input.\n                              This must be no more than 255.\n @param coupled_streams <tt>int</tt>: Number streams to decode as coupled\n                                      (2 channel) streams.\n                                      This must be no larger than the total\n                                      number of streams.\n                                      Additionally, The total number of\n                                      coded channels (<code>streams +\n                                      coupled_streams</code>) must be no\n                                      more than 255.\n @returns The size in bytes on success, or a negative error code\n          (see @ref opus_errorcodes) on error."]
746    pub fn opus_multistream_decoder_get_size(
747        streams: ::std::os::raw::c_int,
748        coupled_streams: ::std::os::raw::c_int,
749    ) -> opus_int32;
750}
751unsafe extern "C" {
752    #[doc = " Allocates and initializes a multistream decoder state.\n Call opus_multistream_decoder_destroy() to release\n this object when finished.\n @param Fs <tt>opus_int32</tt>: Sampling rate to decode at (in Hz).\n                                This must be one of 8000, 12000, 16000,\n                                24000, or 48000.\n @param channels <tt>int</tt>: Number of channels to output.\n                               This must be at most 255.\n                               It may be different from the number of coded\n                               channels (<code>streams +\n                               coupled_streams</code>).\n @param streams <tt>int</tt>: The total number of streams coded in the\n                              input.\n                              This must be no more than 255.\n @param coupled_streams <tt>int</tt>: Number of streams to decode as coupled\n                                      (2 channel) streams.\n                                      This must be no larger than the total\n                                      number of streams.\n                                      Additionally, The total number of\n                                      coded channels (<code>streams +\n                                      coupled_streams</code>) must be no\n                                      more than 255.\n @param[in] mapping <code>const unsigned char[channels]</code>: Mapping from\n                    coded channels to output channels, as described in\n                    @ref opus_multistream.\n @param[out] error <tt>int *</tt>: Returns #OPUS_OK on success, or an error\n                                   code (see @ref opus_errorcodes) on\n                                   failure."]
753    pub fn opus_multistream_decoder_create(
754        Fs: opus_int32,
755        channels: ::std::os::raw::c_int,
756        streams: ::std::os::raw::c_int,
757        coupled_streams: ::std::os::raw::c_int,
758        mapping: *const ::std::os::raw::c_uchar,
759        error: *mut ::std::os::raw::c_int,
760    ) -> *mut OpusMSDecoder;
761}
762unsafe extern "C" {
763    #[doc = " Intialize a previously allocated decoder state object.\n The memory pointed to by \\a st must be at least the size returned by\n opus_multistream_encoder_get_size().\n This is intended for applications which use their own allocator instead of\n malloc.\n To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.\n @see opus_multistream_decoder_create\n @see opus_multistream_deocder_get_size\n @param st <tt>OpusMSEncoder*</tt>: Multistream encoder state to initialize.\n @param Fs <tt>opus_int32</tt>: Sampling rate to decode at (in Hz).\n                                This must be one of 8000, 12000, 16000,\n                                24000, or 48000.\n @param channels <tt>int</tt>: Number of channels to output.\n                               This must be at most 255.\n                               It may be different from the number of coded\n                               channels (<code>streams +\n                               coupled_streams</code>).\n @param streams <tt>int</tt>: The total number of streams coded in the\n                              input.\n                              This must be no more than 255.\n @param coupled_streams <tt>int</tt>: Number of streams to decode as coupled\n                                      (2 channel) streams.\n                                      This must be no larger than the total\n                                      number of streams.\n                                      Additionally, The total number of\n                                      coded channels (<code>streams +\n                                      coupled_streams</code>) must be no\n                                      more than 255.\n @param[in] mapping <code>const unsigned char[channels]</code>: Mapping from\n                    coded channels to output channels, as described in\n                    @ref opus_multistream.\n @returns #OPUS_OK on success, or an error code (see @ref opus_errorcodes)\n          on failure."]
764    pub fn opus_multistream_decoder_init(
765        st: *mut OpusMSDecoder,
766        Fs: opus_int32,
767        channels: ::std::os::raw::c_int,
768        streams: ::std::os::raw::c_int,
769        coupled_streams: ::std::os::raw::c_int,
770        mapping: *const ::std::os::raw::c_uchar,
771    ) -> ::std::os::raw::c_int;
772}
773unsafe extern "C" {
774    #[doc = " Decode a multistream Opus packet.\n @param st <tt>OpusMSDecoder*</tt>: Multistream decoder state.\n @param[in] data <tt>const unsigned char*</tt>: Input payload.\n                                                Use a <code>NULL</code>\n                                                pointer to indicate packet\n                                                loss.\n @param len <tt>opus_int32</tt>: Number of bytes in payload.\n @param[out] pcm <tt>opus_int16*</tt>: Output signal, with interleaved\n                                       samples.\n                                       This must contain room for\n                                       <code>frame_size*channels</code>\n                                       samples.\n @param frame_size <tt>int</tt>: The number of samples per channel of\n                                 available space in \\a pcm.\n                                 If this is less than the maximum packet duration\n                                 (120 ms; 5760 for 48kHz), this function will not be capable\n                                 of decoding some packets. In the case of PLC (data==NULL)\n                                 or FEC (decode_fec=1), then frame_size needs to be exactly\n                                 the duration of audio that is missing, otherwise the\n                                 decoder will not be in the optimal state to decode the\n                                 next incoming packet. For the PLC and FEC cases, frame_size\n                                 <b>must</b> be a multiple of 2.5 ms.\n @param decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band\n                                 forward error correction data be decoded.\n                                 If no such data is available, the frame is\n                                 decoded as if it were lost.\n @returns Number of samples decoded on success or a negative error code\n          (see @ref opus_errorcodes) on failure."]
775    pub fn opus_multistream_decode(
776        st: *mut OpusMSDecoder,
777        data: *const ::std::os::raw::c_uchar,
778        len: opus_int32,
779        pcm: *mut opus_int16,
780        frame_size: ::std::os::raw::c_int,
781        decode_fec: ::std::os::raw::c_int,
782    ) -> ::std::os::raw::c_int;
783}
784unsafe extern "C" {
785    #[doc = " Decode a multistream Opus packet with floating point output.\n @param st <tt>OpusMSDecoder*</tt>: Multistream decoder state.\n @param[in] data <tt>const unsigned char*</tt>: Input payload.\n                                                Use a <code>NULL</code>\n                                                pointer to indicate packet\n                                                loss.\n @param len <tt>opus_int32</tt>: Number of bytes in payload.\n @param[out] pcm <tt>opus_int16*</tt>: Output signal, with interleaved\n                                       samples.\n                                       This must contain room for\n                                       <code>frame_size*channels</code>\n                                       samples.\n @param frame_size <tt>int</tt>: The number of samples per channel of\n                                 available space in \\a pcm.\n                                 If this is less than the maximum packet duration\n                                 (120 ms; 5760 for 48kHz), this function will not be capable\n                                 of decoding some packets. In the case of PLC (data==NULL)\n                                 or FEC (decode_fec=1), then frame_size needs to be exactly\n                                 the duration of audio that is missing, otherwise the\n                                 decoder will not be in the optimal state to decode the\n                                 next incoming packet. For the PLC and FEC cases, frame_size\n                                 <b>must</b> be a multiple of 2.5 ms.\n @param decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band\n                                 forward error correction data be decoded.\n                                 If no such data is available, the frame is\n                                 decoded as if it were lost.\n @returns Number of samples decoded on success or a negative error code\n          (see @ref opus_errorcodes) on failure."]
786    pub fn opus_multistream_decode_float(
787        st: *mut OpusMSDecoder,
788        data: *const ::std::os::raw::c_uchar,
789        len: opus_int32,
790        pcm: *mut f32,
791        frame_size: ::std::os::raw::c_int,
792        decode_fec: ::std::os::raw::c_int,
793    ) -> ::std::os::raw::c_int;
794}
795unsafe extern "C" {
796    #[doc = " Perform a CTL function on a multistream Opus decoder.\n\n Generally the request and subsequent arguments are generated by a\n convenience macro.\n @param st <tt>OpusMSDecoder*</tt>: Multistream decoder state.\n @param request This and all remaining parameters should be replaced by one\n                of the convenience macros in @ref opus_genericctls,\n                @ref opus_decoderctls, or @ref opus_multistream_ctls.\n @see opus_genericctls\n @see opus_decoderctls\n @see opus_multistream_ctls"]
797    pub fn opus_multistream_decoder_ctl(
798        st: *mut OpusMSDecoder,
799        request: ::std::os::raw::c_int,
800        ...
801    ) -> ::std::os::raw::c_int;
802}
803unsafe extern "C" {
804    #[doc = " Frees an <code>OpusMSDecoder</code> allocated by\n opus_multistream_decoder_create().\n @param st <tt>OpusMSDecoder</tt>: Multistream decoder state to be freed."]
805    pub fn opus_multistream_decoder_destroy(st: *mut OpusMSDecoder);
806}
807#[repr(C)]
808#[derive(Debug, Copy, Clone)]
809pub struct OpusProjectionEncoder {
810    _unused: [u8; 0],
811}
812#[repr(C)]
813#[derive(Debug, Copy, Clone)]
814pub struct OpusProjectionDecoder {
815    _unused: [u8; 0],
816}
817unsafe extern "C" {
818    #[doc = " Gets the size of an OpusProjectionEncoder structure.\n @param channels <tt>int</tt>: The total number of input channels to encode.\n                               This must be no more than 255.\n @param mapping_family <tt>int</tt>: The mapping family to use for selecting\n                                     the appropriate projection.\n @returns The size in bytes on success, or a negative error code\n          (see @ref opus_errorcodes) on error."]
819    pub fn opus_projection_ambisonics_encoder_get_size(
820        channels: ::std::os::raw::c_int,
821        mapping_family: ::std::os::raw::c_int,
822    ) -> opus_int32;
823}
824unsafe extern "C" {
825    #[doc = " Allocates and initializes a projection encoder state.\n Call opus_projection_encoder_destroy() to release\n this object when finished.\n @param Fs <tt>opus_int32</tt>: Sampling rate of the input signal (in Hz).\n                                This must be one of 8000, 12000, 16000,\n                                24000, or 48000.\n @param channels <tt>int</tt>: Number of channels in the input signal.\n                               This must be at most 255.\n                               It may be greater than the number of\n                               coded channels (<code>streams +\n                               coupled_streams</code>).\n @param mapping_family <tt>int</tt>: The mapping family to use for selecting\n                                     the appropriate projection.\n @param[out] streams <tt>int *</tt>: The total number of streams that will\n                                     be encoded from the input.\n @param[out] coupled_streams <tt>int *</tt>: Number of coupled (2 channel)\n                                 streams that will be encoded from the input.\n @param application <tt>int</tt>: The target encoder application.\n                                  This must be one of the following:\n <dl>\n <dt>#OPUS_APPLICATION_VOIP</dt>\n <dd>Process signal for improved speech intelligibility.</dd>\n <dt>#OPUS_APPLICATION_AUDIO</dt>\n <dd>Favor faithfulness to the original input.</dd>\n <dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt>\n <dd>Configure the minimum possible coding delay by disabling certain modes\n of operation.</dd>\n </dl>\n @param[out] error <tt>int *</tt>: Returns #OPUS_OK on success, or an error\n                                   code (see @ref opus_errorcodes) on\n                                   failure."]
826    pub fn opus_projection_ambisonics_encoder_create(
827        Fs: opus_int32,
828        channels: ::std::os::raw::c_int,
829        mapping_family: ::std::os::raw::c_int,
830        streams: *mut ::std::os::raw::c_int,
831        coupled_streams: *mut ::std::os::raw::c_int,
832        application: ::std::os::raw::c_int,
833        error: *mut ::std::os::raw::c_int,
834    ) -> *mut OpusProjectionEncoder;
835}
836unsafe extern "C" {
837    #[doc = " Initialize a previously allocated projection encoder state.\n The memory pointed to by \\a st must be at least the size returned by\n opus_projection_ambisonics_encoder_get_size().\n This is intended for applications which use their own allocator instead of\n malloc.\n To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.\n @see opus_projection_ambisonics_encoder_create\n @see opus_projection_ambisonics_encoder_get_size\n @param st <tt>OpusProjectionEncoder*</tt>: Projection encoder state to initialize.\n @param Fs <tt>opus_int32</tt>: Sampling rate of the input signal (in Hz).\n                                This must be one of 8000, 12000, 16000,\n                                24000, or 48000.\n @param channels <tt>int</tt>: Number of channels in the input signal.\n                               This must be at most 255.\n                               It may be greater than the number of\n                               coded channels (<code>streams +\n                               coupled_streams</code>).\n @param streams <tt>int</tt>: The total number of streams to encode from the\n                              input.\n                              This must be no more than the number of channels.\n @param coupled_streams <tt>int</tt>: Number of coupled (2 channel) streams\n                                      to encode.\n                                      This must be no larger than the total\n                                      number of streams.\n                                      Additionally, The total number of\n                                      encoded channels (<code>streams +\n                                      coupled_streams</code>) must be no\n                                      more than the number of input channels.\n @param application <tt>int</tt>: The target encoder application.\n                                  This must be one of the following:\n <dl>\n <dt>#OPUS_APPLICATION_VOIP</dt>\n <dd>Process signal for improved speech intelligibility.</dd>\n <dt>#OPUS_APPLICATION_AUDIO</dt>\n <dd>Favor faithfulness to the original input.</dd>\n <dt>#OPUS_APPLICATION_RESTRICTED_LOWDELAY</dt>\n <dd>Configure the minimum possible coding delay by disabling certain modes\n of operation.</dd>\n </dl>\n @returns #OPUS_OK on success, or an error code (see @ref opus_errorcodes)\n          on failure."]
838    pub fn opus_projection_ambisonics_encoder_init(
839        st: *mut OpusProjectionEncoder,
840        Fs: opus_int32,
841        channels: ::std::os::raw::c_int,
842        mapping_family: ::std::os::raw::c_int,
843        streams: *mut ::std::os::raw::c_int,
844        coupled_streams: *mut ::std::os::raw::c_int,
845        application: ::std::os::raw::c_int,
846    ) -> ::std::os::raw::c_int;
847}
848unsafe extern "C" {
849    #[doc = " Encodes a projection Opus frame.\n @param st <tt>OpusProjectionEncoder*</tt>: Projection encoder state.\n @param[in] pcm <tt>const opus_int16*</tt>: The input signal as interleaved\n                                            samples.\n                                            This must contain\n                                            <code>frame_size*channels</code>\n                                            samples.\n @param frame_size <tt>int</tt>: Number of samples per channel in the input\n                                 signal.\n                                 This must be an Opus frame size for the\n                                 encoder's sampling rate.\n                                 For example, at 48 kHz the permitted values\n                                 are 120, 240, 480, 960, 1920, and 2880.\n                                 Passing in a duration of less than 10 ms\n                                 (480 samples at 48 kHz) will prevent the\n                                 encoder from using the LPC or hybrid modes.\n @param[out] data <tt>unsigned char*</tt>: Output payload.\n                                           This must contain storage for at\n                                           least \\a max_data_bytes.\n @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated\n                                                 memory for the output\n                                                 payload. This may be\n                                                 used to impose an upper limit on\n                                                 the instant bitrate, but should\n                                                 not be used as the only bitrate\n                                                 control. Use #OPUS_SET_BITRATE to\n                                                 control the bitrate.\n @returns The length of the encoded packet (in bytes) on success or a\n          negative error code (see @ref opus_errorcodes) on failure."]
850    pub fn opus_projection_encode(
851        st: *mut OpusProjectionEncoder,
852        pcm: *const opus_int16,
853        frame_size: ::std::os::raw::c_int,
854        data: *mut ::std::os::raw::c_uchar,
855        max_data_bytes: opus_int32,
856    ) -> ::std::os::raw::c_int;
857}
858unsafe extern "C" {
859    #[doc = " Encodes a projection Opus frame from floating point input.\n @param st <tt>OpusProjectionEncoder*</tt>: Projection encoder state.\n @param[in] pcm <tt>const float*</tt>: The input signal as interleaved\n                                       samples with a normal range of\n                                       +/-1.0.\n                                       Samples with a range beyond +/-1.0\n                                       are supported but will be clipped by\n                                       decoders using the integer API and\n                                       should only be used if it is known\n                                       that the far end supports extended\n                                       dynamic range.\n                                       This must contain\n                                       <code>frame_size*channels</code>\n                                       samples.\n @param frame_size <tt>int</tt>: Number of samples per channel in the input\n                                 signal.\n                                 This must be an Opus frame size for the\n                                 encoder's sampling rate.\n                                 For example, at 48 kHz the permitted values\n                                 are 120, 240, 480, 960, 1920, and 2880.\n                                 Passing in a duration of less than 10 ms\n                                 (480 samples at 48 kHz) will prevent the\n                                 encoder from using the LPC or hybrid modes.\n @param[out] data <tt>unsigned char*</tt>: Output payload.\n                                           This must contain storage for at\n                                           least \\a max_data_bytes.\n @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated\n                                                 memory for the output\n                                                 payload. This may be\n                                                 used to impose an upper limit on\n                                                 the instant bitrate, but should\n                                                 not be used as the only bitrate\n                                                 control. Use #OPUS_SET_BITRATE to\n                                                 control the bitrate.\n @returns The length of the encoded packet (in bytes) on success or a\n          negative error code (see @ref opus_errorcodes) on failure."]
860    pub fn opus_projection_encode_float(
861        st: *mut OpusProjectionEncoder,
862        pcm: *const f32,
863        frame_size: ::std::os::raw::c_int,
864        data: *mut ::std::os::raw::c_uchar,
865        max_data_bytes: opus_int32,
866    ) -> ::std::os::raw::c_int;
867}
868unsafe extern "C" {
869    #[doc = " Frees an <code>OpusProjectionEncoder</code> allocated by\n opus_projection_ambisonics_encoder_create().\n @param st <tt>OpusProjectionEncoder*</tt>: Projection encoder state to be freed."]
870    pub fn opus_projection_encoder_destroy(st: *mut OpusProjectionEncoder);
871}
872unsafe extern "C" {
873    #[doc = " Perform a CTL function on a projection Opus encoder.\n\n Generally the request and subsequent arguments are generated by a\n convenience macro.\n @param st <tt>OpusProjectionEncoder*</tt>: Projection encoder state.\n @param request This and all remaining parameters should be replaced by one\n                of the convenience macros in @ref opus_genericctls,\n                @ref opus_encoderctls, @ref opus_multistream_ctls, or\n                @ref opus_projection_ctls\n @see opus_genericctls\n @see opus_encoderctls\n @see opus_multistream_ctls\n @see opus_projection_ctls"]
874    pub fn opus_projection_encoder_ctl(
875        st: *mut OpusProjectionEncoder,
876        request: ::std::os::raw::c_int,
877        ...
878    ) -> ::std::os::raw::c_int;
879}
880unsafe extern "C" {
881    #[doc = " Gets the size of an <code>OpusProjectionDecoder</code> structure.\n @param channels <tt>int</tt>: The total number of output channels.\n                               This must be no more than 255.\n @param streams <tt>int</tt>: The total number of streams coded in the\n                              input.\n                              This must be no more than 255.\n @param coupled_streams <tt>int</tt>: Number streams to decode as coupled\n                                      (2 channel) streams.\n                                      This must be no larger than the total\n                                      number of streams.\n                                      Additionally, The total number of\n                                      coded channels (<code>streams +\n                                      coupled_streams</code>) must be no\n                                      more than 255.\n @returns The size in bytes on success, or a negative error code\n          (see @ref opus_errorcodes) on error."]
882    pub fn opus_projection_decoder_get_size(
883        channels: ::std::os::raw::c_int,
884        streams: ::std::os::raw::c_int,
885        coupled_streams: ::std::os::raw::c_int,
886    ) -> opus_int32;
887}
888unsafe extern "C" {
889    #[doc = " Allocates and initializes a projection decoder state.\n Call opus_projection_decoder_destroy() to release\n this object when finished.\n @param Fs <tt>opus_int32</tt>: Sampling rate to decode at (in Hz).\n                                This must be one of 8000, 12000, 16000,\n                                24000, or 48000.\n @param channels <tt>int</tt>: Number of channels to output.\n                               This must be at most 255.\n                               It may be different from the number of coded\n                               channels (<code>streams +\n                               coupled_streams</code>).\n @param streams <tt>int</tt>: The total number of streams coded in the\n                              input.\n                              This must be no more than 255.\n @param coupled_streams <tt>int</tt>: Number of streams to decode as coupled\n                                      (2 channel) streams.\n                                      This must be no larger than the total\n                                      number of streams.\n                                      Additionally, The total number of\n                                      coded channels (<code>streams +\n                                      coupled_streams</code>) must be no\n                                      more than 255.\n @param[in] demixing_matrix <tt>const unsigned char[demixing_matrix_size]</tt>: Demixing matrix\n                         that mapping from coded channels to output channels,\n                         as described in @ref opus_projection and\n                         @ref opus_projection_ctls.\n @param demixing_matrix_size <tt>opus_int32</tt>: The size in bytes of the\n                                                  demixing matrix, as\n                                                  described in @ref\n                                                  opus_projection_ctls.\n @param[out] error <tt>int *</tt>: Returns #OPUS_OK on success, or an error\n                                   code (see @ref opus_errorcodes) on\n                                   failure."]
890    pub fn opus_projection_decoder_create(
891        Fs: opus_int32,
892        channels: ::std::os::raw::c_int,
893        streams: ::std::os::raw::c_int,
894        coupled_streams: ::std::os::raw::c_int,
895        demixing_matrix: *mut ::std::os::raw::c_uchar,
896        demixing_matrix_size: opus_int32,
897        error: *mut ::std::os::raw::c_int,
898    ) -> *mut OpusProjectionDecoder;
899}
900unsafe extern "C" {
901    #[doc = " Intialize a previously allocated projection decoder state object.\n The memory pointed to by \\a st must be at least the size returned by\n opus_projection_decoder_get_size().\n This is intended for applications which use their own allocator instead of\n malloc.\n To reset a previously initialized state, use the #OPUS_RESET_STATE CTL.\n @see opus_projection_decoder_create\n @see opus_projection_deocder_get_size\n @param st <tt>OpusProjectionDecoder*</tt>: Projection encoder state to initialize.\n @param Fs <tt>opus_int32</tt>: Sampling rate to decode at (in Hz).\n                                This must be one of 8000, 12000, 16000,\n                                24000, or 48000.\n @param channels <tt>int</tt>: Number of channels to output.\n                               This must be at most 255.\n                               It may be different from the number of coded\n                               channels (<code>streams +\n                               coupled_streams</code>).\n @param streams <tt>int</tt>: The total number of streams coded in the\n                              input.\n                              This must be no more than 255.\n @param coupled_streams <tt>int</tt>: Number of streams to decode as coupled\n                                      (2 channel) streams.\n                                      This must be no larger than the total\n                                      number of streams.\n                                      Additionally, The total number of\n                                      coded channels (<code>streams +\n                                      coupled_streams</code>) must be no\n                                      more than 255.\n @param[in] demixing_matrix <tt>const unsigned char[demixing_matrix_size]</tt>: Demixing matrix\n                         that mapping from coded channels to output channels,\n                         as described in @ref opus_projection and\n                         @ref opus_projection_ctls.\n @param demixing_matrix_size <tt>opus_int32</tt>: The size in bytes of the\n                                                  demixing matrix, as\n                                                  described in @ref\n                                                  opus_projection_ctls.\n @returns #OPUS_OK on success, or an error code (see @ref opus_errorcodes)\n          on failure."]
902    pub fn opus_projection_decoder_init(
903        st: *mut OpusProjectionDecoder,
904        Fs: opus_int32,
905        channels: ::std::os::raw::c_int,
906        streams: ::std::os::raw::c_int,
907        coupled_streams: ::std::os::raw::c_int,
908        demixing_matrix: *mut ::std::os::raw::c_uchar,
909        demixing_matrix_size: opus_int32,
910    ) -> ::std::os::raw::c_int;
911}
912unsafe extern "C" {
913    #[doc = " Decode a projection Opus packet.\n @param st <tt>OpusProjectionDecoder*</tt>: Projection decoder state.\n @param[in] data <tt>const unsigned char*</tt>: Input payload.\n                                                Use a <code>NULL</code>\n                                                pointer to indicate packet\n                                                loss.\n @param len <tt>opus_int32</tt>: Number of bytes in payload.\n @param[out] pcm <tt>opus_int16*</tt>: Output signal, with interleaved\n                                       samples.\n                                       This must contain room for\n                                       <code>frame_size*channels</code>\n                                       samples.\n @param frame_size <tt>int</tt>: The number of samples per channel of\n                                 available space in \\a pcm.\n                                 If this is less than the maximum packet duration\n                                 (120 ms; 5760 for 48kHz), this function will not be capable\n                                 of decoding some packets. In the case of PLC (data==NULL)\n                                 or FEC (decode_fec=1), then frame_size needs to be exactly\n                                 the duration of audio that is missing, otherwise the\n                                 decoder will not be in the optimal state to decode the\n                                 next incoming packet. For the PLC and FEC cases, frame_size\n                                 <b>must</b> be a multiple of 2.5 ms.\n @param decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band\n                                 forward error correction data be decoded.\n                                 If no such data is available, the frame is\n                                 decoded as if it were lost.\n @returns Number of samples decoded on success or a negative error code\n          (see @ref opus_errorcodes) on failure."]
914    pub fn opus_projection_decode(
915        st: *mut OpusProjectionDecoder,
916        data: *const ::std::os::raw::c_uchar,
917        len: opus_int32,
918        pcm: *mut opus_int16,
919        frame_size: ::std::os::raw::c_int,
920        decode_fec: ::std::os::raw::c_int,
921    ) -> ::std::os::raw::c_int;
922}
923unsafe extern "C" {
924    #[doc = " Decode a projection Opus packet with floating point output.\n @param st <tt>OpusProjectionDecoder*</tt>: Projection decoder state.\n @param[in] data <tt>const unsigned char*</tt>: Input payload.\n                                                Use a <code>NULL</code>\n                                                pointer to indicate packet\n                                                loss.\n @param len <tt>opus_int32</tt>: Number of bytes in payload.\n @param[out] pcm <tt>opus_int16*</tt>: Output signal, with interleaved\n                                       samples.\n                                       This must contain room for\n                                       <code>frame_size*channels</code>\n                                       samples.\n @param frame_size <tt>int</tt>: The number of samples per channel of\n                                 available space in \\a pcm.\n                                 If this is less than the maximum packet duration\n                                 (120 ms; 5760 for 48kHz), this function will not be capable\n                                 of decoding some packets. In the case of PLC (data==NULL)\n                                 or FEC (decode_fec=1), then frame_size needs to be exactly\n                                 the duration of audio that is missing, otherwise the\n                                 decoder will not be in the optimal state to decode the\n                                 next incoming packet. For the PLC and FEC cases, frame_size\n                                 <b>must</b> be a multiple of 2.5 ms.\n @param decode_fec <tt>int</tt>: Flag (0 or 1) to request that any in-band\n                                 forward error correction data be decoded.\n                                 If no such data is available, the frame is\n                                 decoded as if it were lost.\n @returns Number of samples decoded on success or a negative error code\n          (see @ref opus_errorcodes) on failure."]
925    pub fn opus_projection_decode_float(
926        st: *mut OpusProjectionDecoder,
927        data: *const ::std::os::raw::c_uchar,
928        len: opus_int32,
929        pcm: *mut f32,
930        frame_size: ::std::os::raw::c_int,
931        decode_fec: ::std::os::raw::c_int,
932    ) -> ::std::os::raw::c_int;
933}
934unsafe extern "C" {
935    #[doc = " Perform a CTL function on a projection Opus decoder.\n\n Generally the request and subsequent arguments are generated by a\n convenience macro.\n @param st <tt>OpusProjectionDecoder*</tt>: Projection decoder state.\n @param request This and all remaining parameters should be replaced by one\n                of the convenience macros in @ref opus_genericctls,\n                @ref opus_decoderctls, @ref opus_multistream_ctls, or\n                @ref opus_projection_ctls.\n @see opus_genericctls\n @see opus_decoderctls\n @see opus_multistream_ctls\n @see opus_projection_ctls"]
936    pub fn opus_projection_decoder_ctl(
937        st: *mut OpusProjectionDecoder,
938        request: ::std::os::raw::c_int,
939        ...
940    ) -> ::std::os::raw::c_int;
941}
942unsafe extern "C" {
943    #[doc = " Frees an <code>OpusProjectionDecoder</code> allocated by\n opus_projection_decoder_create().\n @param st <tt>OpusProjectionDecoder</tt>: Projection decoder state to be freed."]
944    pub fn opus_projection_decoder_destroy(st: *mut OpusProjectionDecoder);
945}