switchaudio-osx
switchaudio-osx copied to clipboard
Change the audio source for Mac OS X from the command line.
adding the capability to set speakers for Atmos layout not found in Audio-Midi Setup utility. 5.1.4, 7.1.2, 9.1.6 are Atmos layout found in coreaudio, however while the Audio-Midi Setup utility...
`` appears in 10.8. Fallback definitions are from https://github.com/phracker/MacOSX-SDKs/blob/041600eda65c6a668f66cb7d56b7d1da3e8bcc93/MacOSX10.8.sdk/System/Library/Frameworks/CoreAudio.framework/Versions/A/Headers/AudioHardwareDeprecated.h#L52-L53 With this it builds at least on 10.6.
When run on macOS versions before Monterey (12.0), [the `kAudioObjectPropertyElementMain` constant does not exist](https://developer.apple.com/documentation/coreaudio/kaudioobjectpropertyelementmain), resulting in a failed build. This is equivalent to [the deprecated `kAudioObjectPropertyElementMaster` constant](https://developer.apple.com/documentation/coreaudio/kaudioobjectpropertyelementmaster), which does work....