PortAudio
2.0
|
Print suggested vs. PaStreamInfo reported actual latency. More...
Macros | |
#define | SAMPLE_RATE (44100) |
#define | FRAMES_PER_BUFFER 2 |
#define | NUM_CHANNELS (2) |
#define | SUGGESTED_LATENCY_START_SECONDS (0.0) |
#define | SUGGESTED_LATENCY_END_SECONDS (2.0) |
#define | SUGGESTED_LATENCY_INCREMENT_SECONDS (0.0005) /* half a millisecond increments */ |
Functions | |
int | main (int argc, const char *argv[]) |
Print suggested vs. PaStreamInfo reported actual latency.
Opens streams with a sequence of suggested latency values from 0 to 2 seconds in .5ms intervals and gathers the resulting actual latency values. Output a csv file and graph suggested vs. actual. Run with framesPerBuffer unspecified, powers of 2 and multiples of 50 and prime number buffer sizes.
#define FRAMES_PER_BUFFER 2 |
Referenced by main().
#define NUM_CHANNELS (2) |
Referenced by main().
#define SAMPLE_RATE (44100) |
Referenced by main().
#define SUGGESTED_LATENCY_END_SECONDS (2.0) |
Referenced by main().
#define SUGGESTED_LATENCY_INCREMENT_SECONDS (0.0005) /* half a millisecond increments */ |
Referenced by main().
#define SUGGESTED_LATENCY_START_SECONDS (0.0) |
Referenced by main().
int main | ( | int | argc, |
const char * | argv[] | ||
) |
References PaStreamParameters::channelCount, PaStreamParameters::device, FRAMES_PER_BUFFER, PaDeviceInfo::hostApi, PaStreamParameters::hostApiSpecificStreamInfo, PaStreamInfo::inputLatency, PaDeviceInfo::maxInputChannels, PaDeviceInfo::maxOutputChannels, PaHostApiInfo::name, PaDeviceInfo::name, NUM_CHANNELS, PaStreamInfo::outputLatency, Pa_CloseStream(), Pa_GetDefaultInputDevice(), Pa_GetDefaultOutputDevice(), Pa_GetDeviceInfo(), Pa_GetErrorText(), Pa_GetHostApiInfo(), Pa_GetStreamInfo(), Pa_Initialize(), Pa_OpenStream(), Pa_Terminate(), paClipOff, paFloat32, paNoDevice, paNoError, SAMPLE_RATE, PaStreamParameters::sampleFormat, SUGGESTED_LATENCY_END_SECONDS, SUGGESTED_LATENCY_INCREMENT_SECONDS, SUGGESTED_LATENCY_START_SECONDS, PaStreamParameters::suggestedLatency, and usage().