Hi Alexandre,

I did your test, I don't see a pause cycle when I have firefox play a video.
I do get those messages every time there is an audio glitch. At some times
with chromium open I will get far fewer of these messages but no interrupt.
When I say far fewer, I mean I could maybe get 1 of those messages at any
given time but no interruption. With Firefox, all these outputs are from me
opening sites in a couple tabs. This is the output I get when I run audio in
firefox from start to stop:


snd1 pst=ini: device started
snd1 pst=run: started
firefox0 vol=127,pst=rdy: attached at -7680 + 0/480
firefox0 vol=127,pst=rdy: set weight: 8388608/8388608
snd1 pst=run: play hw xrun, pused = 6240/7680
snd1 pst=run: play hw xrun, pused = 6720/7680
snd1 pst=run: play hw xrun, pused = 7200/7680
snd1 pst=run: play hw xrun, pused = 7200/7680
snd1 pst=run: play hw xrun, pused = 6240/7680
snd1 pst=run: play hw xrun, pused = 6720/7680
snd1 pst=run: play hw xrun, pused = 7200/7680
snd1 pst=run: play hw xrun, pused = 6720/7680
snd1 pst=run: play hw xrun, pused = 7200/7680
snd1 pst=run: play hw xrun, pused = 6240/7680
snd1 pst=run: play hw xrun, pused = 6720/7680
snd1 pst=run: play hw xrun, pused = 7200/7680
snd1 pst=run: play hw xrun, pused = 7200/7680
snd1 pst=run: play hw xrun, pused = 6240/7680
snd1 pst=run: play hw xrun, pused = 6720/7680
snd1 pst=run: play hw xrun, pused = 7200/7680
snd1 pst=run: play hw xrun, pused = 6720/7680
snd1 pst=run: play hw xrun, pused = 7200/7680
snd1 pst=run: play hw xrun, pused = 6240/7680
snd1 pst=run: play hw xrun, pused = 6720/7680
snd1 pst=run: play hw xrun, pused = 7200/7680
snd1 pst=run: play hw xrun, pused = 6720/7680
snd1 pst=run: play hw xrun, pused = 7200/7680
firefox0 vol=127,pst=run,rmsg,widl: STOP message
firefox0 vol=127,pst=run: stopping
firefox0 vol=127,pst=ini,rmsg,widl: stopped

So the behavior is the same whether I play audio IN Firefox or
outside of Firefox. any opening of tabs or doing something from within
a website that may require loading data will cause any audio
to stutter. Sometimes even simply having firefox running in the background
will create these messages. Like now, I have Clementine running
but from time to time I will get a glitch and get 2-3 of those messages.
The interval is pretty inconsistent.

On 7/31/22 00:34, Alexandre Ratchov wrote:
On Sat, Jul 30, 2022 at 02:39:08PM -0700, Courtney wrote:
I hope it isn't in bad etiquette to resurrect an old piece of mail.

OK for me, your mail is attached to the thread.

Since May I mitigated the stuttering audio issue with Firefox running
by using Firefox ESR 91. Clearly something beyond 91 added something
that doesn't jive well with OpenBSD. Now that 91 ESR is gone and it is 102
the issue has returned.

I have been playing around with a different issue, but in the process
of messing with that issue I came across something. I ran sndiod in
debug mode with these flags:

sndiod -dd -f rsnd/0 -F rsnd/1

I then went to try out opening tabs in firefox which then triggered
a whole bunch of this getting spat out

snd1: rec hw xrun, rused = 1440/7680
snd1: play hw xrun, pused = 6240/7680
snd1: rec hw xrun, rused = 960/7680
snd1: play hw xrun, pused = 6720/7680
snd1: rec hw xrun, rused = 480/7680
snd1: play hw xrun, pused = 7200/7680
snd1: rec hw xrun, rused = 960/7680
snd1: play hw xrun, pused = 6720/7680
snd1: rec hw xrun, rused = 480/7680
snd1: play hw xrun, pused = 7200/7680
snd1: rec hw xrun, rused = 1440/7680
snd1: play hw xrun, pused = 6240/7680
snd1: rec hw xrun, rused = 960/7680
snd1: play hw xrun, pused = 6720/7680
snd1: rec hw xrun, rused = 480/7680
snd1: play hw xrun, pused = 7200/7680
snd1: rec hw xrun, rused = 960/7680
snd1: play hw xrun, pused = 6720/7680
snd1: rec hw xrun, rused = 480/7680
snd1: play hw xrun, pused = 7200/7680
snd1: rec hw xrun, rused = 1440/7680
snd1: play hw xrun, pused = 6240/7680
snd1: rec hw xrun, rused = 960/7680
snd1: play hw xrun, pused = 6720/7680
snd1: rec hw xrun, rused = 480/7680
snd1: play hw xrun, pused = 7200/7680
snd1: rec hw xrun, rused = 960/7680
snd1: play hw xrun, pused = 6720/7680
snd1: rec hw xrun, rused = 480/7680
snd1: play hw xrun, pused = 7200/7680

I'm wondering if someone has more of a clue as to what all
this means.
This confirms that sndiod woke up too late, probably because another
process is using the CPU. The fraction is the portion of the buffer
containing samples. For the play direction, we see that the buffer is
not entierly full, but there are enough samples to continue playing
smoothly. So these are just warnings, there are no underruns at sndiod
level.

I'd suggest you quickly check if there are underruns at firefox level:
Use "-ddd" sndiod options. Whenever firefox underruns, sndiod will
log:

firefox0 vol=127,pst=run: xrun, pause cycle

Is there a new message every time you hear a glitch?

(note that certain programs just stop providing data to sndiod in
order to pause, which will flood you with above messages, but it is
not a problem)

Reply via email to