package speex

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

High level wrapper to easily decode speex files.

exception Not_speex
type t

Opaque type for the decoder.

type read = bytes -> int -> int -> int

Type for data read. Same signature as Unix.read.

val open_sync : Ogg.Sync.t -> t

Open the passed Ogg.Sync as a new speex stream.

val open_file : string -> t * Unix.file_descr

Open the passed file name as a new speex stream.

val open_feed : read -> t

Open the passed feed as a new speex stream.

val serial : t -> nativeint

Get the serial of the stream currently being decoded. * This value may change if the stream contains sequentialized ogg streams.

val comments : t -> (string * string) list

Get current comments.

val header : t -> Header.t

Get current header.

val decode : t -> float array list

Decode audio data.

val decode_stereo : t -> float array array list

Decode stereo audio data.

val decode_feed : t -> (float array -> unit) -> unit

Decode audio data, passing it to a feed.

val decode_feed_stereo : t -> (float array array -> unit) -> unit

Same as decode_feed but with stereo data.

val decode_int : t -> int array list

Same as decode but with integers.

val decode_int_stereo : t -> int array array list

Same as decode_stereo but with integers.

val decode_int_feed : t -> (int array -> unit) -> unit

Same as decode_feed but with integers.

val decode_int_feed_stereo : t -> (int array array -> unit) -> unit

Same as decode_int_feed_stereo but with integers.