From 9792facd565f2be3f0f5b9c9cb9c222ff0163682 Mon Sep 17 00:00:00 2001 From: Istvan Toth <37590873+waydabber@users.noreply.github.com> Date: Sun, 21 Nov 2021 10:24:18 +0100 Subject: [PATCH] Fix SimplyCoreAudio incompatibility (#807) --- MonitorControl.xcodeproj/project.pbxproj | 4 ++-- MonitorControl/Info.plist | 2 +- MonitorControl/Support/AppDelegate.swift | 2 +- MonitorControl/Support/MediaKeyTapManager.swift | 2 +- MonitorControlHelper/Info.plist | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/MonitorControl.xcodeproj/project.pbxproj b/MonitorControl.xcodeproj/project.pbxproj index 15ba7ca..6f658a2 100644 --- a/MonitorControl.xcodeproj/project.pbxproj +++ b/MonitorControl.xcodeproj/project.pbxproj @@ -939,8 +939,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/rnine/SimplyCoreAudio"; requirement = { - kind = upToNextMajorVersion; - minimumVersion = 4.0.1; + kind = revision; + revision = 75970285e2470f12a569cdff68ef5a75498a4646; }; }; 6CD35F5426500008001F1344 /* XCRemoteSwiftPackageReference "MediaKeyTap" */ = { diff --git a/MonitorControl/Info.plist b/MonitorControl/Info.plist index 9031017..d587e59 100644 --- a/MonitorControl/Info.plist +++ b/MonitorControl/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 6965 + 6968 LSApplicationCategoryType public.app-category.utilities LSMinimumSystemVersion diff --git a/MonitorControl/Support/AppDelegate.swift b/MonitorControl/Support/AppDelegate.swift index 8a5eee2..d6270c2 100644 --- a/MonitorControl/Support/AppDelegate.swift +++ b/MonitorControl/Support/AppDelegate.swift @@ -284,7 +284,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { @objc func audioDeviceChanged() { if let defaultDevice = self.coreAudio.defaultOutputDevice { os_log("Default output device changed to “%{public}@”.", type: .info, defaultDevice.name) - os_log("Can device set its own volume? %{public}@", type: .info, defaultDevice.canSetVirtualMasterVolume(scope: .output).description) + os_log("Can device set its own volume? %{public}@", type: .info, defaultDevice.canSetVirtualMainVolume(scope: .output).description) } self.updateMediaKeyTap() } diff --git a/MonitorControl/Support/MediaKeyTapManager.swift b/MonitorControl/Support/MediaKeyTapManager.swift index adab913..893eb8b 100644 --- a/MonitorControl/Support/MediaKeyTapManager.swift +++ b/MonitorControl/Support/MediaKeyTapManager.swift @@ -173,7 +173,7 @@ class MediaKeyTapManager: MediaKeyTapDelegate { if DisplayManager.shared.updateAudioControlTargetDisplays(deviceName: defaultAudioDevice.name) == 0 { keys.removeAll { keysToDelete.contains($0) } } - } else if defaultAudioDevice.canSetVirtualMasterVolume(scope: .output) == true { + } else if defaultAudioDevice.canSetVirtualMainVolume(scope: .output) == true { keys.removeAll { keysToDelete.contains($0) } } } diff --git a/MonitorControlHelper/Info.plist b/MonitorControlHelper/Info.plist index f9d7f9c..680182a 100644 --- a/MonitorControlHelper/Info.plist +++ b/MonitorControlHelper/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 6965 + 6968 LSApplicationCategoryType public.app-category.utilities LSBackgroundOnly