Add check for clipping and noise in loopback test.

This commit is contained in:
philburk 2011-03-01 22:48:50 +00:00
commit 9471fc8dae
3 changed files with 258 additions and 40 deletions

View file

@ -114,6 +114,12 @@ double PaQa_ComputePhaseDifference( double phase1, double phase2 );
*/
double PaQa_MeasureArea( float *buffer, int numFrames, int stride );
/**
* Measure slope of the positive zero crossings.
*/
double PaQa_MeasureCrossingSlope( float *buffer, int numFrames );
/**
* Prepare an oscillator that can generate a sine tone for testing.
*/
@ -156,6 +162,16 @@ double PaQa_CorrelateSine( PaQaRecording *recording, double frequency, double fr
double PaQa_FindFirstMatch( PaQaRecording *recording, float *buffer, int numSamples, double tolerance );
/**
* Estimate the original amplitude of a clipped sine wave by measuring
* its average slope at the zero crossings.
*/
double PaQa_MeasureSineAmplitudeBySlope( PaQaRecording *recording,
double frequency, double frameRate,
int startFrame, int numFrames );
double PaQa_MeasureRootMeanSquare( float *buffer, int numFrames );
/**
* Compare the amplitudes of these two signals.
* Return ratio of recorded signal over buffer signal.