`sig
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
type mpeg_layer = Layer_I | Layer_II | Layer_III
type emphasis = None | MS_50_15 | CCITT_J_17 | Reserved
type channel_mode = Single_channel | Dual_channel | Joint_stereo | Stereo
type frame_format = {
layer : Mad.mpeg_layer;
mode : Mad.channel_mode;
emphasis : Mad.emphasis;
bitrate : int;
samplerate : int;
channels : int;
samples_per_channel : int;
original : bool;
copyright : bool;
private_bit : bool;
}
val openfile : string -> Mad.mad_file
val openstream : (int -> string * int) -> Mad.mad_file
val skip_id3tags :
read:(int -> string * int) ->
seek:(int -> int) -> tell:(unit -> int) -> unit
val close : Mad.mad_file -> unit
val get_current_position : Mad.mad_file -> int
type time_unit =
Hours
| Minutes
| Seconds
| Deciseconds
| Centiseconds
| Milliseconds
val get_current_time : Mad.mad_file -> Mad.time_unit -> int
val decode_frame : Mad.mad_file -> string
val decode_frame_float : Mad.mad_file -> float array array
val skip_frame : Mad.mad_file -> unit
val get_frame_format : Mad.mad_file -> Mad.frame_format
val get_output_format : Mad.mad_file -> int * int * int
val duration : string -> float
end`