PortAudio 2.0
test_audio_analyzer.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "qa_tools.h"
#include "audio_analyzer.h"
#include "test_audio_analyzer.h"
#include "write_wav.h"
#include "biquad_filter.h"

Macros

#define FRAMES_PER_BLOCK   (64)
 
#define PRINT_REPORTS   0
 
#define TEST_SAVED_WAVE   (0)
 
#define NUM_TONES   (5)
 
#define BUFFER_SIZE   512
 
#define BUFFER_SIZE   512
 

Functions

void PaQa_FillWithSine (PaQaRecording *recording, double sampleRate, double freq, double amp)
 
int PaQa_TestAnalyzer (void)
 

Macro Definition Documentation

◆ BUFFER_SIZE [1/2]

#define BUFFER_SIZE   512

◆ BUFFER_SIZE [2/2]

#define BUFFER_SIZE   512

◆ FRAMES_PER_BLOCK

#define FRAMES_PER_BLOCK   (64)

Referenced by PaQa_FillWithSine().

◆ NUM_TONES

#define NUM_TONES   (5)

◆ PRINT_REPORTS

#define PRINT_REPORTS   0

◆ TEST_SAVED_WAVE

#define TEST_SAVED_WAVE   (0)

Function Documentation

◆ PaQa_FillWithSine()

void PaQa_FillWithSine ( PaQaRecording * recording,
double sampleRate,
double freq,
double amp )

Easy way to generate a sine tone recording.

References buffer, FRAMES_PER_BLOCK, PaQa_EraseBuffer(), PaQa_MixSine(), PaQa_SetupSineGenerator(), and PaQa_WriteRecording().

◆ PaQa_TestAnalyzer()

int PaQa_TestAnalyzer ( void )

Test the audio analyzer by itself without any PortAudio calls.

Referenced by main().