/* automatically generated by rust-bindgen 0.71.1 */


#![no_std]
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]


pub const OPUS_OK: libc::c_int = 0;
pub const OPUS_BAD_ARG: libc::c_int = -1;
pub const OPUS_BUFFER_TOO_SMALL: libc::c_int = -2;
pub const OPUS_INTERNAL_ERROR: libc::c_int = -3;
pub const OPUS_INVALID_PACKET: libc::c_int = -4;
pub const OPUS_UNIMPLEMENTED: libc::c_int = -5;
pub const OPUS_INVALID_STATE: libc::c_int = -6;
pub const OPUS_ALLOC_FAIL: libc::c_int = -7;
pub const OPUS_SET_APPLICATION_REQUEST: libc::c_int = 4000;
pub const OPUS_GET_APPLICATION_REQUEST: libc::c_int = 4001;
pub const OPUS_SET_BITRATE_REQUEST: libc::c_int = 4002;
pub const OPUS_GET_BITRATE_REQUEST: libc::c_int = 4003;
pub const OPUS_SET_MAX_BANDWIDTH_REQUEST: libc::c_int = 4004;
pub const OPUS_GET_MAX_BANDWIDTH_REQUEST: libc::c_int = 4005;
pub const OPUS_SET_VBR_REQUEST: libc::c_int = 4006;
pub const OPUS_GET_VBR_REQUEST: libc::c_int = 4007;
pub const OPUS_SET_BANDWIDTH_REQUEST: libc::c_int = 4008;
pub const OPUS_GET_BANDWIDTH_REQUEST: libc::c_int = 4009;
pub const OPUS_SET_COMPLEXITY_REQUEST: libc::c_int = 4010;
pub const OPUS_GET_COMPLEXITY_REQUEST: libc::c_int = 4011;
pub const OPUS_SET_INBAND_FEC_REQUEST: libc::c_int = 4012;
pub const OPUS_GET_INBAND_FEC_REQUEST: libc::c_int = 4013;
pub const OPUS_SET_PACKET_LOSS_PERC_REQUEST: libc::c_int = 4014;
pub const OPUS_GET_PACKET_LOSS_PERC_REQUEST: libc::c_int = 4015;
pub const OPUS_SET_DTX_REQUEST: libc::c_int = 4016;
pub const OPUS_GET_DTX_REQUEST: libc::c_int = 4017;
pub const OPUS_SET_VBR_CONSTRAINT_REQUEST: libc::c_int = 4020;
pub const OPUS_GET_VBR_CONSTRAINT_REQUEST: libc::c_int = 4021;
pub const OPUS_SET_FORCE_CHANNELS_REQUEST: libc::c_int = 4022;
pub const OPUS_GET_FORCE_CHANNELS_REQUEST: libc::c_int = 4023;
pub const OPUS_SET_SIGNAL_REQUEST: libc::c_int = 4024;
pub const OPUS_GET_SIGNAL_REQUEST: libc::c_int = 4025;
pub const OPUS_GET_LOOKAHEAD_REQUEST: libc::c_int = 4027;
pub const OPUS_GET_SAMPLE_RATE_REQUEST: libc::c_int = 4029;
pub const OPUS_GET_FINAL_RANGE_REQUEST: libc::c_int = 4031;
pub const OPUS_GET_PITCH_REQUEST: libc::c_int = 4033;
pub const OPUS_SET_GAIN_REQUEST: libc::c_int = 4034;
pub const OPUS_GET_GAIN_REQUEST: libc::c_int = 4045;
pub const OPUS_SET_LSB_DEPTH_REQUEST: libc::c_int = 4036;
pub const OPUS_GET_LSB_DEPTH_REQUEST: libc::c_int = 4037;
pub const OPUS_GET_LAST_PACKET_DURATION_REQUEST: libc::c_int = 4039;
pub const OPUS_SET_EXPERT_FRAME_DURATION_REQUEST: libc::c_int = 4040;
pub const OPUS_GET_EXPERT_FRAME_DURATION_REQUEST: libc::c_int = 4041;
pub const OPUS_SET_PREDICTION_DISABLED_REQUEST: libc::c_int = 4042;
pub const OPUS_GET_PREDICTION_DISABLED_REQUEST: libc::c_int = 4043;
pub const OPUS_SET_PHASE_INVERSION_DISABLED_REQUEST: libc::c_int = 4046;
pub const OPUS_GET_PHASE_INVERSION_DISABLED_REQUEST: libc::c_int = 4047;
pub const OPUS_GET_IN_DTX_REQUEST: libc::c_int = 4049;
pub const OPUS_SET_DRED_DURATION_REQUEST: libc::c_int = 4050;
pub const OPUS_GET_DRED_DURATION_REQUEST: libc::c_int = 4051;
pub const OPUS_SET_DNN_BLOB_REQUEST: libc::c_int = 4052;
pub const OPUS_AUTO: libc::c_int = -1000;
pub const OPUS_BITRATE_MAX: libc::c_int = -1;
pub const OPUS_APPLICATION_VOIP: libc::c_int = 2048;
pub const OPUS_APPLICATION_AUDIO: libc::c_int = 2049;
pub const OPUS_APPLICATION_RESTRICTED_LOWDELAY: libc::c_int = 2051;
pub const OPUS_SIGNAL_VOICE: libc::c_int = 3001;
pub const OPUS_SIGNAL_MUSIC: libc::c_int = 3002;
pub const OPUS_BANDWIDTH_NARROWBAND: libc::c_int = 1101;
pub const OPUS_BANDWIDTH_MEDIUMBAND: libc::c_int = 1102;
pub const OPUS_BANDWIDTH_WIDEBAND: libc::c_int = 1103;
pub const OPUS_BANDWIDTH_SUPERWIDEBAND: libc::c_int = 1104;
pub const OPUS_BANDWIDTH_FULLBAND: libc::c_int = 1105;
pub const OPUS_FRAMESIZE_ARG: libc::c_int = 5000;
pub const OPUS_FRAMESIZE_2_5_MS: libc::c_int = 5001;
pub const OPUS_FRAMESIZE_5_MS: libc::c_int = 5002;
pub const OPUS_FRAMESIZE_10_MS: libc::c_int = 5003;
pub const OPUS_FRAMESIZE_20_MS: libc::c_int = 5004;
pub const OPUS_FRAMESIZE_40_MS: libc::c_int = 5005;
pub const OPUS_FRAMESIZE_60_MS: libc::c_int = 5006;
pub const OPUS_FRAMESIZE_80_MS: libc::c_int = 5007;
pub const OPUS_FRAMESIZE_100_MS: libc::c_int = 5008;
pub const OPUS_FRAMESIZE_120_MS: libc::c_int = 5009;
pub const OPUS_RESET_STATE: libc::c_int = 4028;
pub const OPUS_MULTISTREAM_GET_ENCODER_STATE_REQUEST: libc::c_int = 5120;
pub const OPUS_MULTISTREAM_GET_DECODER_STATE_REQUEST: libc::c_int = 5122;
pub type opus_int32 = libc::c_int;
pub type opus_uint32 = libc::c_uint;
pub type opus_int16 = libc::c_short;
pub type opus_uint16 = libc::c_ushort;
unsafe extern "C" {
    pub fn opus_strerror(error: libc::c_int) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn opus_get_version_string() -> *const libc::c_char;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OpusEncoder {
    _unused: [u8; 0],
}
unsafe extern "C" {
    pub fn opus_encoder_get_size(channels: libc::c_int) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_encoder_create(
        Fs: opus_int32,
        channels: libc::c_int,
        application: libc::c_int,
        error: *mut libc::c_int,
    ) -> *mut OpusEncoder;
}
unsafe extern "C" {
    pub fn opus_encoder_init(
        st: *mut OpusEncoder,
        Fs: opus_int32,
        channels: libc::c_int,
        application: libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_encode(
        st: *mut OpusEncoder,
        pcm: *const opus_int16,
        frame_size: libc::c_int,
        data: *mut libc::c_uchar,
        max_data_bytes: opus_int32,
    ) -> opus_int32;
}
unsafe extern "C" {
    pub fn opus_encode_float(
        st: *mut OpusEncoder,
        pcm: *const f32,
        frame_size: libc::c_int,
        data: *mut libc::c_uchar,
        max_data_bytes: opus_int32,
    ) -> opus_int32;
}
unsafe extern "C" {
    pub fn opus_encoder_destroy(st: *mut OpusEncoder);
}
unsafe extern "C" {
    pub fn opus_encoder_ctl(st: *mut OpusEncoder, request: libc::c_int, ...) -> libc::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OpusDecoder {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OpusDREDDecoder {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OpusDRED {
    _unused: [u8; 0],
}
unsafe extern "C" {
    pub fn opus_decoder_get_size(channels: libc::c_int) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_decoder_create(
        Fs: opus_int32,
        channels: libc::c_int,
        error: *mut libc::c_int,
    ) -> *mut OpusDecoder;
}
unsafe extern "C" {
    pub fn opus_decoder_init(
        st: *mut OpusDecoder,
        Fs: opus_int32,
        channels: libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_decode(
        st: *mut OpusDecoder,
        data: *const libc::c_uchar,
        len: opus_int32,
        pcm: *mut opus_int16,
        frame_size: libc::c_int,
        decode_fec: libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_decode_float(
        st: *mut OpusDecoder,
        data: *const libc::c_uchar,
        len: opus_int32,
        pcm: *mut f32,
        frame_size: libc::c_int,
        decode_fec: libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_decoder_ctl(st: *mut OpusDecoder, request: libc::c_int, ...) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_decoder_destroy(st: *mut OpusDecoder);
}
unsafe extern "C" {
    pub fn opus_dred_decoder_get_size() -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_dred_decoder_create(error: *mut libc::c_int) -> *mut OpusDREDDecoder;
}
unsafe extern "C" {
    pub fn opus_dred_decoder_init(dec: *mut OpusDREDDecoder) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_dred_decoder_destroy(dec: *mut OpusDREDDecoder);
}
unsafe extern "C" {
    pub fn opus_dred_decoder_ctl(
        dred_dec: *mut OpusDREDDecoder,
        request: libc::c_int,
        ...
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_dred_get_size() -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_dred_alloc(error: *mut libc::c_int) -> *mut OpusDRED;
}
unsafe extern "C" {
    pub fn opus_dred_free(dec: *mut OpusDRED);
}
unsafe extern "C" {
    pub fn opus_dred_parse(
        dred_dec: *mut OpusDREDDecoder,
        dred: *mut OpusDRED,
        data: *const libc::c_uchar,
        len: opus_int32,
        max_dred_samples: opus_int32,
        sampling_rate: opus_int32,
        dred_end: *mut libc::c_int,
        defer_processing: libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_dred_process(
        dred_dec: *mut OpusDREDDecoder,
        src: *const OpusDRED,
        dst: *mut OpusDRED,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_decoder_dred_decode(
        st: *mut OpusDecoder,
        dred: *const OpusDRED,
        dred_offset: opus_int32,
        pcm: *mut opus_int16,
        frame_size: opus_int32,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_decoder_dred_decode_float(
        st: *mut OpusDecoder,
        dred: *const OpusDRED,
        dred_offset: opus_int32,
        pcm: *mut f32,
        frame_size: opus_int32,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_packet_parse(
        data: *const libc::c_uchar,
        len: opus_int32,
        out_toc: *mut libc::c_uchar,
        frames: *mut *const libc::c_uchar,
        size: *mut opus_int16,
        payload_offset: *mut libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_packet_get_bandwidth(data: *const libc::c_uchar) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_packet_get_samples_per_frame(
        data: *const libc::c_uchar,
        Fs: opus_int32,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_packet_get_nb_channels(data: *const libc::c_uchar) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_packet_get_nb_frames(packet: *const libc::c_uchar, len: opus_int32) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_packet_get_nb_samples(
        packet: *const libc::c_uchar,
        len: opus_int32,
        Fs: opus_int32,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_packet_has_lbrr(packet: *const libc::c_uchar, len: opus_int32) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_decoder_get_nb_samples(
        dec: *const OpusDecoder,
        packet: *const libc::c_uchar,
        len: opus_int32,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_pcm_soft_clip(
        pcm: *mut f32,
        frame_size: libc::c_int,
        channels: libc::c_int,
        softclip_mem: *mut f32,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OpusRepacketizer {
    _unused: [u8; 0],
}
unsafe extern "C" {
    pub fn opus_repacketizer_get_size() -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_repacketizer_init(rp: *mut OpusRepacketizer) -> *mut OpusRepacketizer;
}
unsafe extern "C" {
    pub fn opus_repacketizer_create() -> *mut OpusRepacketizer;
}
unsafe extern "C" {
    pub fn opus_repacketizer_destroy(rp: *mut OpusRepacketizer);
}
unsafe extern "C" {
    pub fn opus_repacketizer_cat(
        rp: *mut OpusRepacketizer,
        data: *const libc::c_uchar,
        len: opus_int32,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_repacketizer_out_range(
        rp: *mut OpusRepacketizer,
        begin: libc::c_int,
        end: libc::c_int,
        data: *mut libc::c_uchar,
        maxlen: opus_int32,
    ) -> opus_int32;
}
unsafe extern "C" {
    pub fn opus_repacketizer_get_nb_frames(rp: *mut OpusRepacketizer) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_repacketizer_out(
        rp: *mut OpusRepacketizer,
        data: *mut libc::c_uchar,
        maxlen: opus_int32,
    ) -> opus_int32;
}
unsafe extern "C" {
    pub fn opus_packet_pad(
        data: *mut libc::c_uchar,
        len: opus_int32,
        new_len: opus_int32,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_packet_unpad(data: *mut libc::c_uchar, len: opus_int32) -> opus_int32;
}
unsafe extern "C" {
    pub fn opus_multistream_packet_pad(
        data: *mut libc::c_uchar,
        len: opus_int32,
        new_len: opus_int32,
        nb_streams: libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_multistream_packet_unpad(
        data: *mut libc::c_uchar,
        len: opus_int32,
        nb_streams: libc::c_int,
    ) -> opus_int32;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OpusMSEncoder {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OpusMSDecoder {
    _unused: [u8; 0],
}
unsafe extern "C" {
    pub fn opus_multistream_encoder_get_size(
        streams: libc::c_int,
        coupled_streams: libc::c_int,
    ) -> opus_int32;
}
unsafe extern "C" {
    pub fn opus_multistream_surround_encoder_get_size(
        channels: libc::c_int,
        mapping_family: libc::c_int,
    ) -> opus_int32;
}
unsafe extern "C" {
    pub fn opus_multistream_encoder_create(
        Fs: opus_int32,
        channels: libc::c_int,
        streams: libc::c_int,
        coupled_streams: libc::c_int,
        mapping: *const libc::c_uchar,
        application: libc::c_int,
        error: *mut libc::c_int,
    ) -> *mut OpusMSEncoder;
}
unsafe extern "C" {
    pub fn opus_multistream_surround_encoder_create(
        Fs: opus_int32,
        channels: libc::c_int,
        mapping_family: libc::c_int,
        streams: *mut libc::c_int,
        coupled_streams: *mut libc::c_int,
        mapping: *mut libc::c_uchar,
        application: libc::c_int,
        error: *mut libc::c_int,
    ) -> *mut OpusMSEncoder;
}
unsafe extern "C" {
    pub fn opus_multistream_encoder_init(
        st: *mut OpusMSEncoder,
        Fs: opus_int32,
        channels: libc::c_int,
        streams: libc::c_int,
        coupled_streams: libc::c_int,
        mapping: *const libc::c_uchar,
        application: libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_multistream_surround_encoder_init(
        st: *mut OpusMSEncoder,
        Fs: opus_int32,
        channels: libc::c_int,
        mapping_family: libc::c_int,
        streams: *mut libc::c_int,
        coupled_streams: *mut libc::c_int,
        mapping: *mut libc::c_uchar,
        application: libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_multistream_encode(
        st: *mut OpusMSEncoder,
        pcm: *const opus_int16,
        frame_size: libc::c_int,
        data: *mut libc::c_uchar,
        max_data_bytes: opus_int32,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_multistream_encode_float(
        st: *mut OpusMSEncoder,
        pcm: *const f32,
        frame_size: libc::c_int,
        data: *mut libc::c_uchar,
        max_data_bytes: opus_int32,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_multistream_encoder_destroy(st: *mut OpusMSEncoder);
}
unsafe extern "C" {
    pub fn opus_multistream_encoder_ctl(
        st: *mut OpusMSEncoder,
        request: libc::c_int,
        ...
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_multistream_decoder_get_size(
        streams: libc::c_int,
        coupled_streams: libc::c_int,
    ) -> opus_int32;
}
unsafe extern "C" {
    pub fn opus_multistream_decoder_create(
        Fs: opus_int32,
        channels: libc::c_int,
        streams: libc::c_int,
        coupled_streams: libc::c_int,
        mapping: *const libc::c_uchar,
        error: *mut libc::c_int,
    ) -> *mut OpusMSDecoder;
}
unsafe extern "C" {
    pub fn opus_multistream_decoder_init(
        st: *mut OpusMSDecoder,
        Fs: opus_int32,
        channels: libc::c_int,
        streams: libc::c_int,
        coupled_streams: libc::c_int,
        mapping: *const libc::c_uchar,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_multistream_decode(
        st: *mut OpusMSDecoder,
        data: *const libc::c_uchar,
        len: opus_int32,
        pcm: *mut opus_int16,
        frame_size: libc::c_int,
        decode_fec: libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_multistream_decode_float(
        st: *mut OpusMSDecoder,
        data: *const libc::c_uchar,
        len: opus_int32,
        pcm: *mut f32,
        frame_size: libc::c_int,
        decode_fec: libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_multistream_decoder_ctl(
        st: *mut OpusMSDecoder,
        request: libc::c_int,
        ...
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn opus_multistream_decoder_destroy(st: *mut OpusMSDecoder);
}
