ESP32-audioI2S
ESP32-audioI2S copied to clipboard
connecttoFS does not work with files written to SPIFFS
I am trying to play an audio file that I have written to SPIFFS but it won't play with connecttoFS() I have confirmed that writing to SPIFFS works by writing a text file to SPIFFS and then printing it to the console but when I try the same with an .mp3 or .wav file and using connecttoFS() it does nothing
#include "Arduino.h"
#include "Audio.h"
#include "SPIFFS.h"
#include "FS.h"
#define I2S_DOUT 25
#define I2S_BCLK 27
#define I2S_LRC 26
Audio audio;
void setup() {
audio.setPinout(I2S_BCLK, I2S_LRC, I2S_DOUT);
audio.setVolume(10);
audio.connecttoFS(SPIFFS, "test.mp3");
}
void loop()
{
audio.loop();
}
Thanks in advance.