module Aacplus:sig..end
AAC+ encoding module for OCaml
Typical use of the encoding modules is:
(* Define the encoding parameters: *) let channels = (..) in let samplerate = (..) in (* Bitrate is in bps (e.g. 64000) *) let bitrate = (..) in (* Create an encoder *) let enc = Aacplus.create ~channels ~samplerate ~bitrate () in (* Get the frame size *) let samples = Aacplus.frame_size enc in (* Encode some data *) let data = (..some float array array value..) in let ret = Aacplus.encode enc data in (..do something with encoded data..) (..repeat encoding process..)
Remarks:
encode function about data
submited for encoding.type t
Type of an encoder
exception Invalid_data
Raised when submiting invalid data for encoding
exception Invalid_config
Raised when a requesting an invalid encoding configuration.
val create : channels:int -> samplerate:int -> bitrate:int -> unit -> tCreate an encoder
Raises Invalid_config if encoding parameters
cannot be used by the library.
val frame_size : t -> intReturn the number of samples required for each channel of data submited for encoding
val encode : t -> float array array -> stringEncode some audio data.
Raises Invalid_data if submited data
does not have the number of channels given
when initiating the encoder or does not have
the number of samples returned by frame_size
in each channel.