package mpg123

  1. Overview
  2. Docs
type error_code = int
type flags = int
val api_version : int
val ok : error_code
val done_ : error_code
val flag_id3 : flags
val flag_new_id3 : flags
val flag_icy : flags
val flag_new_icy : flags
type enc = int
val enc_signed16 : int
val enc_float32 : int
val init : unit -> (unit, error_code) Stdlib.result
val exit : unit -> unit
type handle
val new_ : ?decoder:string -> unit -> (handle, error_code) Stdlib.result
val delete : handle -> unit
val plain_strerror : error_code -> string
val strerror : handle -> string
val errcode : handle -> error_code
val decoders : unit -> string list
val supported_decoders : unit -> string list
val decoder : handle -> decoder_name:string -> (unit, error_code) Stdlib.result
val current_decoder : handle -> string
val open_ : handle -> path:string -> (unit, error_code) Stdlib.result
val close : handle -> (unit, error_code) Stdlib.result
type buf
val create_buf : int -> buf
val copy_buf_to_bytes : buf -> Stdlib.Bytes.t -> unit
val read : handle -> buf:buf -> len:int -> (int, error_code) Stdlib.result
val scan : handle -> (unit, error_code) Stdlib.result
val length : handle -> (int, error_code) Stdlib.result
val meta_check : handle -> flags
val meta_free : handle -> unit
type id3_v1 = {
  1. tag : string;
  2. title : string;
  3. artist : string;
  4. album : string;
  5. year : string;
  6. comment : string;
  7. genre : char;
}
type id3_v2_text = {
  1. lang : string;
  2. id : string;
  3. description : string;
  4. text : string;
}
type id3_v2_picture = {
  1. type_ : char;
  2. description : string;
  3. mime_type : string;
  4. size : int;
  5. data : string;
}
type id3_v2 = {
  1. version : char;
  2. title : string;
  3. artist : string;
  4. album : string;
  5. year : string;
  6. genre : string;
  7. comment : string;
  8. comment_list : id3_v2_text list;
  9. text : id3_v2_text list;
  10. extra : id3_v2_text list;
  11. picture : id3_v2_picture list;
}
type output_format = {
  1. rate : int;
  2. channels : int;
  3. encoding : int;
}
val getformat : handle -> (output_format, error_code) Stdlib.result
val format_none : handle -> (unit, error_code) Stdlib.result
val format_ : handle -> rate:int -> channels:int -> encodings:int -> (unit, error_code) Stdlib.result
val id3 : handle -> (id3_v1 option * id3_v2 option, error_code) Stdlib.result