Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a function to create a Source from a unique id. #50

Merged
merged 2 commits into from
Jul 2, 2024

Conversation

akhudek
Copy link
Contributor

@akhudek akhudek commented Jun 8, 2024

I wanted to be able to create a source from a unique id. The advantage of this over using name or index is that the unique id is unique to the device, even if more than one of the same device is plugged in, and it persists across reboots and device disconnects.

Also, this allows you to create a source for a device even if it's not currently plugged in. In my testing MacOS will automatically start sending midi messages to your listener once the device is plugged in.

…ows you to start listenting to the device even if it's not currently plugged in.
src/endpoints/sources.rs Outdated Show resolved Hide resolved
src/endpoints/sources.rs Show resolved Hide resolved
… Sources::from_unique_id use it. Updated documentation and cleaned up code.
@chris-zen chris-zen merged commit 8e45046 into chris-zen:master Jul 2, 2024
1 check passed
@chris-zen
Copy link
Owner

Thanks @akhudek !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants