I have searched high and low, and cannot find any decent MP3 decoders =/
I need one that will compile under gcc/linux.
The closest thing i could find was libmad, which has no documentation at all, and the only example I could find was the one on their home page, which is really complicated.
Does anyone know where I can find one?
I have used MAD (MPEG Audio Decoder) in the past with great results, so I would not give up on it so quickly. MAD is specialy designed for good performance on CPUs without floating-point operations, which is desirable while developing applications for mobile devices for example.
I would like to recommend you to take a look on the source code of this project (GSPlayer). It is an audio player for Windows CE/Windows Mobile and it uses libmad. The code is fully functional, neat, and not too large, so it may help you to get an idea on how to use libmad on your own projects.
You may have to verify the license (GPL) for libmad though, since it may not suit your needs.
Have you looked at Lame?
Looking at its command-line page, I can see at least a few options that look promising, such as --decode
and --mp3input
. That would hint that the underlying library has the ability to do what you need, I would imagine. Whether or not it has nice, well-encapsulated C++ functions for decoding mp3s is another story.
As correctly noted in the comments, you should carefully examine the licensing and patent agreements.
ffmpeg should be able to handle MP3s without difficulty. How easy it is to actually access that functionality though, I cannot say.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With