We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33b8919 commit dfed2b5Copy full SHA for dfed2b5
src/host/oboe/mod.rs
@@ -275,7 +275,17 @@ impl DeviceTrait for Device {
275
fn name(&self) -> Result<String, DeviceNameError> {
276
match &self.0 {
277
None => Ok("default".to_owned()),
278
- Some(info) => Ok(info.product_name.clone()),
+ Some(info) => {
279
+ let name = if info.address.is_empty() {
280
+ format!("{}:{:?}", info.product_name, info.device_type)
281
+ } else {
282
+ format!(
283
+ "{}:{:?}:{}",
284
+ info.product_name, info.device_type, info.address
285
+ )
286
+ };
287
+ Ok(name)
288
+ }
289
}
290
291
0 commit comments