Windows compat quick wins: echo-cancel UI gate, pixelpass .exe, cfg tighten (W5/W6/W9)
Three Windows-compatibility fixes from the Codex review. Implemented by Codex (gpt-5.5); reviewed and committed by Claude. W5 — echo cancellation is a Linux/PipeWire feature, but the toggle was shown and live on Windows, so a Windows join tried `pactl` and errored before falling back. Now `#[cfg(target_os = "linux")]` gates the core enable path (and the ActiveSession guard field); on other targets the Settings + in-call controls render as a disabled checkbox with a "not available on Windows yet" note. W6 — pixelpass PATH lookup only tried `pixelpass`; on Windows it now also tries `pixelpass.exe` via a cfg-selected candidate list (+ unit test). W9 — the Linux audio stack (pipewire/pw_cli/echo_cancel/audio_probe + the `PlatformAudioBackend` alias and device-enum re-export) was gated `cfg(unix)`; tightened to `cfg(target_os = "linux")` so a hypothetical macOS build won't try to compile PipeWire. cpal stays `cfg(windows)`. Genuinely-Unix file/key permission code in lib.rs/identity.rs left as `cfg(unix)`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -18,20 +18,20 @@
|
||||
//! Run: cargo run --bin audio_probe -- [freq_hz] [seconds] [target_node]
|
||||
//! e.g. cargo run --release --bin audio_probe -- 440 30
|
||||
//!
|
||||
//! This probe exercises the PipeWire backend directly, so it is a Unix-only tool.
|
||||
//! On non-Unix targets `main` is a stub that explains the limitation.
|
||||
//! This probe exercises the PipeWire backend directly, so it is a Linux-only tool.
|
||||
//! On non-Linux targets `main` is a stub that explains the limitation.
|
||||
|
||||
#[cfg(unix)]
|
||||
#[cfg(target_os = "linux")]
|
||||
fn main() {
|
||||
unix_probe::run();
|
||||
}
|
||||
|
||||
#[cfg(not(unix))]
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
fn main() {
|
||||
eprintln!("audio_probe is only supported on Unix builds (it drives the PipeWire backend directly).");
|
||||
eprintln!("audio_probe is only supported on Linux builds (it drives the PipeWire backend directly).");
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[cfg(target_os = "linux")]
|
||||
mod unix_probe {
|
||||
use std::io::{BufRead, BufReader, Seek, SeekFrom};
|
||||
use std::sync::Arc;
|
||||
|
||||
Reference in New Issue
Block a user