reverted changes from revisions 1516-1517 due to incorrectly made changes to processor's core which result in corrupted audio in some specific situations
This commit is contained in:
parent
f7ee62732e
commit
dbbd94da2c
2 changed files with 1 additions and 44 deletions
|
|
@ -502,7 +502,6 @@ void PaUtil_SetInterleavedInputChannels( PaUtilBufferProcessor* bp,
|
|||
p += bp->bytesPerHostInputSample;
|
||||
bp->hostInputChannels[0][channel+i].stride = channelCount;
|
||||
}
|
||||
bp->hostInputIsInterleaved[0] = 1;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -513,7 +512,6 @@ void PaUtil_SetNonInterleavedInputChannel( PaUtilBufferProcessor* bp,
|
|||
|
||||
bp->hostInputChannels[0][channel].data = data;
|
||||
bp->hostInputChannels[0][channel].stride = 1;
|
||||
bp->hostInputIsInterleaved[0] = 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -553,7 +551,6 @@ void PaUtil_Set2ndInterleavedInputChannels( PaUtilBufferProcessor* bp,
|
|||
p += bp->bytesPerHostInputSample;
|
||||
bp->hostInputChannels[1][channel+i].stride = channelCount;
|
||||
}
|
||||
bp->hostInputIsInterleaved[1] = 1;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -564,7 +561,6 @@ void PaUtil_Set2ndNonInterleavedInputChannel( PaUtilBufferProcessor* bp,
|
|||
|
||||
bp->hostInputChannels[1][channel].data = data;
|
||||
bp->hostInputChannels[1][channel].stride = 1;
|
||||
bp->hostInputIsInterleaved[1] = 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -615,7 +611,6 @@ void PaUtil_SetInterleavedOutputChannels( PaUtilBufferProcessor* bp,
|
|||
PaUtil_SetOutputChannel( bp, channel + i, p, channelCount );
|
||||
p += bp->bytesPerHostOutputSample;
|
||||
}
|
||||
bp->hostOutputIsInterleaved[0] = 1;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -625,7 +620,6 @@ void PaUtil_SetNonInterleavedOutputChannel( PaUtilBufferProcessor* bp,
|
|||
assert( channel < bp->outputChannelCount );
|
||||
|
||||
PaUtil_SetOutputChannel( bp, channel, data, 1 );
|
||||
bp->hostOutputIsInterleaved[0] = 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -665,7 +659,6 @@ void PaUtil_Set2ndInterleavedOutputChannels( PaUtilBufferProcessor* bp,
|
|||
PaUtil_Set2ndOutputChannel( bp, channel + i, p, channelCount );
|
||||
p += bp->bytesPerHostOutputSample;
|
||||
}
|
||||
bp->hostOutputIsInterleaved[1] = 1;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -675,7 +668,6 @@ void PaUtil_Set2ndNonInterleavedOutputChannel( PaUtilBufferProcessor* bp,
|
|||
assert( channel < bp->outputChannelCount );
|
||||
|
||||
PaUtil_Set2ndOutputChannel( bp, channel, data, 1 );
|
||||
bp->hostOutputIsInterleaved[1] = 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -758,22 +750,6 @@ static unsigned long NonAdaptingProcess( PaUtilBufferProcessor *bp,
|
|||
destSampleStrideSamples = bp->inputChannelCount;
|
||||
destChannelStrideBytes = bp->bytesPerUserInputSample;
|
||||
userInput = bp->tempInputBuffer;
|
||||
|
||||
/* determine if processing of host buffer can be done directly by callback */
|
||||
if( bp->inputConverter == paConverters.Copy_16_To_16 ||
|
||||
bp->inputConverter == paConverters.Copy_32_To_32 ||
|
||||
bp->inputConverter == paConverters.Copy_24_To_24 ||
|
||||
bp->inputConverter == paConverters.Copy_8_To_8 )
|
||||
{
|
||||
/* allow when interlieved buffers both on user and host sides */
|
||||
if( bp->hostInputFrameCount[0] && !bp->hostInputFrameCount[1] &&
|
||||
bp->hostInputIsInterleaved[0] )
|
||||
{
|
||||
/* process host buffer directly */
|
||||
userInput = hostInputChannels[0].data;
|
||||
destBytePtr = (unsigned char *)hostInputChannels[0].data;
|
||||
}
|
||||
}
|
||||
}
|
||||
else /* user input is not interleaved */
|
||||
{
|
||||
|
|
@ -802,7 +778,6 @@ static unsigned long NonAdaptingProcess( PaUtilBufferProcessor *bp,
|
|||
}
|
||||
}
|
||||
else
|
||||
if( userInput != hostInputChannels[0].data )
|
||||
{
|
||||
for( i=0; i<bp->inputChannelCount; ++i )
|
||||
{
|
||||
|
|
@ -831,21 +806,6 @@ static unsigned long NonAdaptingProcess( PaUtilBufferProcessor *bp,
|
|||
if( bp->userOutputIsInterleaved )
|
||||
{
|
||||
userOutput = bp->tempOutputBuffer;
|
||||
|
||||
/* determine if processing of host buffer can be done directly by callback */
|
||||
if( bp->outputConverter == paConverters.Copy_16_To_16 ||
|
||||
bp->outputConverter == paConverters.Copy_32_To_32 ||
|
||||
bp->outputConverter == paConverters.Copy_24_To_24 ||
|
||||
bp->outputConverter == paConverters.Copy_8_To_8 )
|
||||
{
|
||||
/* allow when interlieved buffers both on user and host sides */
|
||||
if( bp->hostOutputFrameCount[0] && !bp->hostOutputFrameCount[1] &&
|
||||
bp->hostOutputIsInterleaved[0] )
|
||||
{
|
||||
/* process host buffer directly */
|
||||
userOutput = hostOutputChannels[0].data;
|
||||
}
|
||||
}
|
||||
}
|
||||
else /* user output is not interleaved */
|
||||
{
|
||||
|
|
@ -874,8 +834,7 @@ static unsigned long NonAdaptingProcess( PaUtilBufferProcessor *bp,
|
|||
|
||||
/* convert output data (user -> host) */
|
||||
|
||||
if( bp->outputChannelCount != 0 && bp->hostOutputChannels[0][0].data &&
|
||||
userOutput != hostOutputChannels[0].data )
|
||||
if( bp->outputChannelCount != 0 && bp->hostOutputChannels[0][0].data )
|
||||
{
|
||||
/*
|
||||
could use more elaborate logic here and sometimes process
|
||||
|
|
|
|||
|
|
@ -287,14 +287,12 @@ typedef struct {
|
|||
|
||||
PaStreamCallbackFlags callbackStatusFlags;
|
||||
|
||||
int hostInputIsInterleaved[2];
|
||||
unsigned long hostInputFrameCount[2];
|
||||
PaUtilChannelDescriptor *hostInputChannels[2]; /**< pointers to arrays of channel descriptors.
|
||||
pointers are NULL for half-duplex output processing.
|
||||
hostInputChannels[i].data is NULL when the caller
|
||||
calls PaUtil_SetNoInput()
|
||||
*/
|
||||
int hostOutputIsInterleaved[2];
|
||||
unsigned long hostOutputFrameCount[2];
|
||||
PaUtilChannelDescriptor *hostOutputChannels[2]; /**< pointers to arrays of channel descriptors.
|
||||
pointers are NULL for half-duplex input processing.
|
||||
|
|
|
|||
Loading…
Reference in a new issue