mirror of
https://github.com/Toxblh/MTMR.git
synced 2026-01-11 09:28:38 +00:00
Replaced deprecated object to supported version
This commit is contained in:
parent
05fda273cd
commit
f54be6cea7
@ -19,7 +19,7 @@
|
|||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>0.27</string>
|
<string>0.27</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>434</string>
|
<string>437</string>
|
||||||
<key>LSApplicationCategoryType</key>
|
<key>LSApplicationCategoryType</key>
|
||||||
<string>public.app-category.utilities</string>
|
<string>public.app-category.utilities</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
|||||||
@ -10,7 +10,7 @@ class VolumeViewController: NSCustomTouchBarItem {
|
|||||||
super.init(identifier: identifier)
|
super.init(identifier: identifier)
|
||||||
|
|
||||||
var forPropertyAddress = AudioObjectPropertyAddress(
|
var forPropertyAddress = AudioObjectPropertyAddress(
|
||||||
mSelector: kAudioHardwareServiceDeviceProperty_VirtualMasterVolume,
|
mSelector: kAudioHardwareServiceDeviceProperty_VirtualMainVolume,
|
||||||
mScope: kAudioDevicePropertyScopeOutput,
|
mScope: kAudioDevicePropertyScopeOutput,
|
||||||
mElement: kAudioObjectPropertyElementMaster
|
mElement: kAudioObjectPropertyElementMaster
|
||||||
)
|
)
|
||||||
@ -66,7 +66,7 @@ class VolumeViewController: NSCustomTouchBarItem {
|
|||||||
var volume: Float32 = 0.5
|
var volume: Float32 = 0.5
|
||||||
var size: UInt32 = UInt32(MemoryLayout.size(ofValue: volume))
|
var size: UInt32 = UInt32(MemoryLayout.size(ofValue: volume))
|
||||||
var address: AudioObjectPropertyAddress = AudioObjectPropertyAddress()
|
var address: AudioObjectPropertyAddress = AudioObjectPropertyAddress()
|
||||||
address.mSelector = AudioObjectPropertySelector(kAudioHardwareServiceDeviceProperty_VirtualMasterVolume)
|
address.mSelector = AudioObjectPropertySelector(kAudioHardwareServiceDeviceProperty_VirtualMainVolume)
|
||||||
address.mScope = AudioObjectPropertyScope(kAudioDevicePropertyScopeOutput)
|
address.mScope = AudioObjectPropertyScope(kAudioDevicePropertyScopeOutput)
|
||||||
address.mElement = AudioObjectPropertyElement(kAudioObjectPropertyElementMaster)
|
address.mElement = AudioObjectPropertyElement(kAudioObjectPropertyElementMaster)
|
||||||
AudioObjectGetPropertyData(defaultDeviceID, &address, 0, nil, &size, &volume)
|
AudioObjectGetPropertyData(defaultDeviceID, &address, 0, nil, &size, &volume)
|
||||||
@ -86,7 +86,7 @@ class VolumeViewController: NSCustomTouchBarItem {
|
|||||||
var address: AudioObjectPropertyAddress = AudioObjectPropertyAddress()
|
var address: AudioObjectPropertyAddress = AudioObjectPropertyAddress()
|
||||||
address.mScope = AudioObjectPropertyScope(kAudioDevicePropertyScopeOutput)
|
address.mScope = AudioObjectPropertyScope(kAudioDevicePropertyScopeOutput)
|
||||||
address.mElement = AudioObjectPropertyElement(kAudioObjectPropertyElementMaster)
|
address.mElement = AudioObjectPropertyElement(kAudioObjectPropertyElementMaster)
|
||||||
address.mSelector = AudioObjectPropertySelector(kAudioHardwareServiceDeviceProperty_VirtualMasterVolume)
|
address.mSelector = AudioObjectPropertySelector(kAudioHardwareServiceDeviceProperty_VirtualMainVolume)
|
||||||
return AudioObjectSetPropertyData(defaultDeviceID, &address, 0, nil, size, &inputVolume)
|
return AudioObjectSetPropertyData(defaultDeviceID, &address, 0, nil, size, &inputVolume)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user