audioDevice
Returns the name or ID of a default audio device, or lists all of one kind.
Keyboard Maestro: AudioDevice, AudioInputDevice, AudioInputDevices, AudioInputDeviceUID, AudioOutputDevice, AudioOutputDevices, AudioOutputDeviceUID, AudioSoundEffectsDevice, AudioSoundEffectsDeviceUID
Details #
audioDevice(kind) and audioDevice(kind, what) take one or two arguments and return text.
kind is "input", "output" or "effects" ("sound" also means effects). Any other word counts as output.
what is "name" (the default) for the device's name, "uid" for its unique ID, or "list" for the names of every input or output device, one per line. "list" works for input and output only; for effects it gives the name.
Parameters #
Takes 1 to 2 arguments.
{{ audioDevice(text, b?) }}
Examples #
audioDevice("output")audioDevice("input", "list")Gotchas #
Calling it with no argument is an error:
audioDevice() takes 1 to 2 arguments, got 0.It returns empty text when there is no such device.
The ID is stable; the name can change if you rename the device.