Jan Stary schreef op 2025-03-11 12:02:
On Thu, Mar 06, 2025 at 10:48:06AM +0100, Andrath of the Abyss wrote:
> I was wondering if people with USB audio interfaces have the same issue
> as me. When using the microphone of my usb audio interface, the recorded
> audio starts to stutter/pop, indicating buffering problems, usually when
> I do something that causes a bit of load on the system (e.g. starting a
> browser).

This is to confirm that I can replicate xruns
with this cheapo Sennheiser USB headphones+mic combo:

uaudio0 at uhub5 port 1 configuration 1 interface 1 "Sennheiser Sennheiser SC 160 USB" rev 2.00/0.18 addr 3

[snip]

Mine (not cheapo USB interface):

uaudio0 at uhub0 port 20 configuration 1 interface 1 "MOTU M4" rev 2.00/1.01 addr 7
uaudio0: class v2, high-speed, sync, channels: 4 play, 4 rec, 0 ctls
audio0 at uaudio0
uaudio1 at uhub8 port 1 configuration 1 interface 4 "Logitech Logitech BRIO" rev 3.10/3.17 addr 7
uaudio1: class v1, high-speed, sync, channels: 0 play, 2 rec, 2 ctls

doas /usr/bin/sndiod -s default -m play,mon -s mon -ddd

during livestreaming:

[startup snip]
sock 5: building SETVOL message, vol = 127
ffmpeg0: prime = 8
ffmpeg0: prime = 7
ffmpeg0: prime = 6
ffmpeg0: prime = 5
ffmpeg0: prime = 4
ffmpeg0: prime = 3
ffmpeg0: prime = 2
ffmpeg0: prime = 1
sock: created
sock 10: AUTH message
sock 10: HELLO message
sock 10: hello from <ffmpeg>, mode 2, ver 7
ctl24: app/ffmpeg1.level = 127 at slot_level:ffmpeg1: added
rsnd/0: device requested
ffmpeg1: using 0, mode = 2
sock 10: SETPAR message
sock 10: GETPAR message
sock 10: GETPAR message
sock 10: START message
ffmpeg1: 48000Hz, s16le, rec 0:1, 20 blocks of 480 frames
ffmpeg1: allocated 9600/13440 fr buffers
cmap_init: nch = 2, ostart = 0, onext = 0, istart = 0, inext = 2
enc: s16le, 2 channels
ffmpeg1: attached at -3840 + 0 / 480
sock 10: building SETVOL message, vol = 127
ffmpeg1: prime = 8
ffmpeg1: prime = 7
ffmpeg1: prime = 6
ffmpeg1: prime = 5
ffmpeg1: prime = 4
ffmpeg1: prime = 3
ffmpeg1: prime = 2
ffmpeg1: prime = 1
ffmpeg0: xrun, pause cycle
ffmpeg0: xrun, pause cycle
ffmpeg0: xrun, pause cycle
ffmpeg0: xrun, pause cycle
ffmpeg0: xrun, pause cycle
ffmpeg0: xrun, pause cycle
ffmpeg0: xrun, pause cycle
ffmpeg0: xrun, pause cycle
ffmpeg0: xrun, pause cycle
rsnd/0: rec hw xrun, rused = 480 / 3840
rsnd/0: play hw xrun, pused = 3360 / 3840
rsnd/0: rec hw xrun, rused = 480 / 3840
rsnd/0: play hw xrun, pused = 3360 / 3840
rsnd/0: rec hw xrun, rused = 480 / 3840
rsnd/0: play hw xrun, pused = 3360 / 3840
rsnd/0: rec hw xrun, rused = 480 / 3840
rsnd/0: play hw xrun, pused = 3360 / 3840
rsnd/0: rec hw xrun, rused = 480 / 3840
rsnd/0: play hw xrun, pused = 3360 / 3840
rsnd/0: rec hw xrun, rused = 480 / 3840
rsnd/0: play hw xrun, pused = 3360 / 3840
rsnd/0: rec hw xrun, rused = 480 / 3840
rsnd/0: play hw xrun, pused = 3360 / 3840
rsnd/0: play hw xrun, pused = 3360 / 3840
rsnd/0: play hw xrun, pused = 3360 / 3840
rsnd/0: play hw xrun, pused = 3360 / 3840
rsnd/0: play hw xrun, pused = 3360 / 3840
rsnd/0: play hw xrun, pused = 3360 / 3840
rsnd/0: play hw xrun, pused = 3360 / 3840
rsnd/0: play hw xrun, pused = 3360 / 3840
rsnd/0: play hw xrun, pused = 3360 / 3840
 ... many of these ...

I did manage to get the popping/clicking to a minimum by tuning
ffmpeg, but the xruns still happen (albeit less noticable).

Script available here:

https://github.com/ekollof/youtube-openbsd/tree/master/screenrecord

The aucat sounds good in the beginning, but sometimes the sound is high
pitched and artifacted which is what Alex was referring to, as can be
heard in one of my livestreams:

https://www.youtube.com/live/snDYh9IGsM0?si=4s45b0AImEvN3ECm&t=3202 (@53:22)

It does eventually recover. There is nothing in the dmesg about this when
this happens.

Cheers,
Emiel

Reply via email to