Bring in files from original projects
The library was originally part of several separate projects. Make the needed structure and bring those files in, including some READMEs.
This commit is contained in:
1 parent
73ffc4cd95
commit
2cf8fcef2a
64 files changed
+28165
No files matched your search
@@ -0,0 +1,31 @@
|
||||
#include <Arduino.h>
|
||||
#include <ESP8266WiFi.h>
|
||||
#include "AudioFileSourceSPIFFS.h"
|
||||
#include "AudioGeneratorMP3.h"
|
||||
#include "AudioOutputI2SNoDAC.h"
|
||||
|
||||
AudioGeneratorMP3 *mp3;
|
||||
AudioFileSourceSPIFFS *file;
|
||||
AudioOutputI2SNoDAC *out;
|
||||
void setup()
|
||||
{
|
||||
WiFi.forceSleepBegin();
|
||||
Serial.begin(115200);
|
||||
delay(1000);
|
||||
SPIFFS.begin();
|
||||
file = new AudioFileSourceSPIFFS("/jamonit.mp3");
|
||||
out = new AudioOutputI2SNoDAC();
|
||||
mp3 = new AudioGeneratorMP3();
|
||||
mp3->begin(file, out);
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
if (mp3->isRunning()) {
|
||||
if (!mp3->loop()) mp3->stop();
|
||||
} else {
|
||||
Serial.printf("MP3 done\n");
|
||||
delay(1000);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user