Calculate timestamp offsets from device properties.
Combine multiple user buffers in a host buffer to honor longer latency.
This commit is contained in:
parent
e07e139e0d
commit
948250370c
3 changed files with 300 additions and 150 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue