PortAudio  2.0
Data Structures | Defines | Functions
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 M_PI   (3.14159265)
#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 M_PI   (3.14159265)
#define MIN_FREQ   (100.0f)
#define SAMPLE_RATE   (44100)
#define TABLE_SIZE   (400)

Function Documentation

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