From 830590247bcea2faf7863f73220175e386891c61 Mon Sep 17 00:00:00 2001 From: BusinessmanProgrammerSteve Date: Sun, 7 Nov 2010 01:16:13 +0000 Subject: [PATCH] Fix for bug 251 (crash with PulseAudio and Overdub recording). This was suggested by Ross Bencina on the PortAudio mailing list, so I imagine it will be checked into PortAudio soon as well. --- lib-src/portaudio-v19/src/common/pa_process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib-src/portaudio-v19/src/common/pa_process.c b/lib-src/portaudio-v19/src/common/pa_process.c index e176670aa..2c7e5eb61 100644 --- a/lib-src/portaudio-v19/src/common/pa_process.c +++ b/lib-src/portaudio-v19/src/common/pa_process.c @@ -764,7 +764,7 @@ static unsigned long NonAdaptingProcess( PaUtilBufferProcessor *bp, destChannelStrideBytes = bp->bytesPerUserInputSample; /* process host buffer directly, or use temp buffer if formats differ or host buffer non-interleaved */ - if( bp->userInputSampleFormatIsEqualToHost && bp->hostInputIsInterleaved ) + if( bp->userInputSampleFormatIsEqualToHost && bp->hostInputIsInterleaved && bp->hostInputChannels[0][0].data) { userInput = hostInputChannels[0].data; destBytePtr = (unsigned char *)hostInputChannels[0].data; @@ -781,7 +781,7 @@ static unsigned long NonAdaptingProcess( PaUtilBufferProcessor *bp, destChannelStrideBytes = frameCount * bp->bytesPerUserInputSample; /* setup non-interleaved ptrs */ - if( bp->userInputSampleFormatIsEqualToHost && !bp->hostInputIsInterleaved ) + if( bp->userInputSampleFormatIsEqualToHost && !bp->hostInputIsInterleaved && bp->hostInputChannels[0][0].data ) { for( i=0; iinputChannelCount; ++i ) {