C++ Cross Platform MP3 Decoder?

CuriousGeorge picture CuriousGeorge · Jun 2, 2011 · Viewed 7.7k times · Source

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?

Answer

yms picture yms · Jun 2, 2011

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.