Hi Alexandre,
* Alexandre Ratchov wrote:
> The current sndiod latency (minimum time between when the program
> plays something and when sound reaches Joe's ears) is too large and
> makes OpenBSD unpleasant to use for telephony, games, and makes
> controls of video players slugish.
>
> The defaut latency (of 160ms) was set ~10 years ago to workaround
> various problems: KERNEL_LOCK used to block audio processing for very
> long, azalia(4) and uaudio(4) were unable to recover after an error,
> which aggravated the problem.
>
> The kernel improved a lot the last decade and such large buffers are
> not necessary anymore. I think something between 20ms and 40ms is a
> better default for the average OpenBSD system:
>
> * audio-conferencing software and games requires no sndiod_flags
> tweaks anymore
>
> * on modern machines (like my 7 years old i5-2500K) building a kernel
> doesn't make audio stutterer
>
> * sndiod_flags tweaks will still be needed for:
> - very slow or overloaded machines used for audio
> - machines running heavy/bogus SMM code
> - real-time synths & effects (20ms is still too small)
>
> Please try to switch you system to 40ms buffers (i.e. 1920 samples at
> the default 48kHz rate), for instance either apply diff below or
> simply do:
>
> rcctl set sndiod flags -z 480 -b 1920
> rcctl restart sndiod
I have sndiod on -current with this flag running and it quite makes a
difference. Audio stutters when having a movie running and reloading
some JS heavy websites in parallel are gone. So quite a good
improvement!
Cheers
Matthias