From 2a992efaa8561256c412d31aa33fd729962e69bf Mon Sep 17 00:00:00 2001 From: rbencina Date: Tue, 6 Aug 2013 08:26:55 +0000 Subject: [PATCH] fixed bug that was causing memory corruption in PA/ALSA when host sample format was lager than user format. e.g. using 16 bit output with a sound card that used 24 bit buffers. the incorrect input zeroer was being used. Thanks to Anders Tornvig for identifying the problem --- src/common/pa_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/pa_process.c b/src/common/pa_process.c index 5b1e519..1009602 100644 --- a/src/common/pa_process.c +++ b/src/common/pa_process.c @@ -238,7 +238,7 @@ PaError PaUtil_InitializeBufferProcessor( PaUtilBufferProcessor* bp, bp->inputConverter = PaUtil_SelectConverter( hostInputSampleFormat, userInputSampleFormat, tempInputStreamFlags ); - bp->inputZeroer = PaUtil_SelectZeroer( hostInputSampleFormat ); + bp->inputZeroer = PaUtil_SelectZeroer( userInputSampleFormat ); bp->userInputIsInterleaved = (userInputSampleFormat & paNonInterleaved)?0:1; -- 2.43.0