Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@

# Decode Audio files using Arduino
Documentation is available at [Instructables](https://www.instructables.com/id/Arduino-Library-for-MP3-Decoding/)

This library is a modified fork of https://github.com/tierneytim/microDecoder for current (2026) Arduino

Some information and documentation is available at:

[My Blog](https://tmrh20.blogspot.com/2026/02/more-with-mp3-decoding-playback-on.html)
[Instructables](https://www.instructables.com/id/Arduino-Library-for-MP3-Decoding/)

[Full MP3 Playback Example](https://github.com/TMRh20/FeatherAudio/blob/main/Examples/mp3Player/mp3Player.ino)
12 changes: 6 additions & 6 deletions library.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name=microDecoder
version=1.0
version=1.0.1
author=Tim Tierney
maintainer=Tim Tierney <fiachmri@gmail.com>
sentence= High level interface for audio file decoding
paragraph= This library provides an easy to use and modular interface to popular adudio codecs
category=Audio
url=https://github.com/tierneytim/microDecoder
maintainer=tmrh20 <tmrh20@gmail.com>
sentence= Modified Arduino library for mp3 decoding
paragraph= This library provides an easy to use and modular interface to decode mp3 files
category=Signal Input/Output
url=https://github.com/TMRh20/microDecoder
architectures=*
1,226 changes: 630 additions & 596 deletions src/libmad/D.dat.h

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions src/libmad/README.ESP8266
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
This is the LIBMAD library, ported and optimized for the ESP8266 by
Earle F. Philhower, III <earlephilhower@yahoo.com>. The entire GIT
history is preserved in GitHub at:
https://github.com/earlephilhower/libmad-8266

Unlike the "port" in NONOS-SDK from Espressif, this works in STEREO
with an external I2S, or a full dynamic 32x oversampled mono using
the AudioOutputI2SNoDAC which sounds poretty good @ 44.1KHz.

The only functional changes made were in the synth section, where the
amount of data synthesized in one pass was reduces from 1156 to 32 bytes
and pre-scaled to minimize memory usage. Most other work involved
shrinking the HEAP footprint by moving any constants to PROGMEM and
adjusting the code to work. Often shorts could just be made to ints
and then pointer/array access "just worked." In other cases accessor
functions or macros were required to make the mad_fixed_t accesses
use a 32-bit read before operating on a local register/RAM copy of
a value.

Massive stack variables were moved to the heap and dynamically
allocated/deallocated on function entrance/exit. The xr[] array
and the tmp[] array in layer3.c took around 8KB stack space, whereas
the standard Arduino only has 4K total stack. That lead to some very
interesting crashes, believe you me.

Present memory needs to decode 128kb/sec MP3s are around 34KB heap
and 1KB stack. Of this, about 24KB are required at all times once
the MP3 object is instantiated, while the additional 10KB are for the
stack-to-heap variables mentioned above.

Any bugs in the port are most likely my fault, not Underbit's. I'd
like to thank them for producing such a readable MP3 decoder and
releasing it under the GPL. Their web page is:
http://www.underbit.com/products/mad/

-Earle F. Philhower, III
earlephilhower@yahoo.com
Loading