patest_latency.c File Reference

Hear the latency caused by big buffers. Play a sine wave and change frequency based on letter input. More...

#include <stdio.h>
#include <math.h>
#include "portaudio.h"

Data Structures

struct  paTestData

Defines

#define OUTPUT_DEVICE   (Pa_GetDefaultOutputDevice())
#define SAMPLE_RATE   (44100)
#define FRAMES_PER_BUFFER   (64)
#define MIN_FREQ   (100.0f)
#define CalcPhaseIncrement(freq)   ((freq)/SAMPLE_RATE)
#define TABLE_SIZE   (400)

Functions

float LookupSine (paTestData *data, float phase)
int main (void)

Detailed Description

Hear the latency caused by big buffers. Play a sine wave and change frequency based on letter input.

Author:
Phil Burk <philburk@softsynth.com>, and Darren Gibbs

Define Documentation

#define CalcPhaseIncrement ( freq   )     ((freq)/SAMPLE_RATE)
#define FRAMES_PER_BUFFER   (64)
#define MIN_FREQ   (100.0f)
#define OUTPUT_DEVICE   (Pa_GetDefaultOutputDevice())
#define SAMPLE_RATE   (44100)
#define TABLE_SIZE   (400)

Function Documentation

float LookupSine ( paTestData data,
float  phase 
)

References paTestData::sine, and TABLE_SIZE.

int main ( void   ) 

Generated for PortAudio by  doxygen1.6.1