module Faad:sig
..end
Library for decoding AAC and AAC+ streams.
type
t
Internal state of a decoder.
exception Error of int
An error occured...
exception Failed
val error_message : int -> string
Get the error message corresponding to a raised Error
.
val min_bytes_per_channel : int
A decode call can eat up to min_bytes_per_channel
bytes per decoded channel,
so at least so much bytes per channel should be available in this stream.
val create : unit -> t
val init : t -> Stdlib.Bytes.t -> int -> int -> int * int * int
init dec buf ofs len
initializes a decoder given the len
bytes of data
in buf
starting at offset ofs
. It returns the offset (number of bytes to
skip), the samplerate and the number of channels of the stream. This function
should be used for AAC data.
val decode : t -> Stdlib.Bytes.t -> int -> int -> int * float array array
decode dec buf ofs len
decodes at most len
bytes of data in buf
starting at offset ofs
. It returns the number of bytes actually decoded
and the decoded data (non-interleaved).
val post_sync_reset : t -> unit
val find_frame : string -> int
Heuristic guess of the offset of the begining of a frame.
module Mp4:sig
..end