Hi! I noticed it yesterday on Youtube, that every video has an audio delay about a second or two. In about:config I have media.cubeb.backend="oss". After changing it to "sndio" all videos play fine, without audio delay. May be this commit is the reason of my issue: www/firefox: Fix for jitter when using the cubeb OSS audio backend. https://cgit.freebsd.org/ports/commit/www/firefox?id=abed228812efb91cc436eb0a6d750803396fc43c
It might be that youtube specifies a too big latency parameter. We only have a minimum value there. I'll try to narrow it down after X-mas. --HPS
Created attachment 230389 [details] Patch for cubeb_oss.c Hi, Can you try this not-tested nor compiled patch. cd /usr/ports/www/firefox make extract patch cat cubeb_oss.diff | patch work/firefox-95.0.2/media/libcubeb/src/cubeb_oss.c make all reinstall --HPS
(In reply to Hans Petter Selasky from comment #2) Hi, I can confirm this patch works. No audio delays on youtube after applying it.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=c6218ed826128b021740bbd416ab4e0eb35fc108 commit c6218ed826128b021740bbd416ab4e0eb35fc108 Author: Hans Petter Selasky <hselasky@FreeBSD.org> AuthorDate: 2021-12-27 09:35:09 +0000 Commit: Hans Petter Selasky <hselasky@FreeBSD.org> CommitDate: 2021-12-31 10:00:02 +0000 www/firefox: Force 32 ms service intervals at most for the CUBEB OSS backend. Sometimes a big buffer may be specified by CUBEB. Feed big buffers in smaller chunks to avoid issues with the audio flow. Other CUBEB audio backends apparently do the same. Fixes audio out of sync for youtube videos. The need for this patch will eventually go away as the changes are upstreamed. PR: 260620 Approved by: pi (implicit) www/firefox/Makefile | 1 + .../files/patch-media_libcubeb_src_cubeb__oss.c | 59 +++++++++++++--------- 2 files changed, 37 insertions(+), 23 deletions(-)
Close this issue for now.