Audio input / output selector widget

Hey everyone,

Has anyone seen or implemented an audio input/output selector preset for the touch bar yet? I've been using a very basic shell script to toggle between two output/inputs, but want to get more advanced with a touchbar group for selecting the one I want to use, and I was wondering if anyone else has done anything similar yet. I'm using SwitchAudioSource from brew install switchaudio-osx in my shell script.

Have the same request.

Looking for a solution, to have a button on my touchbar to change the audio output.

until now, I have to click on the volume icon in the menu bar, after that I have to click on the preffert airplay device.....

Sounds simple. But i havent found a solution yet.....

What I've tried:

  1. Create a new Button (Name "Receiver", it's an aTV just for audio transmission)
  2. As action I choosed "execute terminal comand (asyncron)"
    command "SwitchAudioSource -s Receiver"
  3. Saved everything, but nothing happend... :frowning:

If I execute the command in a terminal windows it says: "Could not find an audio device named "Receiver" of type output. Nothing was changed."

Checked name with "SwitchAudioSource -a" -> name is correct.

If I choose an internat output like my headphone or a software called "Boom2Device" it works, in a terminal window.
Touchbar button still don't work... Even if I try to change to an internal output

tried it out with a bluetooth speaker and it does seem to work if you put quotation marks around the name (e.g. switchaudiosource -s "Receiver")

You want to stream from what source? Because you can set what you want easily with Apple script for iTunes.