39 #ifndef _AUDIO_ANALYZER_H
40 #define _AUDIO_ANALYZER_H
44 #define MATH_PI (3.141592653589793238462643)
45 #define MATH_TWO_PI (2.0 * MATH_PI)
104 double frequency,
double amplitude );
161 int startFrame,
int numSamples,
double *phasePtr );
170 double frequency,
double frameRate,
171 int startFrame,
int numFrames );
void PaQa_WriteSine(float *buffer, int numSamples, int stride, double frequency, double amplitude)
int PaQa_SaveRecordingToWaveFile(PaQaRecording *recording, const char *filename)
Definition: audio_analyzer.c:206
int PaQa_AnalyseRecording(PaQaRecording *recording, PaQaTestTone *testTone, PaQaAnalysisResult *analysisResult)
Definition: audio_analyzer.c:685
double frequency
Definition: audio_analyzer.h:51
struct PaQaTestTone_s PaQaTestTone
void PaQa_FilterRecording(PaQaRecording *input, PaQaRecording *output, BiquadFilter *filter)
Definition: audio_analyzer.c:340
double droppedFramesPosition
Definition: audio_analyzer.h:84
int PaQa_WriteRecording(PaQaRecording *recording, float *buffer, int numFrames, int stride)
Definition: audio_analyzer.c:138
void PaQa_SetupSineGenerator(PaQaSineGenerator *generator, double frequency, double amplitude, double frameRate)
Definition: audio_analyzer.c:69
double PaQa_CorrelateSine(PaQaRecording *recording, double frequency, double frameRate, int startFrame, int numFrames, double *phasePtr)
Definition: audio_analyzer.c:299
double amplitude
Definition: audio_analyzer.h:52
void PaQa_GenerateCrack(float *buffer, int numSamples, int stride)
int maxFrames
Definition: audio_analyzer.h:59
Definition: audio_analyzer.h:66
struct PaQaAnalysisResult_s PaQaAnalysisResult
int PaQa_WriteSilence(PaQaRecording *recording, int numFrames)
Definition: audio_analyzer.c:160
double numDroppedFrames
Definition: audio_analyzer.h:83
int PaQa_RecordFreeze(PaQaRecording *recording, int numFrames)
Definition: audio_analyzer.c:181
struct PaQaRecording_s PaQaRecording
int startDelay
Definition: audio_analyzer.h:69
double PaQa_ComputePhaseDifference(double phase1, double phase2)
Definition: audio_analyzer.c:463
struct PaQaSineGenerator_s PaQaSineGenerator
double phaseIncrement
Definition: audio_analyzer.h:50
double latency
Definition: audio_analyzer.h:79
double PaQa_MeasureSineAmplitudeBySlope(PaQaRecording *recording, double frequency, double frameRate, int startFrame, int numFrames)
Definition: audio_analyzer.c:287
double addedFramesPosition
Definition: audio_analyzer.h:86
double PaQa_MeasureCrossingSlope(float *buffer, int numFrames)
Definition: audio_analyzer.c:251
Definition: audio_analyzer.h:75
void PaQa_EraseBuffer(float *buffer, int numFrames, int samplesPerFrame)
Definition: audio_analyzer.c:58
Definition: audio_analyzer.h:47
Definition: audio_analyzer.h:56
Definition: biquad_filter.h:14
double amplitudeRatio
Definition: audio_analyzer.h:80
int sampleRate
Definition: audio_analyzer.h:63
double popAmplitude
Definition: audio_analyzer.h:81
double PaQa_GetNthFrequency(double baseFrequency, int index)
Definition: audio_analyzer.c:51
double frequency
Definition: audio_analyzer.h:71
void PaQa_MixSine(PaQaSineGenerator *generator, float *buffer, int numSamples, int stride)
Definition: audio_analyzer.c:78
void PaQa_TerminateRecording(PaQaRecording *recording)
Definition: audio_analyzer.c:127
double popPosition
Definition: audio_analyzer.h:82
float * buffer
Definition: audio_analyzer.h:60
int PaQa_InitializeRecording(PaQaRecording *recording, int maxFrames, int frameRate)
Definition: audio_analyzer.c:114
double sampleRate
Definition: audio_analyzer.h:70
char buffer[NUM_BYTES]
Definition: recplay.c:26
int valid
Definition: audio_analyzer.h:77
double PaQa_MeasureRootMeanSquare(float *buffer, int numFrames)
Definition: audio_analyzer.c:428
double amplitude
Definition: audio_analyzer.h:72
double PaQa_CompareAmplitudes(PaQaRecording *recording, int startAt, float *buffer, int numFrames)
Definition: audio_analyzer.c:447
double PaQa_MeasureArea(float *buffer, int numFrames, int stride)
Definition: audio_analyzer.c:414
int numFrames
Definition: audio_analyzer.h:62
double phase
Definition: audio_analyzer.h:49
double numAddedFrames
Definition: audio_analyzer.h:85
double PaQa_FindFirstMatch(PaQaRecording *recording, float *buffer, int numFrames, double threshold)
Definition: audio_analyzer.c:352
int samplesPerFrame
Definition: audio_analyzer.h:68