From 606d594dc9296c5743f45fefca12f3e46099593d Mon Sep 17 00:00:00 2001 From: EdisonJwa Date: Sat, 16 May 2026 01:55:31 +0800 Subject: [PATCH] fix(audio,windows): init_tx is SyncSender not Sender (windows-only build fix) run_raw_input_loop / run_hook_loop signatures used Sender but the callers create the channel via sync_channel which returns SyncSender. Linux cross-check missed this because windows.rs is behind #[cfg(target_os = "windows")]. --- crates/chanora_audio/src/ptt_backends/windows.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/chanora_audio/src/ptt_backends/windows.rs b/crates/chanora_audio/src/ptt_backends/windows.rs index 4b06b6d..d546f65 100644 --- a/crates/chanora_audio/src/ptt_backends/windows.rs +++ b/crates/chanora_audio/src/ptt_backends/windows.rs @@ -370,7 +370,7 @@ impl Drop for WindowsRawInputBackend { /// # Safety /// Calls into Win32 directly. Must be invoked on the thread that /// owns the message window (created here). -unsafe fn run_raw_input_loop(init_tx: std::sync::mpsc::Sender) -> bool { +unsafe fn run_raw_input_loop(init_tx: std::sync::mpsc::SyncSender) -> bool { // Helper that signals the readiness state to the main thread. // We send exactly once at the first decisive moment (either an // early-fail return or right after a successful @@ -795,7 +795,7 @@ impl Drop for WindowsHookBackend { /// # Safety /// Calls Win32 directly; must run on the thread that owns the /// hook handles. -unsafe fn run_hook_loop(init_tx: std::sync::mpsc::Sender) -> bool { +unsafe fn run_hook_loop(init_tx: std::sync::mpsc::SyncSender) -> bool { let mut signal = Some(init_tx); macro_rules! report { ($v:expr) => {