patest_sine_formats.c File Reference
Play a sine wave for several seconds. Test various data formats.
More...
#include <stdio.h>
#include <math.h>
#include "portaudio.h"
Detailed Description
Play a sine wave for several seconds. Test various data formats.
- Author:
- Phil Burk
Define Documentation
#define DOUBLE_TO_SAMPLE |
( |
x |
|
) |
(SAMPLE_ZERO + (SAMPLE_t)(127.0 * (x))) |
#define FORMAT_NAME "Unsigned 8 Bit" |
#define FRAMES_PER_BUFFER (512) |
#define LEFT_FREQ (SAMPLE_RATE/256.0) |
#define RIGHT_FREQ (500.0) |
#define SAMPLE_RATE (44100) |
#define SAMPLE_ZERO (0x80) |
#define TEST_FORMAT paUInt8 |
Typedef Documentation
Function Documentation
References PaStreamParameters::channelCount, PaDeviceInfo::defaultLowOutputLatency, PaStreamParameters::device, FORMAT_NAME, FRAMES_PER_BUFFER, paTestData::framesToGo, PaStreamParameters::hostApiSpecificStreamInfo, paTestData::left_phase, NUM_SECONDS, Pa_CloseStream(), Pa_GetDefaultOutputDevice(), Pa_GetDeviceInfo(), Pa_GetErrorText(), Pa_Initialize(), Pa_IsStreamActive(), Pa_OpenStream(), Pa_Sleep(), Pa_StartStream(), Pa_Terminate(), paClipOff, paNoError, paTestData::right_phase, SAMPLE_RATE, PaStreamParameters::sampleFormat, PaStreamParameters::suggestedLatency, and TEST_FORMAT.