From e7d6ab88ce56d2f66aede0065243e4c542d4ee92 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Fri, 21 Jul 2023 00:14:31 -0700 Subject: [PATCH] APL: Round bits per sample to an even byte Round this variable up. 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 da93d0f19..cec402fa6 100644 --- a/Plugins/APL/APLDecoder.m +++ b/Plugins/APL/APLDecoder.m @@ -63,7 +63,7 @@ int channels = [[properties objectForKey:@"channels"] intValue]; // float sampleRate = [[properties objectForKey:@"sampleRate"] floatValue]; - bytesPerFrame = (bitsPerSample / 8) * channels; + bytesPerFrame = ((bitsPerSample + 7) / 8) * channels; if([apl endBlock] > [apl startBlock]) trackEnd = [apl endBlock]; //([apl endBlock] / sampleRate) * 1000.0;