Setaudio - is a terminal command set audio output and control volume
I have added a second download link, that is just a zip file and not notarized making it possible to install on any macOs version, including Big Sur.
The setaudio distributed as a pkg file I have been able to notarize the set-audio meaning it will install on macOS Catalina with our problems. For the coming macOS Big Sur it won't install yet, since you can't notarize software for Big Sur yet., just download the zip file and approve setaudio in the security settings.
New Version: Now also supports input devices. Supports aggregated devices. Multiple arguments
How to install
Start the SetAudio.pkg and the when prompted select the directory it should install to, I recommend:
/usr/local/bin
As it is in the path and you can start setaudio from the command line without specifying the path.
Usage:
Usage: setaudio [-a] [-c] [-t type] [-n] [-s device_name] [-i device_id] [-g] [-v left_volume right_volume] [-v volume] [-m]
-a : shows all devices
-c : shows current device
-s device_name : sets the audio output device to the given device by name
-i device_id : sets the audio output device to the given device by id
-g : shows the volume for current device
-v leftvolume rightvolume : set the left and right volume for current device
-V volume : set the volume for the current device
-m mute : mute the current device
NOTE!
This is a replacement for my older AudioSwitcher but not 100% replacement. The Audioswitcher uses some functions that is deprecated and should not be used and can be removed from macOS.
Setaudio uses Core Audio instead
Update
Setaudio now support Aggregated Audio devices (several devices combined into one device)
I wrote this command to be used together with BT (Better Touch Tool) so I could easy change sound output between my headphones or speakers. In BTT you can execute a terminal command when yo for example press a key-combination, or add a button to the Touch Bar
Example: /usr/local/bin/setaudio -s "USB audio CODEC" && amply /System/Library/Sounds/Funk.aiff
BTT Homepage
improve your online experience. Take a look at the Cookie Privacy to learn more and also my Privacy Policy. By pressing Dismiss I assume you are happy to allow the use of these cookies.
Made in RapidWeaver