From 6315377eaf0344b8f02bc53b7f85fb0136e9dca6 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Fri, 14 Jan 2022 11:37:52 -0800 Subject: [PATCH] Cog Audio: Fix extrapolator to use signed type for sample delta --- Audio/Chain/ConverterNode.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Audio/Chain/ConverterNode.m b/Audio/Chain/ConverterNode.m index e5a339826..bbe28e592 100644 --- a/Audio/Chain/ConverterNode.m +++ b/Audio/Chain/ConverterNode.m @@ -628,9 +628,9 @@ static void convert_be_to_le(uint8_t *buffer, size_t bitsPerSample, size_t bytes static const int extrapolate_order = 16; -static void extrapolate(float *buffer, size_t channels, size_t frameSize, size_t size, BOOL backward, void ** extrapolateBuffer, size_t * extrapolateSize) +static void extrapolate(float *buffer, ssize_t channels, ssize_t frameSize, ssize_t size, BOOL backward, void ** extrapolateBuffer, size_t * extrapolateSize) { - const size_t delta = (backward ? -1 : 1) * channels; + const ssize_t delta = (backward ? -1 : 1) * channels; size_t lpc_size = sizeof(float) * extrapolate_order; size_t my_work_size = sizeof(float) * frameSize;