Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cross Platform (C/C++) Audio Library for MP3, AAC, WAV

Tags:

c++

c

audio

I'm trying to find a cross platform audio library that will have the following abilities (in order of importance):

  • Full Windows, Mac, Linux support
  • C / C++ APIs
  • Free/cheap but commercially viable
  • MP3 Support
  • AAC Support
  • WMA Support
  • FLAC Support
  • OGG Support
  • ARM Linux support would be nice
  • Open Source

I've found several things like OpenAL, libao, Bass, etc. but they all seem to all either have a limitation of OS, codec or both. For the most part MP3 and AAC support are a must as I'm working on a media player and would like it to support those common formats.

Any suggestions?

like image 931
Adam Haile Avatar asked Feb 07 '12 18:02

Adam Haile


2 Answers

You can take a look at GStreamer and FFmpeg.

EDIT:

Since you are willing to use Qt, you should definitely check Qt MultimediaKit, which is a part of the Qt Mobility project. Phonon is fading away because Qt is investing on MultimediaKit to replace it.

This example shows how to do simple audio playback. This example shows how to create a multimedia player. This example shows a more advanced music player, using Qt and QML.

like image 161
karlphillip Avatar answered Oct 23 '22 00:10

karlphillip


I don't know if you are planning on using a framework like Qt. This has a library called "Phonon" bundled, which is also really nice. It is built on the corresponding native media framework, so QuickTime on Mac, Windows Media Player on Windows and GTK+ on Linux.

PulseAudio also looks promising without any framework.

like image 1
guitarflow Avatar answered Oct 23 '22 01:10

guitarflow