From 0b8a850086a30e5ebf02a5351bffceab7d955baa Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Tue, 19 Jul 2022 23:05:40 -0700 Subject: [PATCH] [Chunk List Converter] Fix repeated initialization Oops, this compare blunder resulted in DSD decimation breaking every 1024 samples or so, owing to block sizes, and caused ticking sounds as a result. It would also cause HDCD decoding to break completely. Signed-off-by: Christopher Snowhill --- Audio/Chain/ChunkList.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Audio/Chain/ChunkList.m b/Audio/Chain/ChunkList.m index 4c6b75e31..e47741b10 100644 --- a/Audio/Chain/ChunkList.m +++ b/Audio/Chain/ChunkList.m @@ -513,7 +513,7 @@ static void convert_be_to_le(uint8_t *buffer, size_t bitsPerSample, size_t bytes AudioStreamBasicDescription chunkFormat = [inChunk format]; uint32_t chunkConfig = [inChunk channelConfig]; BOOL chunkLossless = [inChunk lossless]; - if(!formatRead || memcmp(&chunkConfig, &inputFormat, sizeof(chunkConfig)) != 0 || + if(!formatRead || memcmp(&chunkFormat, &inputFormat, sizeof(chunkFormat)) != 0 || chunkConfig != inputChannelConfig || chunkLossless != inputLossless) { formatRead = YES; inputFormat = chunkFormat;