Fix ring buffer handling in pa_mac_core.c that caused many spurious paInputOverflow flags.
Fixed size bug when input underflow detected. Code was confused between bytes and elements. Zero out the beginning of a recording when detecting pops to prevent start of audio from looking like a pop in qa loopback test.
This commit is contained in:
parent
44bdc45b2a
commit
b4a22b91ff
4 changed files with 55 additions and 42 deletions
|
|
@ -514,9 +514,15 @@ void PaQa_FadeInRecording( PaQaRecording *recording, int startFrame, int count )
|
|||
|
||||
assert( startFrame >= 0 );
|
||||
assert( count > 0 );
|
||||
|
||||
for( is=0; is<count; is++ )
|
||||
|
||||
/* Zero out initial part of the recording. */
|
||||
for( is=0; is<startFrame; is++ )
|
||||
{
|
||||
recording->buffer[ is ] = 0.0f;
|
||||
}
|
||||
/* Fade in where signal begins. */
|
||||
for( is=0; is<count; is++ )
|
||||
{
|
||||
double c = cos( phase );
|
||||
double w = c * c;
|
||||
float x = recording->buffer[ is + startFrame ];
|
||||
|
|
|
|||
|
|
@ -989,8 +989,8 @@ static int PaQa_AnalyzeLoopbackConnection( UserOptions *userOptions, PaDeviceInd
|
|||
int framesPerBuffers[] = { 0, 16, 32, 40, 64, 100, 128, 256, 512, 1024 };
|
||||
int numBufferSizes = (sizeof(framesPerBuffers)/sizeof(int));
|
||||
|
||||
PaSampleFormat sampleFormats[] = { paUInt8, paInt8, paInt16, paInt32 };
|
||||
const char *sampleFormatNames[] = { "paUInt8", "paInt8", "paInt16", "paInt32" };
|
||||
PaSampleFormat sampleFormats[] = { paFloat32, paUInt8, paInt8, paInt16, paInt32 };
|
||||
const char *sampleFormatNames[] = { "paFloat32", "paUInt8", "paInt8", "paInt16", "paInt32" };
|
||||
int numSampleFormats = (sizeof(sampleFormats)/sizeof(PaSampleFormat));
|
||||
|
||||
printf( "=============== Analysing Loopback %d to %d =====================\n", outputDevice, inputDevice );
|
||||
|
|
|
|||
Loading…
Reference in a new issue