Vorbis.Encoderval create : int -> int -> int -> int -> int -> tcreate chans rate max_br nom_br min_br creates a new encoder with * chans channels, with sample rate rate Hz and with respectively max_br, * nom_br and min_br as maximal, nominal and minimal bitrates (in bps).
val create_vbr : int -> int -> float -> tcreate_vbr chans rate quality creates a new encoder in variable bitrate * with chans channels, with sample rate rate Hz and with quality * quality, which should be between -1 and 1 (1 is the best).
val reset : t -> unitval headerout :
?encoder:string ->
t ->
Ogg.Stream.stream ->
(string * string) list ->
unitEncode a header given a list of tags.
val headerout_packetout :
?encoder:string ->
t ->
(string * string) list ->
Ogg.Stream.packet * Ogg.Stream.packet * Ogg.Stream.packetEncoder a header, but do not submit packet to * Ogg Stream. Usefull when multiplexing ogg streams * since the all first packets of each streams must be packed * in the initial pages.
val get_channels : t -> intGet the number of audio channels expected by * the encoder.
val encode_buffer_float :
t ->
Ogg.Stream.stream ->
float array array ->
int ->
int ->
unitEncode a buffer of PCM data. * The PCM data array must have at least the expected * number of channels. Otherwise, the function raises Invalid_channels.
val encode_buffer_float_ba :
t ->
Ogg.Stream.stream ->
(float, Stdlib.Bigarray.float32_elt, Stdlib.Bigarray.c_layout)
Stdlib.Bigarray.Array1.t
array ->
int ->
int ->
unitval time_of_granulepos : t -> Stdlib.Int64.t -> Stdlib.Nativeint.tConvert a granulepos to absolute time in seconds. The granulepos is * interpreted in the context of a given encoder, and gives * the end time of a frame's presentation as used in Ogg mux ordering.
val end_of_stream : t -> Ogg.Stream.stream -> unit