Fix SimplyCoreAudio incompatibility (#807)

This commit is contained in:
Istvan Toth 2021-11-21 10:24:18 +01:00 committed by GitHub
parent 6fdbdc0247
commit 9792facd56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 6 deletions

View file

@ -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" */ = {

View file

@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>6965</string>
<string>6968</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>

View file

@ -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()
}

View file

@ -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) }
}
}

View file

@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>6965</string>
<string>6968</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSBackgroundOnly</key>