From 6b9a72aee5c42bc8e603a9396ac7805f814e1344 Mon Sep 17 00:00:00 2001 From: Mollusk Date: Sat, 22 Aug 2026 18:57:29 -0400 Subject: [PATCH] fix(windows): restore screen-share cross-build --- src/audio/clip_player.rs | 1 + src/core/mod.rs | 10 ++++++++++ src/screenshare/mod.rs | 1 + 3 files changed, 12 insertions(+) diff --git a/src/audio/clip_player.rs b/src/audio/clip_player.rs index fcd0492..509bcd4 100644 --- a/src/audio/clip_player.rs +++ b/src/audio/clip_player.rs @@ -348,6 +348,7 @@ mod tests { /// `cargo test --lib -- --ignored --test-threads=1 clip_player_node` #[test] #[ignore = "live: requires a running PipeWire daemon and pw-dump; run with --test-threads=1"] + #[cfg(not(windows))] fn clip_player_node_carries_both_ownership_carriers() { use crate::audio::ownership::{self, live_test}; diff --git a/src/core/mod.rs b/src/core/mod.rs index 3c56240..df8d982 100644 --- a/src/core/mod.rs +++ b/src/core/mod.rs @@ -3576,6 +3576,7 @@ async fn run_core_loop( let session = active_session .as_mut() .expect("session presence checked before PixelPass probe"); + #[cfg(target_os = "linux")] let aec_module_index = matches!( audio, crate::screenshare::ShareAudioSelection::DesktopExcluding @@ -3587,6 +3588,15 @@ async fn run_core_loop( .map(crate::audio::echo_cancel::EchoCancelGuard::module_index) }) .flatten(); + // Windows has no PipeWire echo-cancel module, so there is no + // module identity to hand to PixelPass. Keep the shared host + // spawn path platform-neutral without importing the Linux-only + // `audio::echo_cancel` module into a Windows build. + #[cfg(not(target_os = "linux"))] + let aec_module_index = { + debug_assert!(session.teardown.echo_cancel().is_none()); + None + }; // Every share gets a notice forwarder — not just app-audio ones. // App-audio and desktop-exclusion events become UI state, and // the drain's terminal `Eof` becomes a generation-scoped fault. diff --git a/src/screenshare/mod.rs b/src/screenshare/mod.rs index 98f109a..eb2def1 100644 --- a/src/screenshare/mod.rs +++ b/src/screenshare/mod.rs @@ -1016,6 +1016,7 @@ mod tests { /// `cargo test --lib -- --ignored spawned_player` #[tokio::test] #[ignore = "live: requires a running PipeWire daemon, mpv and pw-dump"] + #[cfg(not(windows))] async fn spawned_player_node_carries_both_ownership_carriers() { use crate::audio::ownership::live_test;