karaggeorge / macos-audio-devices

Get, set and configure the Audio Devices on macOS
MIT License
166 stars 17 forks source link

feat: implement getDeviceByUID method #25

Open lbdremy opened 1 year ago

lbdremy commented 1 year ago

Hi,

This PR includes a new method getDeviceByUID which does exactly that ^^ get a device using its UID instead of id, it can be useful as the UID is known ahead of creation of the device, as well that the only way to find an hidden device (as explained here https://gist.github.com/kdepp/46c812b05cda6e44a292328b31d0784c#file-audiohardwarebase-h-L696-L700). That's my first time I'm writing some Swift so it works but it is probably not optimal, feedbacks really welcome.

Thanks for your time