From 1871138aa2e1eaf4eda09b475a3d2ac54e2686b4 Mon Sep 17 00:00:00 2001 From: David Reid Date: Mon, 7 Feb 2022 17:42:50 +1000 Subject: [PATCH] Attempt to fix an error in the data converter. This could happen when channel mapping is used without differing input and output channel counts. Public issue https://github.com/mackron/miniaudio/issues/427 --- miniaudio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniaudio.h b/miniaudio.h index 94b10126..70645dac 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -52297,7 +52297,7 @@ static ma_result ma_data_converter_process_pcm_frames__channels_first(ma_data_co MA_ASSERT(pConverter != NULL); MA_ASSERT(pConverter->resampler.format == pConverter->channelConverter.format); MA_ASSERT(pConverter->resampler.channels == pConverter->channelConverter.channelsOut); - MA_ASSERT(pConverter->resampler.channels < pConverter->channelConverter.channelsIn); + MA_ASSERT(pConverter->resampler.channels <= pConverter->channelConverter.channelsIn); frameCountIn = 0; if (pFrameCountIn != NULL) {