adafruit / Adafruit_MP3

mp3 decoding on arduino
39 stars 17 forks source link
arduino-library

Adafruit_MP3 Build Status

This library sets up and performs native MP3 audio decoding on various Arduino-compatible platforms including Metro/Feather M4 (SAMD51 chip), teensy 3.6, teensy 3.2, and teensy 3.1. Audio output via the DAC pins. Uses Helix as underlying decoding. On the SAMD51 boards, TC2 is used to create the sample timer (usually 44.1khz or 48khz). Uses a decent chunk of RAM at this time!

UPDATE 6 October 2018

This release was tested with the Teensy 3.5 only. It is expected that it will work with all other supported boards. (At least as supported as the previous version.)

Some notes regarding audio file format

The tutorial posted on https://learn.adafruit.com/native-mp3-decoding-on-arduino states:

This function is called from an interrupt, so it should be short and sweet. It's getting called 44,100 to 48,000 times per second for most MP3 files.

This means that the MP3 files should be encoded within this range. The code is written for stereo MP3 files so if you have a mono MP3 file, it will not play back using this code as is.

Best practice for producing playable MP3 files

Resources for encoding audio

Other notes