tags:

views:

273

answers:

2

I need to be able to get the length of an audio file (preferably in milliseconds, the timing is very important for the application), and play back the audio. The application is written in C++ on the windows XP platform. Any suggestions for audio formats/3rd party libraries that would do the trick?

+5  A: 

If I have to do anything related to audio, on any platform, I just use FMOD. It's very fast, cross-platform, and supports a wide range of formats. Note that it's not free for commercial uses.

DNS
+1 for its tools and licensing
Nathan Ross Powell
fmod just rocks
alfred barthand
+2  A: 

The Phonon library (part of Qt) is very powerful and comfortable. It is LGPL.

Downside: it's not as performant as some of the game-oriented libraries such as FMod, SDL_Mixer and OpenAL. However, the latency is generally acceptable for desktop apps.

As for audio formats: use Ogg Vorbis by default. It's an open standard, royalty free and has better quality than MP3.

The Phonon library seemed very attractive, since I'm already using qt in my project. Unfortunately, I'm using MinGW, which the phonon documentation says is not supported. Do you know a way around this? I'm using Eclipse as my IDE.
JCL