From 3513c9751db598567b2d1ac7e0637f8ecc5a5fc0 Mon Sep 17 00:00:00 2001 From: xpehter <32315536+xpehter@users.noreply.github.com> Date: Sat, 7 Nov 2026 08:00:14 +0500 Subject: [PATCH] fix(audio): look up the named audio input among input devices only (#16906) get_audio_input() searched HOST.devices(), which lists input and output devices together, and took the first device whose name matched. CoreAudio gives a USB microphone with a headphone jack two devices with the same name, and the output one can come first. RustDesk then picked the output device, default_input_config() failed with StreamTypeNotSupported, and the voice call sent no audio from the macOS side ("Failed to get default input format" every second). Search HOST.input_devices() instead, so only devices that support input can match the configured or default input name. Signed-off-by: xpehter <32315536+xpehter@users.noreply.github.com> --- src/server/audio_service.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/audio_service.rs b/src/server/audio_service.rs index 4bb234f39..7b5addb38 100644 --- a/src/server/audio_service.rs +++ b/src/server/audio_service.rs @@ -449,7 +449,7 @@ mod cpal_impl { } if device.is_none() && !audio_input.is_empty() { for d in HOST - .devices() + .input_devices() .with_context(|| "Failed to get audio devices")? { if d.name().unwrap_or("".to_owned()) == audio_input {