#include <stdio.h>
#include <math.h>
#include "portaudio.h"
Data Structures | |
struct | paTestData |
Defines | |
#define | OUTPUT_DEVICE (Pa_GetDefaultOutputDeviceID()) |
#define | NUM_SECONDS (8) |
#define | SLEEP_DUR (800) |
#define | SAMPLE_RATE (44100) |
#define | FRAMES_PER_BUFFER (256) |
#define | NUM_BUFFERS (0) |
#define | MIN_FREQ (100.0f) |
#define | MAX_FREQ (4000.0f) |
#define | FREQ_SCALAR (1.00002f) |
#define | CalcPhaseIncrement(freq) (freq/SAMPLE_RATE) |
#define | TABLE_SIZE (400) |
Functions | |
float | LookupSine (paTestData *data, float phase) |
int | main (void) |
#define CalcPhaseIncrement | ( | freq | ) | (freq/SAMPLE_RATE) |
#define FRAMES_PER_BUFFER (256) |
#define FREQ_SCALAR (1.00002f) |
#define MAX_FREQ (4000.0f) |
#define MIN_FREQ (100.0f) |
#define NUM_BUFFERS (0) |
#define NUM_SECONDS (8) |
#define OUTPUT_DEVICE (Pa_GetDefaultOutputDeviceID()) |
#define SAMPLE_RATE (44100) |
#define SLEEP_DUR (800) |
#define TABLE_SIZE (400) |
float LookupSine | ( | paTestData * | data, | |
float | phase | |||
) |
References paTestData::sine, and TABLE_SIZE.
int main | ( | void | ) |
References CalcPhaseIncrement, FRAMES_PER_BUFFER, paTestData::framesToGo, paTestData::left_phase, M_PI, MIN_FREQ, NUM_BUFFERS, NUM_SECONDS, OUTPUT_DEVICE, Pa_GetErrorText(), Pa_Initialize(), Pa_OpenStream(), Pa_Sleep(), Pa_StartStream(), Pa_StopStream(), Pa_Terminate(), paClipOff, paDitherOff, paFloat32, paNoDevice, paNoError, paTestData::phase_increment, paTestData::right_phase, SAMPLE_RATE, paTestData::sine, SLEEP_DUR, and TABLE_SIZE.