All files i've tried playing have been distorted and silent for the first couple of seconds. On occasion, the esp32-s3 will crash this mainly happens with mp3 files. Before the crash I will get MP3 decode error -1: INDATA_UNDERFLOW. I know this isn't a hardware issue as I have used the same hardware with a different audio library.
output of when file plays all the way through (still distorted)
buffers freed, free Heap: 334812 bytes
Reading file: "/Levels (Original Version).mp3"
MP3Decoder has been initialized, free Heap: 330400 bytes , free stack 5212 DWORDs
Playing path: /Levels (Original Version).mp3
NAV Screen: Select Command
Content-Length: 3270733
ID3 framesSize: 655
ID3 version: 2.4
ID3 normal frames
Audio-Length: 3270078
stream ready
syncword found at pos 0
MPEG-2.5, Layer I
Channels: 2
SampleRate: 44100
BitsPerSample: 16
BitRate: 64000
Closing audio file "Levels (Original Version).mp3"
End of file "Levels (Original Version).mp3"
Relevant code
main.ino
#include <Arduino.h>
#include "filemanager.h"
#include "UI.h"
#include <FS.h>
#include "SPIFFS.h"
#include "Player.h"
// put function declarations here:
int myFunction(int, int);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
delay(5000);
Serial.println("Starting SD Card");
if(!StartSDCard()){
Serial.println("Start Failed");
while (true)
{
;
}
}
Serial.println("Starting Audio");
player.Init();
std::vector<String> Queue;
Queue.push_back("/LOVEBONE.mp3");
player.SetQueue(Queue);
player.PlayItem(0);
}
void loop() {
SerialInput();
//player.SerialPlayLoop();
player.AudioLoop();
}
All files i've tried playing have been distorted and silent for the first couple of seconds. On occasion, the esp32-s3 will crash this mainly happens with mp3 files. Before the crash I will get MP3 decode error -1: INDATA_UNDERFLOW. I know this isn't a hardware issue as I have used the same hardware with a different audio library.
output of when file plays all the way through (still distorted)
Relevant code
main.ino
Player.cpp