Module Opus.Encoder

type application = [
| `Voip
| `Audio
| `Restricted_lowdelay
]
type signal = [
| `Auto
| `Voice
| `Music
]
type bitrate = [
| `Auto
| `Bitrate_max
| `Bitrate of int
]
type control = [
| generic_control
| `Set_complexity of int
| `Get_complexity of int Stdlib.ref
| `Set_bitrate of bitrate
| `Get_bitrate of bitrate Stdlib.ref
| `Set_vbr of bool
| `Get_vbr of bool Stdlib.ref
| `Set_vbr_constraint of bool
| `Get_vbr_constraint of bool Stdlib.ref
| `Set_force_channels of bool
| `Get_force_channels of bool Stdlib.ref
| `Set_max_bandwidth of max_bandwidth
| `Get_max_bandwidth of max_bandwidth
| `Set_bandwidth of bandwidth
| `Set_signal of signal
| `Get_signal of signal Stdlib.ref
| `Set_application of application
| `Get_application of application
| `Get_samplerate of int
| `Get_lookhead of int
| `Set_inband_fec of bool
| `Get_inband_fec of bool Stdlib.ref
| `Set_packet_loss_perc of int
| `Get_packet_loss_perc of int Stdlib.ref
| `Set_dtx of bool
| `Get_dtx of bool Stdlib.ref
]
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 encode_float_ba : ?frame_size:float -> t -> ( float, Stdlib.Bigarray.float32_elt, Stdlib.Bigarray.c_layout ) Stdlib.Bigarray.Array1.t array -> int -> int -> int
val eos : t -> unit