You must have experience in writing MacOS swift. I have this basic script that I found, and it does 95% of the work. Just need to fix the naming of the interface.
Here's what I'm looking for:
I have about 10 output audio interfaces on my Mac, but I only care about 2:
1) my digital-audio box->headset
2) "Line Out", which is connected to my speakers.
the problem with Line Out is that I have two identically named output interfaces.
I have a full-size Mac keyboard, with F keys up to F19. I would like to connect one of the available keys to this toggle script, so that, upon pressing the key, the interface switches from one to two, and from two back to one.
Found this application that works really well, unfortunately the only issue is that it cannot distinguish between two Line Out, one of which works, another does not, and the application always tries to select the one that does not work. So, I would like to hard-code the interface name based on some other criteria, like an ID of some sort.
Source code is here:
[login to view URL]