0

I'm looking for mature and robust open source C library for audio file conversion. It should be C because I really program in Haskell and it's easier to write bindings for C (unless decent bindings already exist, of course).

It is desirable that the library could work with:

  • AIFF
  • FLAC
  • MP3
  • WAV

2 Answers 2

2

I would suggest using the FFMPEG libraries, specifically libavcodec:

  • Can decode and encode most common audio & video codecs as well as several obscure ones - including those you mention above.
  • Open Source & Gratis
  • Cross Platform
  • Written in C/C99
  • Mature & Robust - definitely.
  • There are already some Haskell bindings here and several other places.
2
  • Thank you for the excellent answer. I'll look at libavcodec's API. Those bindings kinda thin (most functions directly translate to C), maybe I'll have to write higher-level and more audio-centered ones... Anyway, thanks!
    – Mark
    Nov 2, 2015 at 17:46
  • If you're looking for a high-level method to decode audio files, take a look at this Feb 13, 2017 at 11:14
0

https://en.wikipedia.org/wiki/SoX

Sound eXchange, abbreviated SoX, is a free cross-platform digital audio editor, licensed under the GNU General Public License (libsox is licensed under the GNU Lesser General Public License), and distributed by Chris Bagwell through SourceForge.net. SoX is written in standard C, and has a command-line interface.

I use it on the command line.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.