diff --git a/src/utils/daemon.rs b/src/utils/daemon.rs index e124dce..f109f80 100644 --- a/src/utils/daemon.rs +++ b/src/utils/daemon.rs @@ -36,7 +36,7 @@ pub fn get_daemon_config() -> DaemonConfig { pub async fn link_player_to_virtual_mic() -> Result<(), Box> { let pwsp_daemon_output; - if let Ok(device) = get_device("alsa_playback.pwsp-daemon").await { + if let Ok(device) = get_device("pwsp-daemon").await { pwsp_daemon_output = device; } else { eprintln!("Could not find alsa_playback.pwsp-daemon device, skipping device linking"); diff --git a/src/utils/pipewire.rs b/src/utils/pipewire.rs index 2d8f21b..0606731 100644 --- a/src/utils/pipewire.rs +++ b/src/utils/pipewire.rs @@ -210,7 +210,11 @@ pub async fn get_device(device_name: &str) -> Result input_devices.extend(output_devices); for device in input_devices { - if device.name == device_name { + if device.name == device_name + || device.nick == device_name + || device.name.contains(device_name) + || device.nick.contains(device_name) + { return Ok(device); } }