MyNixOS website logo
Description

An FFI layer over TagLib's C bindings.

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.

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.

Metadata

Version

0.1.1.3

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows