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
  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_output_format : Mad.mad_file -> int * int * int
  val duration : string -> float
end