module Mad:Functions for decoding mp3 files using the libmad.sig
..end
Author(s): Samuel Mimram
exception Mad_error of string
exception Read_error of string
exception End_of_stream
exception Openfile_error of string
exception Closefile_error of string
type
mad_file
val openfile : string -> mad_file
Raises Openfile_error
if an error occured while trying to open the file.
val openstream : (int -> string * int) -> mad_file
openstream read_func
opens a stream where read_func n
should be a
function which returns n
bytes of data or less, the second component of
the result being the number of bytes to read in the fist component.val close : mad_file -> unit
openfile
.
Raises Closefile_error
if an error occured while trying to close the file.
val get_current_position : mad_file -> int
openfile
.val decode_frame : mad_file -> string
val decode_frame_float : mad_file -> float array array
val get_output_format : mad_file -> int * int * int
decode_frame
or
decode_frame_float
.val duration : string -> float