From c4df174ee6c65f20b9736bd7e3d2328fc9f2d3b1 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Tue, 3 Oct 2023 21:28:44 -0700 Subject: [PATCH] Remove redundant track end checker This is checked inside the audio thread, it isn't needed in the watcher thread. Remove the second check. Signed-off-by: Christopher Snowhill --- Audio/Output/OutputCoreAudio.m | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/Audio/Output/OutputCoreAudio.m b/Audio/Output/OutputCoreAudio.m index 62383cec5..94a0b6c59 100644 --- a/Audio/Output/OutputCoreAudio.m +++ b/Audio/Output/OutputCoreAudio.m @@ -445,28 +445,13 @@ current_device_listener(AudioObjectID inObjectID, UInt32 inNumberAddresses, cons if(stopping) break; - + if(!started && !paused) { [self resume]; } - + if([outputController shouldContinue] == NO) { break; - } else if([outputController endOfStream] == YES) { - double secondsBuffered = [[outputController buffer] listDuration]; - secondsBuffered += secondsLatency; - if([outputController chainQueueHasTracks]) { - if(secondsBuffered <= 0.005) - secondsBuffered = 0.0; - else - secondsBuffered -= 0.005; - } else { - break; - } - [self signalEndOfStream:secondsBuffered]; - if(!started && !paused) { - [self resume]; - } } usleep(5000);