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:
philburk 2012-06-25 01:12:29 +00:00
commit b4a22b91ff
4 changed files with 55 additions and 42 deletions

View file

@ -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 ];