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
This commit is contained in:
David Reid
2022-02-07 17:42:50 +10:00
parent f97bc10b24
commit 1871138aa2
+1 -1
View File
@@ -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 != NULL);
MA_ASSERT(pConverter->resampler.format == pConverter->channelConverter.format); MA_ASSERT(pConverter->resampler.format == pConverter->channelConverter.format);
MA_ASSERT(pConverter->resampler.channels == pConverter->channelConverter.channelsOut); 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; frameCountIn = 0;
if (pFrameCountIn != NULL) { if (pFrameCountIn != NULL) {