diff --git a/src/graph_manager.rs b/src/graph_manager.rs index ab31f40..5bd17e5 100644 --- a/src/graph_manager.rs +++ b/src/graph_manager.rs @@ -22,7 +22,7 @@ use crate::{ui::graph::GraphView, GtkMessage, PipewireMessage}; mod imp { use glib::closure_local; - use log::debug; + use super::*; diff --git a/src/pipewire_connection/mod.rs b/src/pipewire_connection/mod.rs index b31b4c7..b641273 100644 --- a/src/pipewire_connection/mod.rs +++ b/src/pipewire_connection/mod.rs @@ -18,7 +18,7 @@ mod libspa_ext; mod state; use std::{ - any::Any, cell::RefCell, collections::HashMap, mem::MaybeUninit, rc::Rc, time::Duration, + cell::RefCell, collections::HashMap, mem::MaybeUninit, rc::Rc, time::Duration, }; use adw::glib::{self, clone}; @@ -38,8 +38,7 @@ use pipewire::{ param::{ParamInfoFlags, ParamType}, pod::Pod, sys::{ - spa_pod_frame, SPA_PARAM_Props, SPA_PROP_channelVolumes, SPA_PROP_monitorMute, - SPA_PROP_monitorVolumes, SPA_PROP_mute, SPA_PROP_volume, SPA_TYPE_OBJECT_Props, + SPA_PARAM_Props, SPA_PROP_channelVolumes, SPA_PROP_mute, SPA_PROP_volume, SPA_TYPE_OBJECT_Props, }, utils::{dict::DictRef, result::SpaResult, SpaTypes}, }, @@ -400,30 +399,27 @@ fn handle_node_params( set_node_param_props(node, vec![], None, None); } - match pod.type_() { - SpaTypes::Object => { - let mut volume = None; - let mut channel_volumes = vec![]; - let mut mute = None; - for prop in pod.iter_props() { - if prop.key() == SPA_PROP_volume && prop.value().is_float() { - volume = Some(parse_volume_pod(prop.value())); - } else if prop.key() == SPA_PROP_channelVolumes && prop.value().is_array() { - channel_volumes = parse_channelvolume_pod(prop.value()); - } else if prop.key() == SPA_PROP_mute && prop.value().is_bool() { - mute = Some(parse_mute_pod(prop.value())); - } + if pod.type_() == SpaTypes::Object { + let mut volume = None; + let mut channel_volumes = vec![]; + let mut mute = None; + for prop in pod.iter_props() { + if prop.key() == SPA_PROP_volume && prop.value().is_float() { + volume = Some(parse_volume_pod(prop.value())); + } else if prop.key() == SPA_PROP_channelVolumes && prop.value().is_array() { + channel_volumes = parse_channelvolume_pod(prop.value()); + } else if prop.key() == SPA_PROP_mute && prop.value().is_bool() { + mute = Some(parse_mute_pod(prop.value())); } - sender - .send_blocking(PipewireMessage::NodePropsChanged { - id, - volume, - channel_volumes, - mute, - }) - .expect("Failed to send message"); } - _ => {} + sender + .send_blocking(PipewireMessage::NodePropsChanged { + id, + volume, + channel_volumes, + mute, + }) + .expect("Failed to send message"); } } diff --git a/src/ui/graph/node.rs b/src/ui/graph/node.rs index de58da9..33ac2f4 100644 --- a/src/ui/graph/node.rs +++ b/src/ui/graph/node.rs @@ -28,7 +28,6 @@ mod imp { use std::{ cell::{Cell, RefCell}, collections::HashSet, - process::Command, sync::OnceLock, };