module Aacplus:AAC+ encoding module for OCamlsig
..end
(* 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
exception Invalid_data
exception Invalid_config
val create : channels:int -> samplerate:int -> bitrate:int -> unit -> t
Raises Invalid_config
if encoding parameters
cannot be used by the library.
val frame_size : t -> int
val encode : t -> float array array -> string
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.