Arduino LibMAD
|
MAD from Underbit is a high-quality MPEG audio decoder. It currently supports MPEG-1 and the MPEG-2 extension to lower sampling frequencies, as well as the de facto MPEG 2.5 format. All three audio layers — Layer I, Layer II, and Layer III (i.e. MP3) — are fully implemented. MP3 is a compressed audio file formats based on PCM. A 2.6 MB wav file can be compressed down to 476 kB MP3.
I am providing the MAD MP3 decoder as a Arduino Library with a simple Arduino Style API.
This project can be used stand alone or together with the arduino-audio_tools library. It can also be used outside of Arduino with the help of cmake.
The API provides the decoded data to a Arduino Stream or alternatively to a callback function. Here is a MP3 example using the callback:
In Arduino, you can download the library as zip and call include Library -> zip library. Or you can git clone this project into the Arduino libraries folder e.g. with
This project can also be built and executed on your desktop with cmake: