sig
  type 'a dec
  type 'a t
  type write = float array array -> unit
  type read = int -> string * int
  type 'a callbacks
  type generic
  type info = {
    sample_rate : int;
    channels : int;
    bits_per_sample : int;
    total_samples : int64;
    md5sum : string;
  }
  type comments = string * (string * string) list
  type state =
      [ `Aborted
      | `End_of_stream
      | `Memory_allocation_error
      | `Ogg_error
      | `Read_frame
      | `Read_metadata
      | `Search_for_frame_sync
      | `Search_for_metadata
      | `Seek_error
      | `Uninitialized ]
  exception Lost_sync
  exception Bad_header
  exception Frame_crc_mismatch
  exception Unparseable_stream
  exception Not_flac
  val get_callbacks :
    ?seek:(int64 -> unit) ->
    ?tell:(unit -> int64) ->
    ?length:(unit -> int64) ->
    ?eof:(unit -> bool) ->
    Flac.Decoder.read ->
    Flac.Decoder.write -> Flac.Decoder.generic Flac.Decoder.callbacks
  val create : 'Flac.Decoder.callbacks -> 'Flac.Decoder.dec
  val init :
    'Flac.Decoder.dec ->
    'Flac.Decoder.callbacks ->
    'Flac.Decoder.t * Flac.Decoder.info * Flac.Decoder.comments option
  val process : 'Flac.Decoder.t -> 'Flac.Decoder.callbacks -> unit
  val seek :
    'Flac.Decoder.t -> 'Flac.Decoder.callbacks -> Stdlib.Int64.t -> bool
  val flush : 'Flac.Decoder.t -> 'Flac.Decoder.callbacks -> bool
  val reset : 'Flac.Decoder.t -> 'Flac.Decoder.callbacks -> bool
  val state :
    'Flac.Decoder.t -> 'Flac.Decoder.callbacks -> Flac.Decoder.state
  val to_s16le : float array array -> string
  module File :
    sig
      type file
      type handle = {
        fd : Unix.file_descr;
        dec : Flac.Decoder.File.file Flac.Decoder.t;
        callbacks : Flac.Decoder.File.file Flac.Decoder.callbacks;
        info : Flac.Decoder.info;
        comments : (string * (string * string) list) option;
      }
      val create_from_fd :
        Flac.Decoder.write -> Unix.file_descr -> Flac.Decoder.File.handle
      val create : Flac.Decoder.write -> string -> Flac.Decoder.File.handle
    end
end