PA/CoreAudio ignores Pa_OpenStream() suggestedLatency param
The PA/CoreAudio implementation ignores the suggested latency parameters to OpenStream(). It also reports 0 recommended latency for all devices.
When taken together, these two behaviours are arguably acceptable. However, the way other implementations work, if the requested latency is as large or greater than 2 times the callback buffer size, the native buffer size is set to a corresponding integer multiple of the callback buffer size. So, at a minimum, it would be better if the recommended latency values at least reflected practical reasonable limits on default latency, even if OpenStream continues to ignore suggested latency parameters.
A preferable approach would be to use a host buffer size that is an integer multiple of the user buffer size such that:
META TICKETS:
#98 [META] Harmonize Pa_OpenStream() suggestedLatency param to native buffer size calculations
#99 [META] ensure 0 Pa_OpenStream() suggestedLatency param means "use minimum implementable latency"
See also:
#175 PA/CoreAudio recommended deviceInfo->default*Latency is 0
When taken together, these two behaviours are arguably acceptable. However, the way other implementations work, if the requested latency is as large or greater than 2 times the callback buffer size, the native buffer size is set to a corresponding integer multiple of the callback buffer size. So, at a minimum, it would be better if the recommended latency values at least reflected practical reasonable limits on default latency, even if OpenStream continues to ignore suggested latency parameters.
A preferable approach would be to use a host buffer size that is an integer multiple of the user buffer size such that:
n => 1,2,3...
hostBufferSize = n * callbackBufferSize
duration(hostBufferSize) < requestedLatency
META TICKETS:
#98 [META] Harmonize Pa_OpenStream() suggestedLatency param to native buffer size calculations
#99 [META] ensure 0 Pa_OpenStream() suggestedLatency param means "use minimum implementable latency"
See also:
#175 PA/CoreAudio recommended deviceInfo->default*Latency is 0
Leave a comment