Conversation
|
I suggest to use the sample rate and channel count to calculate an audio latency of ~100 ms. Almost everywhere there's a double-buffering scheme, so that means that one buffer should represent ~50 ms. For bonus points the buffer sizes are rounded to a safe and performant power of two. |
yes that makes way more sense :) I'll do that and merge. Shall we put out a new patch release after that? |
|
Yeah. Edit: sample rate and channel count |
c767acd to
4e409e3
Compare
|
overhauled the experimental new device opening API (working title: speakers), it now does this nicely. The change to the stable API is just 17 lines. |
|
opportunity for a really nice refactor appeared. I'm looking into that |
9359af4 to
866d6d5
Compare
866d6d5 to
5c807d4
Compare
|
Merging this so I can easily see what it does to #853 feel free to discuss/review further here if you want too |
|
We probably should document that Rodio configures a default buffer with a latency near 100 ms:
Before cpal changed this behavior, users found it surprising that their system settings were ignored. |
done in 1cd15f8 |
fixes #853
huge cpal default buffer sizes (due to weirdly set up systems) are a footgun.
This makes
from_devicereplaceBufferSize::Defaultwith a fixed 4096 samples. This affectsfrom_default_device&open_default_sink.