-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Starting to play MP3 caused a crash #951
Comments
Dear developer, while playing music, ESP32 keeps restarting and the music link is as shown above. Although using the official instance, it cannot play normally |
and i use esp32-wroom-32 |
yes, This file is from the SD card "/Alan Walker - Golden Gate 2016.mp3" , audioI2s can support esp32-wroom-32 ? @schreibfaul1 |
I've been getting this error as well on a s3-n16r8 20:32:38.511 -> Guru Meditation Error: Core 0 panic'ed (StoreProhibited). Exception was unhandled. |
I think I fixed my problem by putting the audio.loop in a task on core 1. Will let it run for a while to verify. |
How did you do that? I am trying to stream over internet and my ESP32-S3 reboots after a few seconds. If I add a
|
I'm just fumbling around in the dark. All this is kind of new to me. |
#include "Arduino.h"
#include "WiFi.h"
#include "Audio.h"
#include "SD.h"
#include "FS.h"
// Digital I/O used
#define SD_CS 5
#define SPI_MOSI 23
#define SPI_MISO 19
#define SPI_SCK 18
#define I2S_DOUT 25
#define I2S_BCLK 27
#define I2S_LRC 26
Audio audio;
void setup() {
pinMode(SD_CS, OUTPUT);
digitalWrite(SD_CS, HIGH);
SPI.begin(SPI_SCK, SPI_MISO, SPI_MOSI);
SPI.setFrequency(1000000);
Serial.begin(115200);
SD.begin(SD_CS);
// WiFi.disconnect();
// WiFi.mode(WIFI_STA);
// WiFi.begin(ssid.c_str(), password.c_str());
// while (WiFi.status() != WL_CONNECTED) delay(1500);
audio.setPinout(I2S_BCLK, I2S_LRC, I2S_DOUT);
audio.setVolume(21); // default 0...21
audio.connecttoFS(SD, "/Alan Walker - Golden Gate 2016.mp3"); // SD
// audio.connecttoFS(SD_MMC, "/test.wav"); // SD_MMC
// audio.connecttoFS(SPIFFS, "/test.wav"); // SPIFFS
// audio.connecttospeech("Wenn die Hunde schlafen, kann der Wolf gut Schafe stehlen.", "de"); // Google TTS
}
void loop() {
audio.loop();
vTaskDelay(1);
}
// optional
void audio_info(const char *info) {
Serial.print("info ");
Serial.println(info);
}
void audio_id3data(const char *info) { //id3 metadata
Serial.print("id3data ");
Serial.println(info);
}
void audio_eof_mp3(const char *info) { //end of file
Serial.print("eof_mp3 ");
Serial.println(info);
}
void audio_showstation(const char *info) {
Serial.print("station ");
Serial.println(info);
}
void audio_showstreamtitle(const char *info) {
Serial.print("streamtitle ");
Serial.println(info);
}
void audio_bitrate(const char *info) {
Serial.print("bitrate ");
Serial.println(info);
}
void audio_commercial(const char *info) { //duration in sec
Serial.print("commercial ");
Serial.println(info);
}
void audio_icyurl(const char *info) { //homepage
Serial.print("icyurl ");
Serial.println(info);
}
void audio_lasthost(const char *info) { //stream URL played
Serial.print("lasthost ");
Serial.println(info);
}
void audio_eof_speech(const char *info) {
Serial.print("eof_speech ");
Serial.println(info);
}
result:
13:59:19.869 -> info buffers freed, free Heap: 183704 bytes
13:59:19.869 -> info Reading file: "/Alan Walker - Golden Gate 2016.mp3"
13:59:19.869 -> info MP3Decoder has been initialized, free Heap: 155772 bytes , free stack 6032 DWORDs
13:59:19.913 -> info Content-Length: 6731007
13:59:19.946 -> info ID3 framesSize: 204448
13:59:19.946 -> info ID3 version: 2.3
13:59:19.946 -> info ID3 normal frames
13:59:19.946 -> id3data SettingsForEncoding: Lavf58.76.100
13:59:19.946 -> Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
13:59:19.946 ->
13:59:19.946 -> Core 0 register dump:
13:59:19.946 -> PC : 0x40081454 PS : 0x00060033 A0 : 0x80083d58 A1 : 0x3ffc08bc
13:59:19.946 -> A2 : 0x3ffba79c A3 : 0x00000000 A4 : 0x356c422b A5 : 0x00060023
13:59:19.980 -> A6 : 0xb33fffff A7 : 0xb33fffff A8 : 0x00100000 A9 : 0x3ffc08ac
13:59:19.980 -> A10 : 0x00000001 A11 : 0x0000007a A12 : 0xb33fffff A13 : 0x3f4317a8
13:59:19.980 -> A14 : 0x00000003 A15 : 0x00060823 SAR : 0x0000001d EXCCAUSE: 0x0000001c
13:59:19.980 -> EXCVADDR: 0x00100010 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
13:59:20.021 ->
13:59:20.021 ->
13:59:20.021 -> Backtrace: 0x40081451:0x3ffc08bc |<-CORRUPTED
13:59:20.021 ->
13:59:20.021 ->
13:59:20.021 ->
13:59:20.021 ->
13:59:20.021 -> ELF file SHA256: 25132685ec674d1c
The text was updated successfully, but these errors were encountered: