deweller / switchaudio-osx

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

Switching audio sources via UID no longer works on recent releases #54

Closed RickyRomero closed 1 year ago

RickyRomero commented 1 year ago

Hi, I've been having an issue with SwitchAudioSource since version 1.2.0 or so. It no longer changes audio devices on my system (which is running Ventura 13.3.1) when specified by UID. Using the name or ID still works. I installed SwitchAudioSource via Homebrew.

I don't know why this broke, but let me know if there's any troubleshooting I can perform.

➜  ~ SwitchAudioSource -a -f json
{"name": "Ricky Romero’s AirPods Max - Find My", "type": "input", "id": "129", "uid": "90-9C-4A-DC-1C-AD:input"}
{"name": "Opal C1 Audio Mic", "type": "input", "id": "121", "uid": "AppleUSBAudioEngine:Opal:Opal C1:194430109126EA1200:2"}
{"name": "OWC Thunderbolt 3 Audio Device", "type": "input", "id": "48", "uid": "AppleUSBAudioEngine:Other World Computing:OWC Thunderbolt 3 Audio Device:3400000:2"}
{"name": "MacBook Pro Microphone", "type": "input", "id": "116", "uid": "BuiltInMicrophoneDevice"}
{"name": "DELL U2720QM", "type": "output", "id": "60", "uid": "10ACBE41-0000-0000-2D1F-0104B53C2278"}
{"name": "DELL P2415Q", "type": "output", "id": "75", "uid": "10ACBEA0-0000-0000-061B-0104A5351E78"}
{"name": "Ricky Romero’s AirPods Max - Find My", "type": "output", "id": "123", "uid": "90-9C-4A-DC-1C-AD:output"}
{"name": "OWC Thunderbolt 3 Audio Device", "type": "output", "id": "54", "uid": "AppleUSBAudioEngine:Other World Computing:OWC Thunderbolt 3 Audio Device:3400000:1"}
{"name": "MacBook Pro Speakers", "type": "output", "id": "109", "uid": "BuiltInSpeakerDevice"}
➜  ~ SwitchAudioSource -u "90-9C-4A-DC-1C-AD:output"
Could not find an audio device with UID "90-9C-4A-DC-1C-AD:output" of type output.  Nothing was changed.
➜  ~ SwitchAudioSource -u "BuiltInSpeakerDevice"    
Could not find an audio device with UID "BuiltInSpeakerDevice" of type output.  Nothing was changed.
deweller commented 1 year ago

Thanks for reporting this. I just merged #53 and submitted version 1.2.2 to homebrew which should fix this.