Skip to content

deweller/switchaudio-osx

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

switchaudio-osx

A command-line utility to switch the audio source on Mac OS X.

Description

This utility switches the audio source for Mac OS X.

You specify the name of the audio source, such as Built-in Digital Output, and the utility switches the source immediately without any GUI interaction.

This is a command-line utility only and has no graphical user interface. Tested on OS 10.7 - 11.2.

Installing from homebrew

brew install switchaudio-osx

Usage

SwitchAudioSource [-a] [-c] [-f format] [-t type] [-n] -s device_name | -i device_id | -u device_uid

  • -a : shows all devices
  • -c : shows current device
  • -f format : output format (cli/human/json). Defaults to human.
  • -t type : device type (input/output/system). Defaults to output.
  • -n : cycles the audio device to the next one
  • -i device_id : sets the audio device to the given device by id
  • -u device_uid : sets the audio device to the given device by uid or a substring of the uid
  • -s device_name : sets the audio device to the given device by name

Thanks

Thanks to Christian Zuckschwerdt for migrating this to github and adding the next option.

License

MIT License, see license.txt

Copyright (c) 2008-2021 Devon Weller wellerco@gmail.com
Copyright (c) 2011 Christian Zuckschwerdt zany@triq.net

About

Change the audio source for Mac OS X from the command line.

Resources

License

Stars

Watchers

Forks

Packages

No packages published