From c3070e5f395d2f27b08354d26aeaba37cff4ea00 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) {