mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-24 06:10:09 +01:00
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.
This commit is contained in:
@@ -764,7 +764,7 @@ static unsigned long NonAdaptingProcess( PaUtilBufferProcessor *bp,
|
|||||||
destChannelStrideBytes = bp->bytesPerUserInputSample;
|
destChannelStrideBytes = bp->bytesPerUserInputSample;
|
||||||
|
|
||||||
/* process host buffer directly, or use temp buffer if formats differ or host buffer non-interleaved */
|
/* 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;
|
userInput = hostInputChannels[0].data;
|
||||||
destBytePtr = (unsigned char *)hostInputChannels[0].data;
|
destBytePtr = (unsigned char *)hostInputChannels[0].data;
|
||||||
@@ -781,7 +781,7 @@ static unsigned long NonAdaptingProcess( PaUtilBufferProcessor *bp,
|
|||||||
destChannelStrideBytes = frameCount * bp->bytesPerUserInputSample;
|
destChannelStrideBytes = frameCount * bp->bytesPerUserInputSample;
|
||||||
|
|
||||||
/* setup non-interleaved ptrs */
|
/* setup non-interleaved ptrs */
|
||||||
if( bp->userInputSampleFormatIsEqualToHost && !bp->hostInputIsInterleaved )
|
if( bp->userInputSampleFormatIsEqualToHost && !bp->hostInputIsInterleaved && bp->hostInputChannels[0][0].data )
|
||||||
{
|
{
|
||||||
for( i=0; i<bp->inputChannelCount; ++i )
|
for( i=0; i<bp->inputChannelCount; ++i )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user