earlephilhower / ESP8266Audio

Arduino library to play MOD, WAV, FLAC, MIDI, RTTTL, MP3, and AAC files on I2S DACs or with a software emulated delta-sigma DAC on the ESP8266 and ESP32
GNU General Public License v3.0
2.05k stars 437 forks source link

ESP32 and DAC1334 #412

Closed alexgithub56 closed 3 years ago

alexgithub56 commented 3 years ago

I like to connect ESP32 and DAC1334. My hardware:

alexgithub56 commented 3 years ago

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

alexgithub56 commented 3 years ago

๋Just change to new library.

noseeflower commented 2 weeks ago

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?