deweller / switchaudio-osx

Change the audio source for Mac OS X from the command line.
Other
1.19k stars 88 forks source link

Doesn't appear to work with duplicate audio devices #2

Closed tdhopper closed 5 years ago

tdhopper commented 9 years ago

I have two HDMI monitors. Only one is connected to an audio device. I see this

$ ./SwitchAudioSource -a
Built-in Microphone (input)
Built-in Output (output)
HDMI (output)
HDMI (output)

If I run -s HDMI, it may or may not switch to the right device.

Is there some way to distinguish the devices?

SportySeb commented 8 years ago

I run into the same issue. I have two equal USB-sound-adapter from Logitech and need to switch between each other. Unfortunatly they are shown with exactly the same name in the list of available devices.

Is there any solution to get it work also in my case ?

Thank you in advance

Hokie333 commented 8 years ago

do $ ./SwitchAudioSource -s (name of device)

which will select the first device with that name, then

$ ./SwitchAudioSource -n

that'll select the next device in the -a list, which will probably be the one you want. I have 2 "Line Out"s (the second one being the one I need), and this works for me. Hopefully your devices are always consistent like mine are.