From 37119991121fc77162b2bfddc7a3f2d7314ab696 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Fri, 11 Feb 2022 13:50:26 -0800 Subject: [PATCH] Cog Audio: Allocate maximum needed audio memory The chunk could be any format, up to floating point double samples, and up to 18 channels. Signed-off-by: Christopher Snowhill --- Audio/Chain/InputNode.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Audio/Chain/InputNode.m b/Audio/Chain/InputNode.m index a26f3bb1e..e02cea582 100644 --- a/Audio/Chain/InputNode.m +++ b/Audio/Chain/InputNode.m @@ -134,7 +134,7 @@ - (void)process { int amountInBuffer = 0; int bytesInBuffer = 0; - void *inputBuffer = malloc(CHUNK_SIZE * 18); // Maximum 18 channels, dunno what we'll receive + void *inputBuffer = malloc(CHUNK_SIZE * 8 * 18); // Maximum 18 channels, dunno what we'll receive BOOL shouldClose = YES; BOOL seekError = NO;