Calculate timestamp offsets from device properties.

Combine multiple user buffers in a host buffer to honor longer latency.
This commit is contained in:
philburk 2011-07-29 18:22:04 +00:00
commit 948250370c
3 changed files with 300 additions and 150 deletions

View file

@ -227,10 +227,15 @@ int main(void)
// Try to use a small buffer that is smaller than we think the device can handle.
// Try to force combining multiple user buffers into a host buffer.
framesPerBuffer = 8;
framesPerBuffer = 9;
outputParameters.suggestedLatency = deviceInfo->defaultLowOutputLatency;
err = paqaCheckLatency( &outputParameters, &data, sampleRate, framesPerBuffer );
if( err != paNoError ) goto error;
framesPerBuffer = 64;
outputParameters.suggestedLatency = deviceInfo->defaultLowOutputLatency * 1.1;
err = paqaCheckLatency( &outputParameters, &data, sampleRate, framesPerBuffer );
if( err != paNoError ) goto error;
// Try to create a huge buffer that is bigger than the allowed device maximum.
framesPerBuffer = 16*1024;