From 293d7be0b4e4b7ecaa96d01c4f3351393275ac9b Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 14 Aug 2019 16:17:05 +0100 Subject: [PATCH] macOS: Handle EOF in CoreAudioReader::readSamples() --- modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp index 039da4afab..330b86b2c0 100644 --- a/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp @@ -494,6 +494,9 @@ public: if (status != noErr) return false; + if (numFramesToRead == 0) + break; + if ((int) numFramesToRead < numThisTime) { numThisTime = (int) numFramesToRead;