Closed alexgithub56 closed 3 years ago
update my hardware: ESP32 CJMCU-1334 wiring: DAC - ESP32 DIN - 22 WSEL - 25 BCLK - 26 code:
AudioGeneratorMP3 mp3; AudioFileSourceSPIFFS file; AudioOutputI2S *out;
void setup() { WiFi.mode(WIFI_OFF); Serial.begin(115200); delay(1000); SPIFFS.begin(); file = new AudioFileSourceSPIFFS("/pno-cs.mp3"); out = new AudioOutputI2S(); 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); } } result: no sound
๋Just change to new library.
update my hardware: ESP32 CJMCU-1334 wiring: DAC - ESP32 DIN - 22 WSEL - 25 BCLK - 26 code: #include
#include #include #include #include #include AudioGeneratorMP3 mp3; AudioFileSourceSPIFFS file; AudioOutputI2S *out;
void setup() { WiFi.mode(WIFI_OFF); Serial.begin(115200); delay(1000); SPIFFS.begin(); file = new AudioFileSourceSPIFFS("/pno-cs.mp3"); out = new AudioOutputI2S(); 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); } } result: no sound
I have the same code, could you please tell me how you solved the problem?
I like to connect ESP32 and DAC1334. My hardware: