host/audio: emit initial app_audio "lost" at strict capture start (A23 P2/F1)
In strict per-app mode the default-sink loopback is suppressed, so until the chosen app's first stream routes the viewer hears silence. Previously no event fired for an app that never routed (`lost` only fires on an N→0 transition after a prior route), so peerspeak couldn't warn — the share looked normal but was silent. Emit a `lost` at capture start (lazy, on first viewer) when, and only when, `--app` + `--strict-audio` are both set; whole-desktop and best-effort modes keep audio flowing via the loopback and emit nothing. Factored the emit decision into the pure, unit-tested `initial_app_audio_state`; derive Debug/PartialEq/Eq on AppAudioState so it can be asserted on. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -72,7 +72,7 @@ pub enum CaptureState {
|
||||
Stopped,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Clone, Copy)]
|
||||
#[derive(Serialize, Clone, Copy, Debug, PartialEq, Eq)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum AppAudioState {
|
||||
Routed,
|
||||
|
||||
Reference in New Issue
Block a user