Route muted sessions through a recoverable Pulse null sink

This commit is contained in:
VallierDev committed 2026-10-15 10:47:31 +08:00
1 parent 8a8a4c165f
commit ac0f2bf2c6
7 files changed
+193 -6

No files matched your search

+13
View File
@@ -253,3 +253,16 @@ Both FFmpeg process and `--features inproc-av` upload NV12 frames to a VAAPI fra
VBR uses the viewer bitrate preset and CQ-derived minimum QP, no B-frames, async depth 1,
AUD and the existing GOP/VFR timing. Unsupported device/driver/initialization falls back to libx264
with a warning. Intel/AMD hardware acceptance is still required (未实机验证).
### Virtual audio / 虚拟声卡
The viewer's 静音运行 switch creates `uu-remote-sink` with `pactl module-null-sink`,
moves streams from the original default output and captures `uu-remote-sink.monitor`.
New output goes to this sink; streams explicitly pinned to other outputs are untouched.
The last desktop session restores the previous default output and unloads the module.
`mute_permanent` retains the physical mute policy, but still releases the virtual sink.
A private recovery record beside the config and a process lock recover crash leftovers on startup.
PulseAudio and PipeWire-pulse use the same `pactl` interface (install `pulseaudio-utils` on Debian,
`libpulse` on Arch). When routing is unavailable, the existing mute/monitor path remains.
Changing the switch restarts only the scoped audio encoder; normal non-muted capture is unchanged.
`virtual-audio-probe` temporarily routes output for five seconds and restores it (local diagnostic).