"What is happening is that the output is requesting an unexpected amount of samples, 3344 (so 1115 samples at 16khz), and quickly ends up consuming more samples than the input can provide, getting underflows.
Is there additional, uncontrollable hardware latency that makes the approach I am taking unfeasible? Or am I missing something .."
On macOS, setting the sample rate to a non-default value is not currently supported. It should be a simple fix on line ~182 of graph.cpp:
However, this subsequently seems to require a buffer size that is not the same as the configured one:
The HAL appears to be requesting
256*(48000/44100)
samples. This may be related to this libsoundio issue: https://github.com/andrewrk/libsoundio/issues/138"What is happening is that the output is requesting an unexpected amount of samples, 3344 (so 1115 samples at 16khz), and quickly ends up consuming more samples than the input can provide, getting underflows.
Is there additional, uncontrollable hardware latency that makes the approach I am taking unfeasible? Or am I missing something .."