taglib-api: An FFI layer over TagLib's C bindings

[ audio, bsd3, library ] [ Propose Tags ]

Provides functions for reading and writing metadata for a variety of common audio formats. Currently supports both ID3v1 and ID3v2 for MP3 files, Ogg Vorbis comments and ID3 tags and Vorbis comments in FLAC, MPC, Speex, WavPack TrueAudio, WAV, AIFF, MP4 and ASF files. It also handles management of taglib files and strings, automatically freeing allocations when computation is finished.


[Skip to Readme]

Flags

Automatic Flags
NameDescriptionDefault
usepkgconfig

Use pkg-config to check for library dependencies.

Enabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.1.0, 0.1.1.1, 0.1.1.2, 0.1.1.3
Dependencies base (>=4 && <5), bytestring (>=0.9 && <0.11), containers (>=0.5 && <0.6), mtl (>=2.1 && <2.2), text (>=0.11 && <0.12), transformers (>=0.2 && <0.4) [details]
License BSD-3-Clause
Copyright Copyright 2013 Kyle Carter
Author Kyle Carter
Maintainer kylcarte@gmail.com
Category Audio
Uploaded by KyleCarter at 2013-05-24T05:05:36Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 3725 total (16 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for taglib-api-0.1.1.2

[back to package description]

taglib-api

An FFI layer over TagLib's C bindings that provides functions for reading and writing metadata for a variety of common audio formats.

It also manages taglib files and strings, automatically freeing allocations when computation is finished.

TagLib currently supports:

  • ID3v1 and ID3v2 for MP3 files
  • Ogg Vorbis comments
  • ID3 tags and Vorbis comments in FLAC, MPC, Speex, WavPack TrueAudio, WAV, AIFF, MP4 and ASF files.

The library is split into two modules, Audio.TagLib, and Audio.TagLib.Internal.

Audio.TagLib provides a memory-managing interface. The function 'taglib' embeds a TagLib computation into the IO monad. Files may be opened with 'openFile', and their metadata read and written with the provided functions. When the block is finished, all open files are saved, and all memory allocated will be freed.

Audio.TagLib.Internal provides bindings for all functions necessary for manual management of TagLib memory. 'runTagLib' embeds a TagLib computation into the IO monad, but it takes an initial TagLibEnv and returns the final TagLibEnv along with the result of the computation.

Any changes made to audio files will not be saved unless 'cleanupFile' is called on their 'Ptr File'. Additionally, TagLib allocates space in order to return its string values, and these will remain allocated unless freed by the managed 'taglib' function, or by the manual 'freeTagLibStrings' function.