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 <kode54@gmail.com>
This commit is contained in:
Christopher Snowhill 2023-10-03 21:28:44 -07:00
parent 38dfd2f4a2
commit c4df174ee6
No known key found for this signature in database

View file

@ -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);