From: rbencina Date: Tue, 6 Aug 2013 08:26:55 +0000 (+0000) Subject: fixed bug that was causing memory corruption in PA/ALSA when host sample format was... X-Git-Tag: pa_stable_v19_20140130_r1919~14 X-Git-Url: https://andrewgundersen.net/repos?a=commitdiff_plain;h=2a992efaa8561256c412d31aa33fd729962e69bf;p=portaudio 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 --- 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;