From 6b30ed77f5362542e6259bb38bac9ce988a4d6d6 Mon Sep 17 00:00:00 2001 From: "Earle F. Philhower, III" Date: Thu, 4 Jan 2018 09:46:16 -0800 Subject: [PATCH] Fix infinite loop on EOF in SPI buffer Emil Plalan found and fixed a bug where the buffer refill would loop forever (until WDT) when there was no more data to read. For web streams this wasn't detected, since there isn't really an EOF. However, single files streamed from a web server would have this problem. --- src/AudioFileSourceSPIRAMBuffer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/AudioFileSourceSPIRAMBuffer.cpp b/src/AudioFileSourceSPIRAMBuffer.cpp index c74d878..4edb5a2 100644 --- a/src/AudioFileSourceSPIRAMBuffer.cpp +++ b/src/AudioFileSourceSPIRAMBuffer.cpp @@ -91,6 +91,9 @@ uint32_t AudioFileSourceSPIRAMBuffer::read(void *data, uint32_t len) if ((ramSize-bytesAvailable)