Skip to content

fix(android): showing seemingly duplicate devices naming#1109

Merged
roderickvd merged 6 commits intoRustAudio:masterfrom
setoelkahfi:fix/android-list-unique-devices
Mar 2, 2026
Merged

fix(android): showing seemingly duplicate devices naming#1109
roderickvd merged 6 commits intoRustAudio:masterfrom
setoelkahfi:fix/android-list-unique-devices

Conversation

@setoelkahfi
Copy link
Copy Markdown
Contributor

@setoelkahfi setoelkahfi commented Feb 20, 2026

Fixes #969

This pull request improves the handling and description of audio devices in the aaudio host implementation. The main changes enhance device naming clarity and ensure that input/output configurations are only provided for devices that actually support them.

Device description and naming improvements:

  • Device names now include the device type in parentheses (e.g., "Speaker (Output)") unless the type is unknown, making it easier to distinguish devices in the UI or logs. (src/host/aaudio/mod.rs)

Input/output configuration filtering:

  • When querying supported input configurations, output-only devices now correctly return no input configs, preventing invalid usage. (src/host/aaudio/mod.rs)
  • When querying supported output configurations, input-only devices now correctly return no output configs, preventing invalid usage. (src/host/aaudio/mod.rs)

See the issue ticket for more screenshots.

After Screenshot_1771606241 Screenshot_1771606236
Before Screenshot_1771603591

Related #1103

Copy link
Copy Markdown
Member

@roderickvd roderickvd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions - and if you would also write a changelog entry?

Comment thread src/host/aaudio/mod.rs
let device_type: DeviceType = info.device_type.into();
let name = match device_type {
DeviceType::Unknown => info.product_name.clone(),
_ => format!("{} ({})", info.product_name, device_type),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SuperKenVery was arguing that it should include the address. I'm not so sure because an address is not a name. What do you think?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For my case, device_type is unique enough to distinguish the device.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@roderickvd I added the changelog entry.

Comment thread src/host/aaudio/mod.rs Outdated
@setoelkahfi setoelkahfi requested a review from roderickvd March 1, 2026 22:55
@roderickvd roderickvd merged commit e5d465a into RustAudio:master Mar 2, 2026
29 checks passed
@setoelkahfi setoelkahfi deleted the fix/android-list-unique-devices branch March 2, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android / Oboe returns duplicate devices

2 participants