From cc0f55e3c4f6a8921537ec072819273d78574d17 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Fri, 21 Jul 2023 00:19:52 -0700 Subject: [PATCH] APL: Stop on the correct sample This should stop before the specified end point, not one sample later. Signed-off-by: Christopher Snowhill --- Plugins/APL/APLDecoder.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/APL/APLDecoder.m b/Plugins/APL/APLDecoder.m index bb8db04ef..2023b96e7 100644 --- a/Plugins/APL/APLDecoder.m +++ b/Plugins/APL/APLDecoder.m @@ -113,7 +113,7 @@ - (AudioChunk *)readAudio { int maxFrames = INT_MAX; - if(framePosition + maxFrames > trackEnd) + if(framePosition + maxFrames >= trackEnd) maxFrames = (int)(trackEnd - framePosition); if(!maxFrames) {