mozilla / cubeb

Cross platform audio library
ISC License
440 stars 124 forks source link

When using the USB sound card in duplex mode, audio recording has interruptions #773

Closed Monsterovich closed 9 months ago

Monsterovich commented 9 months ago

The problem appears in recently built Firefox 121 only after refresh of the page, and sometimes immediately. Chrome-based apps don't have this issue. I'm using pipewire 1.0 via pulse.

See the video:

2023-12-18_17-18-15.mkv.zip

This problem can be avoided by doing this:

pactl load-module module-null-sink sink_name=virtmic sink_properties=device.description=Virtual_Microphone_Sink

If you make the sound output to a virtual device that is linked to a real device. Then the problem will disappear.

image

UPDATE: jack backend works fine in duplex mode.

padenot commented 9 months ago

Please open bugs on Bugzilla for Firefox bugs (except if you can reproduce with just cubeb of course). This is likely related to thread priorities. In Firefox, you can get nice logging following (including info about real-time audio) by following https://paul.cx/public/about-logging-presentation.webm and choosing the Media preset.