From ed34da0862418c4ffe00fc3e50e786f424574e4b Mon Sep 17 00:00:00 2001 From: Michael Rouse Date: Thu, 31 Oct 2024 08:42:06 -0500 Subject: [PATCH] Added support for File.read to return -1 --- Adafruit_VS1053.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Adafruit_VS1053.cpp b/Adafruit_VS1053.cpp index f486789..0ef9449 100644 --- a/Adafruit_VS1053.cpp +++ b/Adafruit_VS1053.cpp @@ -306,7 +306,7 @@ void Adafruit_VS1053_FilePlayer::feedBuffer_noLock(void) { // Read some audio data from the SD card file int bytesread = currentTrack.read(mp3buffer, VS1053_DATABUFFERLEN); - if (bytesread == 0) { + if (bytesread <= 0) { // must be at the end of the file if (_loopPlayback) { // play in loop