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.03k stars 432 forks source link

MP3: ERROR_BUFLEN 0 Esp8266 On Spiffs Example #470

Open SuperJonotron opened 2 years ago

SuperJonotron commented 2 years ago

I just installed this library and attempted to use the play mp3 from spiffs example. I initially was using board 2.6.3 but that didn't compile so I updated to the latest of 3.0.2. I went through the guide to set all the memory as defined for the esp8266 node mcu hardware, uploaded the data but I get the ERROR_BUFLEN 0 when it tries to play the file. Tried to find a solution in existing issues but nothing seemed to clarify this, especially since it's just from the unmodified example. Anybody know what's going on? Some undocumented memory issue I need to update for 3.0.2 board library? Different board library version that has better support?

Sample MP3 playback begins...
ID3 callback for: Title = 'Piano Sample'
ID3 callback for: Performer = 'Artist Goes Here'
ID3 callback for: Album = 'Album Goes Here'
ID3 callback for: Year = '2010'
ID3 callback for: eof = 'id3'
MP3:ERROR_BUFLEN 0
MP3 done
MP3 done
MP3 done
aforch commented 2 years ago

I just installed this library and attempted to use the play mp3 from spiffs example. I initially was using board 2.6.3 but that didn't compile so I updated to the latest of 3.0.2. I went through the guide to set all the memory as defined for the esp8266 node mcu hardware, uploaded the data but I get the ERROR_BUFLEN 0 when it tries to play the file. Tried to find a solution in existing issues but nothing seemed to clarify this, especially since it's just from the unmodified example. Anybody know what's going on? Some undocumented memory issue I need to update for 3.0.2 board library? Different board library version that has better support?

Sample MP3 playback begins...
ID3 callback for: Title = 'Piano Sample'
ID3 callback for: Performer = 'Artist Goes Here'
ID3 callback for: Album = 'Album Goes Here'
ID3 callback for: Year = '2010'
ID3 callback for: eof = 'id3'
MP3:ERROR_BUFLEN 0
MP3 done
MP3 done
MP3 done

I'm having the same issue, also with a NodeMCU. Have you found any solution?

SuperJonotron commented 2 years ago

After I posted this, I also attempted to get this to work on a RP2040 and a D1 Mini both with the same issue as the node mcu. I luckily had some esp32's ordered so I was able to test with those shortly after. So my "solution" was to abandon all hope for any of the "supported" boards except the 32 and just use the esp32 DAC options. Not much of a solution for this issue or what I would have expected for a project to claim full support of a board that appears to have zero support of that board but, that's where I am on this one.

gitfvb commented 2 years ago

I am having the same output, but the song still plays without problems.

djmartins88 commented 5 months ago

any of you guys found any solution yet? I'm having the same trouble on nodemcu v3. the first mp3 will play (using LittleFS for the file) but an error "MP3:ERROR_BUFLEN 0" will be thrown at the end of sound. After that, next AudioGeneratorMP3::play(filesource, output), will not work. I've validated that if the filesource is not "open" , then a validation error is logged "filesource is not open", so it's got to be something inside this class that's not working.