Here I present two AudioFormatReader classes for decoding purposes.
The MADAudioFormatReader class uses the MAD (MPEG Audio Decoder) GPLed library to decode MP3 files. Why MAD? Because MAD is considered to be the most accurate decoder ever released under GPL license. There is no need to pay any patent fee in order to decode mp3 files because all patents related only to the encoding process. MAD does not use any patented technology to decode mp3 files, but only it’s own one. I see no obstacles to use MAD in JUCE because both JUCE and MAD are GPLed. To simplify MAD building process I’ve created the libmad.c file that must be solely included into your project in order to compile full functional MAD statically into your application.
The MPCAudioFormatReader class uses the MPC (Musepack) library to decode MPC files. It has the BSD license now. It is based on the MPEG-1 Layer-2 / MP2 algorithms, but since 1997 it has rapidly developed and vastly improved and is now at an advanced stage in which it contains heavily optimized and patentless code. For more information on Musepack visit http://www.musepack.net. The library was modified by me to simplify incorporating the decoder into your application. Like I’d done to MAD, I’ve created the libmpcdec.c file to include it into your project. Despite the library has the encoder, I didn’t implement it yet in JUCE as MPCAudioFormatWriter. So, everyone is welcomed to implement it.
The archived file contains source code and MS Windows executable file of the Decodemo simple demo audio player application. Also, it contains the Code::Blocks project file for the demo application. The demo application was compiled under MinGW (GCC 4.2.1-dw2).