I'm not experienced in doing projects in ESP or Arduino nor making topics on forums so please do say things I need to correct and ask for more information about the project if necessary.
My project idea is for a ESP32 S2 play audio files, to do this I have a speaker, the ESP32 S2 and the I2S module MAX98357A. The major problem is that almost every library I've found and tried, ends up having various problems.
The libraries i've tried:
1.ESP32-audioI2S-master
2.Esp8266Audio
And some that I can't find, but those are the most important/commonly used ones.
It would help us to help you if you would describe the problems that you are having.
Provide links to any libraries that you use that are not included with the IDE.
If there was one code that came close, post that code. Please format the code with the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in a code block.
Thank you for the replies and using your time to help me.
I've watched different tutorials as @groundFungus stated, but even then it had different problems ranging from uncorrected file paths, incorrect code in the library or outdated libraries.
Then I tried ESP32-audioI2S-master again and for some reason it worked, I believe it was where the files were or the folder Arduino IDE was using for the libraries.
It really was trivial. I mean i'm not even sure what the error was.
Here is the code and circuit if anyone is interested. I also take suggestions and help on these too:
The code is a example where a SD file is read and then played: