Clarify mute logs with the virtual sink; document the PipeWire fallback

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
VallierDevandClaude Opus 5.5 committed 2026-10-15 11:22:20 +08:00
1 parent 09f7169f62
commit ebe6a7e19a
4 files changed
+14 -11

No files matched your search

+4 -3
View File
@@ -236,14 +236,15 @@ 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`,
The viewer's 静音运行 switch creates the null sink `uu-remote-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.
`pactl` is used when installed (PulseAudio / PipeWire-pulse); plain PipeWire systems without it (default
Ubuntu desktop) use `pw-cli`/`wpctl` for the same sink and WirePlumber moves playing streams. Accepted on
Ubuntu 24.04 with the official Mac viewer. 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).
+4 -3
View File
@@ -274,14 +274,15 @@ 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`,
The viewer's 静音运行 switch creates the null sink `uu-remote-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.
`pactl` is used when installed (PulseAudio / PipeWire-pulse); plain PipeWire systems without it (default
Ubuntu desktop) use `pw-cli`/`wpctl` for the same sink and WirePlumber moves playing streams. Accepted on
Ubuntu 24.04 with the official Mac viewer. 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).
+3 -2
View File
@@ -255,11 +255,12 @@ Intel/AMD 硬编**未实机验证**,不能把 virtio 的 CPU 回退测试当
### 静音运行与虚拟声卡
控制端开启「静音运行」后,程序用 `pactl module-null-sink` 创建 `uu-remote-sink`,保存原默认输出,
控制端开启「静音运行」后,程序创建虚拟输出 `uu-remote-sink`,保存原默认输出,
迁移其播放流并采集 `uu-remote-sink.monitor`。新播放也走虚拟输出;其他输出上的流不迁移。
最后一个桌面连接结束后恢复原默认输出并卸载模块;`mute_permanent` 仍保留原物理静音策略。
恢复记录保存在配置旁,权限 0600;进程锁避免重复实例抢占,异常退出后下次启动会恢复遗留路由。
PulseAudio 和 PipeWire-pulse 都使用该接口(Debian 安装 `pulseaudio-utils`,Arch 安装 `libpulse`)。
有 `pactl` 时用它(PulseAudio / PipeWire-pulse);没有 `pactl` 的纯 PipeWire 系统(如默认的 Ubuntu 桌面)
自动改用 `pw-cli`/`wpctl` 创建同名虚拟输出,正在播放的声音由 WirePlumber 自动迁移。已在 Ubuntu 24.04 实机上用官方 Mac 控制端验收。
路由失败时保留原静音/monitor 方案。开关变化仅重启当前音频编码器,未开启时采集方式保持不变。
本地诊断命令 `virtual-audio-probe` 会临时切换输出五秒并恢复。
+3 -3
View File
@@ -147,20 +147,20 @@ impl PeerActions {
let on = toggle_value(value, args);
state.settings.keep_mute = on;
if on { mute_for_session(&mut state); } else { restore_mute(&mut state); }
log::info!("System action mute (action {}): on={} muted={:?}", action, on, host_muted());
log::info!("System action mute (action {}): on={} virtual_sink={} default_muted={:?}", action, on, crate::virtual_audio::active(), host_muted());
}
// Keep the host muted after the session (远程结束后,恢复被控端声音设置 unchecked).
MUTE_PERMANENT => {
let on = toggle_value(value, args);
state.settings.mute_permanent = on;
if on { state.settings.keep_mute = true; mute_for_session(&mut state); }
log::info!("System action mute_permanent: on={} muted={:?}", on, host_muted());
log::info!("System action mute_permanent: on={} virtual_sink={} default_muted={:?}", on, crate::virtual_audio::active(), host_muted());
}
MUTE_RESTORE => {
state.settings.keep_mute = false;
state.settings.mute_permanent = false;
restore_mute(&mut state);
log::info!("System action mute_restore: muted={:?}", host_muted());
log::info!("System action mute_restore: virtual_sink={} default_muted={:?}", crate::virtual_audio::active(), host_muted());
}
SET_AUTO_LOCK => {
// Observed: enabling 远程结束后自动锁屏 sends value 2 and disabling value 1.