Play a sine wave for several seconds at an amplitude that would require clipping. More...
#include <stdio.h>
#include <math.h>
#include "portaudio.h"
Data Structures | |
struct | paTestData |
Defines | |
#define | NUM_SECONDS (4) |
#define | SAMPLE_RATE (44100) |
#define | M_PI (3.14159265) |
#define | TABLE_SIZE (200) |
Typedefs | |
typedef struct paTestData | paTestData |
Functions | |
PaError | PlaySine (paTestData *data, unsigned long flags, float amplitude) |
int | main (void) |
Play a sine wave for several seconds at an amplitude that would require clipping.
#define M_PI (3.14159265) |
Referenced by main().
#define NUM_SECONDS (4) |
Referenced by PlaySine().
#define SAMPLE_RATE (44100) |
Referenced by PlaySine().
#define TABLE_SIZE (200) |
typedef struct paTestData paTestData |
int main | ( | void | ) |
References M_PI, Pa_GetErrorText(), paClipOff, paDitherOff, paNoFlag, PlaySine(), and paTestData::sine.
PaError PlaySine | ( | paTestData * | data, | |
unsigned long | flags, | |||
float | amplitude | |||
) |
References paTestData::amplitude, PaStreamParameters::channelCount, PaDeviceInfo::defaultLowOutputLatency, PaStreamParameters::device, PaStreamParameters::hostApiSpecificStreamInfo, paTestData::left_phase, NUM_SECONDS, Pa_CloseStream(), Pa_GetDefaultOutputDevice(), Pa_GetDeviceInfo(), Pa_GetStreamCpuLoad(), Pa_Initialize(), Pa_OpenStream(), Pa_Sleep(), Pa_StartStream(), Pa_Terminate(), paNoError, paTestData::right_phase, SAMPLE_RATE, PaStreamParameters::sampleFormat, and PaStreamParameters::suggestedLatency.
Referenced by main().