Opus.Encoder

# Module Opus.Encoder

    module Encoder: sig .. end

    type application = [ `Audio | `Restricted_lowdelay | `Voip ]

    type signal = [ `Auto | `Music | `Voice ]

    type bitrate = [ `Auto | `Bitrate of int | `Bitrate_max ]

    type control = [ `Get_application of application
           | `Get_bandwidth of Opus.bandwidth Stdlib.ref
           | `Get_bitrate of bitrate Stdlib.ref
           | `Get_complexity of int Stdlib.ref
           | `Get_dtx of bool Stdlib.ref
           | `Get_final_range of int Stdlib.ref
           | `Get_force_channels of bool Stdlib.ref
           | `Get_inband_fec of bool Stdlib.ref
           | `Get_lookhead of int
           | `Get_lsb_depth of int Stdlib.ref
           | `Get_max_bandwidth of Opus.max_bandwidth
           | `Get_packet_loss_perc of int Stdlib.ref
           | `Get_pitch of int Stdlib.ref
           | `Get_samplerate of int
           | `Get_signal of signal Stdlib.ref
           | `Get_vbr of bool Stdlib.ref
           | `Get_vbr_constraint of bool Stdlib.ref
           | `Reset_state
           | `Set_application of application
           | `Set_bandwidth of Opus.bandwidth
           | `Set_bitrate of bitrate
           | `Set_complexity of int
           | `Set_dtx of bool
           | `Set_force_channels of bool
           | `Set_inband_fec of bool
           | `Set_lsb_depth of int
           | `Set_max_bandwidth of Opus.max_bandwidth
           | `Set_packet_loss_perc of int
           | `Set_phase_inversion_disabled of bool
           | `Set_signal of signal
           | `Set_vbr of bool
           | `Set_vbr_constraint of bool ]

    type t

    val create : ?pre_skip:int ->
           ?comments:(string * string) list ->
           ?gain:int ->
           samplerate:int ->
           channels:int ->
           application:application -> Ogg.Stream.stream -> t

    val header : t -> Ogg.Stream.packet

    val comments : t -> Ogg.Stream.packet

    val apply_control : control -> t -> unit

    val encode_float : ?frame_size:float -> t -> float array array -> int -> int -> int

    val eos : t -> unit