speex

Bindings to libspeex
IN THIS PACKAGE
Module Speex . Encoder
type t

Opaque type for the speex encoder.

val init : mode -> int -> t

Initiate a new encoder.

val get : t -> control -> int

Get a parameter.

val set : t -> control -> int -> unit

Set a parameter.

val encode_page : t -> Ogg.Stream.stream -> ( unit -> float array ) -> Ogg.Page.t

encode_page encoder stream f: calls f to get audio data and encode it until a page is ready. * * Known issue: float expected values seem not to be in -1..1 but in * -32768..32767 which does not seem to be correct.

val encode_page_stereo : t -> Ogg.Stream.stream -> ( unit -> float array array ) -> Ogg.Page.t

Same as encode_page except that it encodes stereo data into mono.

val encode_page_int : t -> Ogg.Stream.stream -> ( unit -> int array ) -> Ogg.Page.t

Same as encode_page but using integers.

val encode_page_int_stereo : t -> Ogg.Stream.stream -> ( unit -> int array array ) -> Ogg.Page.t

Same as encode_page_stereo but using integers.

val eos : t -> Ogg.Stream.stream -> unit

Set the end of stream for this stream.