From d6b94620925a978a8fa38f6bb8b430260c02b751 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Wed, 5 Aug 2026 08:38:05 +0200 Subject: [PATCH] fix(client): pad_audio reached for a module name Windows doesn't have MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `audio_wasapi.rs` is mounted as `crate::audio` (lib.rs, `#[cfg(windows)] #[path = "audio_wasapi.rs"] pub mod audio;`), so there is no `crate::audio_wasapi` path to reach it by. `pad_audio.rs` used one anyway, which means pf-client-core has not compiled for Windows since 35285afa landed in the pad-audio merge (8983ec04) — E0433, so every Windows client build on main is red, not just this call site. Found while validating the FFmpeg bump on the CI runner; unrelated to it, hence its own commit. --- crates/pf-client-core/src/pad_audio.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/pf-client-core/src/pad_audio.rs b/crates/pf-client-core/src/pad_audio.rs index 4f29c2e7..836d857d 100644 --- a/crates/pf-client-core/src/pad_audio.rs +++ b/crates/pf-client-core/src/pad_audio.rs @@ -840,7 +840,7 @@ struct PadOut { #[cfg(windows)] impl PadOut { /// Correlate (HID container → endpoint id) and open a shared event-driven render stream ON - /// that endpoint (`audio_wasapi::render_thread`'s shape — autoconvert, default period). + /// that endpoint (`audio::render_thread`'s shape — autoconvert, default period). fn open() -> anyhow::Result { use anyhow::{anyhow, Context}; let hid_path = @@ -921,10 +921,10 @@ fn pad_render_thread( const BLOCK_ALIGN: usize = PAD_CHANNELS * 4; // f32 interleaved let enumerator = wasapi::DeviceEnumerator::new().context("DeviceEnumerator")?; // Not `get_device`: that helper resolves through a freed string — see - // [`crate::audio_wasapi::device_by_id`]. - let device = - crate::audio_wasapi::device_by_id(&enumerator, &Direction::Render, endpoint_id) - .map_err(|e| anyhow!("correlated endpoint not found: {e:#}"))?; + // [`crate::audio::device_by_id`]. (`audio_wasapi.rs` is mounted as `crate::audio` + // on Windows via `#[path]`, so it has no `crate::audio_wasapi` name to reach it by.) + let device = crate::audio::device_by_id(&enumerator, &Direction::Render, endpoint_id) + .map_err(|e| anyhow!("correlated endpoint not found: {e:#}"))?; let mut audio_client = device.get_iaudioclient().context("IAudioClient")?; // FL|FR|BL|BR: front pair = the pad's speaker, back pair = the voice coils. let desired = WaveFormat::new(32, 32, &SampleType::Float, 48_000, PAD_CHANNELS, Some(0x33));