flac: Complete high-level binding to libFLAC

[ audio, bsd3, codec, library ] [ Propose Tags ]

Complete high-level binding to libFLAC.


[Skip to Readme]

Modules

[Last Documentation]

  • Codec
    • Audio
      • FLAC
        • Codec.Audio.FLAC.Metadata
          • Codec.Audio.FLAC.Metadata.CueSheet
        • Codec.Audio.FLAC.StreamDecoder
        • Codec.Audio.FLAC.StreamEncoder
          • Codec.Audio.FLAC.StreamEncoder.Apodization

Flags

Manual Flags

NameDescriptionDefault
dev

Turn on development settings.

Disabled

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

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0, 0.1.1, 0.1.2, 0.2.0, 0.2.1
Change log CHANGELOG.md
Dependencies base (>=4.15 && <5), bytestring (>=0.2 && <0.13), containers (>=0.5 && <0.8), directory (>=1.2.2 && <1.4), exceptions (>=0.6 && <0.11), filepath (>=1.2 && <1.5), mtl (>=2 && <3), text (>=0.2 && <2.2), vector (>=0.10 && <0.14), wave (>=0.1.2 && <0.3) [details]
License BSD-3-Clause
Author Mark Karpov <markkarpov92@gmail.com>
Maintainer Mark Karpov <markkarpov92@gmail.com>
Revised Revision 2 made by mrkkrp at 2024-06-15T17:03:27Z
Category Codec, Audio
Home page https://github.com/mrkkrp/flac
Bug tracker https://github.com/mrkkrp/flac/issues
Source repo head: git clone https://github.com/mrkkrp/flac.git
Uploaded by mrkkrp at 2023-10-24T11:41:40Z
Distributions LTSHaskell:0.2.1, NixOS:0.2.1, Stackage:0.2.1
Reverse Dependencies 1 direct, 1 indirect [details]
Downloads 3484 total (16 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2023-10-24 [all 2 reports]

Readme for flac-0.2.1

[back to package description]

FLAC for Haskell

License BSD3 Hackage Stackage Nightly Stackage LTS CI

This is a complete high-level Haskell binding to libFLAC—reference FLAC implementation.

As the maintainer of the C FLAC code base, I must say I'm impressed. Quite honestly, I think the C API is horrible.

Erik de Castro Lopo

Aims of the project

These are the goals of the project:

  • Be a complete interface for FLAC file manipulation in Haskell.
  • Be as efficient as the underlying C implementation.
  • Provide a safe API using type system to kindly guard against bad things, but not too much so as to remain beginner-friendly and simple.

Motivation

FLAC is awesome and Haskell is awesome, surely there should be a safe Haskell API to the fast libFLAC library!

Seriously though, we have htaglib to work with audio metadata, but it does not support FLAC-specific thing I would like to manipulate. We have hsndfile, but I don't really want to read FLAC data into a buffer or Haskell Vector. How simple is it (if possible) to decode a FLAC file using that library? How simple is it to figure out where to begin with such a task? With flac it is one line of code.

Provided functionality

flac can work with:

  • Metadata—full support for reading/writing/deleting of all audio parameters, application data, seek tables, vorbis comments of all sorts, CUE sheets, and even pictures.

  • Stream decoder—simple interface for decoding to WAVE and RF64.

  • Stream encoder—a lot of options to tweak, everything that libFLAC supports.

Limitations

Right now there are three main limitations:

  • No Ogg FLAC support, and I do not plan to add it; I'll accept a PR adding support for Ogg FLAC.

  • It's not possible to use custom callbacks for printing decoding/encoding progress in real-time.

  • Only works on little-endian architectures so far; I'll accept a PR lifting this limitation.

Quick start

The best way to start using flac is to take a look at the Haddocks. Encoding and decoding should be simple to understand, for metadata there are examples in the docs. Feel free to ask me a question if you get stuck with something.

The following packages are designed to be used with flac:

Contribution

Please direct all issues, bugs, and questions to the GitHub issue tracker for this project.

Pull requests are also welcome.

License

Copyright © 2016–present Mark Karpov

Distributed under BSD 3 clause license.