Module Taglib


module Taglib: sig .. end
Ocaml bindings to taglib


This library provides a set/get interface for several audio file format's tags informations.

Usage is quite simple. All functions using a file type variable, except close_file, may raise Closed if given file was closed.

Types


type file 

type file_type =
| Mpeg
| OggVorbis
| Flac
| Mpc
exception Closed
Raised when using a file that has been closed

Functions



Settings


val set_strings_unicode : bool -> unit
All strings supplied to the library are supposed to be UTF-8. Set this to true to use strings in latin1 (ISO-8859-1) format

File interface


val open_file : ?file_type:file_type -> string -> file
Open a file.

Raises Not_found if file does not exist or could not be opened.

val close_file : file -> unit
val file_save : file -> bool

Get tag interface


val tag_title : file -> string
val tag_artist : file -> string
val tag_album : file -> string
val tag_comment : file -> string
val tag_genre : file -> string
val tag_year : file -> int
val tag_track : file -> int

Set tag interface


val tag_set_title : file -> string -> unit
val tag_set_artist : file -> string -> unit
val tag_set_album : file -> string -> unit
val tag_set_comment : file -> string -> unit
val tag_set_genre : file -> string -> unit
val tag_set_year : file -> int -> unit
val tag_set_track : file -> int -> unit

Get audio properties interface


val audioproperties_length : file -> int
val audioproperties_bitrate : file -> int
val audioproperties_samplerate : file -> int
val audioproperties_channels : file -> int