switchaudio-osx
switchaudio-osx copied to clipboard
Fix build when run on pre-macOS Monterey
When run on macOS versions before Monterey (12.0), the kAudioObjectPropertyElementMain
constant does not exist, resulting in a failed build. This is equivalent to the deprecated kAudioObjectPropertyElementMaster
constant, which does work. This PR adds a #ifndef
to use the old constant pre-Monterey which fixes builds on older macOS versions (e.g. Catalina and Big Sur).