From 1278b64afd97a1ba526f3a1070bd572845e44e32 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Sat, 25 Dec 2021 22:47:17 -0800 Subject: [PATCH] Audio Output: Fixed converter so it won't loop endlessly when it either reaches the end of a stream or is otherwise supposed to terminate --- Audio/Chain/ConverterNode.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Audio/Chain/ConverterNode.m b/Audio/Chain/ConverterNode.m index f3cb1f6de..2758a5d3f 100644 --- a/Audio/Chain/ConverterNode.m +++ b/Audio/Chain/ConverterNode.m @@ -259,6 +259,11 @@ static OSStatus ACFloatProc(AudioConverterRef inAudioConverter, int amountRead = 0; tryagain2: + if ([self shouldContinue] == NO || [self endOfStream] == YES) + { + return amountRead; + } + amountReadFromFC = 0; if (floatOffset == floatSize) {