From 400cfddf383d0dbebd5aed010d8db1fdba7f79f9 Mon Sep 17 00:00:00 2001 From: ken <39673849+SuperKenVery@users.noreply.github.com> Date: Sun, 15 Feb 2026 18:20:04 +0800 Subject: [PATCH 1/2] fix: AAudio device name in device.description() --- src/host/aaudio/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/host/aaudio/mod.rs b/src/host/aaudio/mod.rs index c2afe3b21..a76b8df49 100644 --- a/src/host/aaudio/mod.rs +++ b/src/host/aaudio/mod.rs @@ -405,7 +405,7 @@ impl DeviceTrait for Device { match &self.0 { None => Ok(DeviceDescriptionBuilder::new("Default Device".to_string()).build()), Some(info) => { - let mut builder = DeviceDescriptionBuilder::new(info.product_name.clone()) + let mut builder = DeviceDescriptionBuilder::new(self.name()?) .device_type(info.device_type.into()) .interface_type(info.device_type.into()) .direction(info.direction); From 30849afe61b0d3d272eb7af20944fb80868f7ea1 Mon Sep 17 00:00:00 2001 From: SuperKenVery <39673849+SuperKenVery@users.noreply.github.com> Date: Thu, 26 Feb 2026 19:03:50 +0800 Subject: [PATCH 2/2] Fix clippy deprecation warning: inline name logic in description() (#2) The description() method was calling self.name() which is deprecated. Inline the name-building logic directly to avoid the deprecated call. Co-authored-by: Cursor Agent Co-authored-by: SuperKenVery --- src/host/aaudio/mod.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/host/aaudio/mod.rs b/src/host/aaudio/mod.rs index a76b8df49..1a24e0e8a 100644 --- a/src/host/aaudio/mod.rs +++ b/src/host/aaudio/mod.rs @@ -405,7 +405,15 @@ impl DeviceTrait for Device { match &self.0 { None => Ok(DeviceDescriptionBuilder::new("Default Device".to_string()).build()), Some(info) => { - let mut builder = DeviceDescriptionBuilder::new(self.name()?) + let name = if info.address.is_empty() { + format!("{}:{:?}", info.product_name, info.device_type) + } else { + format!( + "{}:{:?}:{}", + info.product_name, info.device_type, info.address + ) + }; + let mut builder = DeviceDescriptionBuilder::new(name) .device_type(info.device_type.into()) .interface_type(info.device_type.into()) .direction(info.direction);