From 638eded2825260be309c610aca0aa8e7bd0ae5df Mon Sep 17 00:00:00 2001 From: 409 Date: Sat, 29 Jun 2024 13:43:27 +0200 Subject: [PATCH] fix: ignore mono sink inputs (this would lead to duplicates sometimes) --- src/mixer.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mixer.rs b/src/mixer.rs index 2959b13..8901a42 100644 --- a/src/mixer.rs +++ b/src/mixer.rs @@ -209,6 +209,10 @@ impl Mixer { .borrow_mut() .get_sink_input_info(sink_index, move |r| { if let ListResult::Item(sink_input) = r { + if sink_input.channel_map.len() == 1 { + return; + } + *operation_result.lock().unwrap() = Some(SinkInputMixerData { name: get_sink_input_name(sink_input).unwrap(), volume: sink_input.volume.avg().0,