mirror of
https://github.com/kyleneideck/BackgroundMusic
synced 2024-11-12 23:47:10 +00:00
Fix compiler warnings in Xcode 13.2.
This commit is contained in:
parent
f4ea06e3c3
commit
8ddfb81148
2 changed files with 7 additions and 5 deletions
|
@ -281,9 +281,11 @@ static NSString* const kMoreAppsMenuTitle = @"More Apps";
|
||||||
[((NSRunningApplication*)menuItem.representedObject).localizedName UTF8String];
|
[((NSRunningApplication*)menuItem.representedObject).localizedName UTF8String];
|
||||||
|
|
||||||
// Using this function (instead of just ==) shouldn't be necessary, but just in case.
|
// Using this function (instead of just ==) shouldn't be necessary, but just in case.
|
||||||
|
#if DEBUG
|
||||||
BOOL(^nearEnough)(CGFloat x, CGFloat y) = ^BOOL(CGFloat x, CGFloat y) {
|
BOOL(^nearEnough)(CGFloat x, CGFloat y) = ^BOOL(CGFloat x, CGFloat y) {
|
||||||
return fabs(x - y) < 0.01; // We don't need much precision.
|
return fabs(x - y) < 0.01; // We don't need much precision.
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
bool allSubviewsShowing = true;
|
bool allSubviewsShowing = true;
|
||||||
for (NSView* subview in menuItem.view.subviews) {
|
for (NSView* subview in menuItem.view.subviews) {
|
||||||
|
|
|
@ -81,7 +81,7 @@ bool BGMAudioDevice::HasSettableMasterVolume(AudioObjectPropertyScope inScope
|
||||||
bool BGMAudioDevice::HasSettableVirtualMasterVolume(AudioObjectPropertyScope inScope) const
|
bool BGMAudioDevice::HasSettableVirtualMasterVolume(AudioObjectPropertyScope inScope) const
|
||||||
{
|
{
|
||||||
AudioObjectPropertyAddress virtualMasterVolumeAddress = {
|
AudioObjectPropertyAddress virtualMasterVolumeAddress = {
|
||||||
kAudioHardwareServiceDeviceProperty_VirtualMasterVolume,
|
kAudioHardwareServiceDeviceProperty_VirtualMainVolume,
|
||||||
inScope,
|
inScope,
|
||||||
kAudioObjectPropertyElementMaster
|
kAudioObjectPropertyElementMaster
|
||||||
};
|
};
|
||||||
|
@ -220,7 +220,7 @@ bool BGMAudioDevice::GetVirtualMasterVolumeScalar(AudioObjectPropertyScope in
|
||||||
Float32& outVirtualMasterVolume) const
|
Float32& outVirtualMasterVolume) const
|
||||||
{
|
{
|
||||||
AudioObjectPropertyAddress virtualMasterVolumeAddress = {
|
AudioObjectPropertyAddress virtualMasterVolumeAddress = {
|
||||||
kAudioHardwareServiceDeviceProperty_VirtualMasterVolume,
|
kAudioHardwareServiceDeviceProperty_VirtualMainVolume,
|
||||||
inScope,
|
inScope,
|
||||||
kAudioObjectPropertyElementMaster
|
kAudioObjectPropertyElementMaster
|
||||||
};
|
};
|
||||||
|
@ -265,7 +265,7 @@ bool BGMAudioDevice::SetVirtualMasterVolumeScalar(AudioObjectPropertyScope in
|
||||||
bool didGetVirtualMasterBalance = GetVirtualMasterBalance(inScope, virtualMasterBalance);
|
bool didGetVirtualMasterBalance = GetVirtualMasterBalance(inScope, virtualMasterBalance);
|
||||||
|
|
||||||
AudioObjectPropertyAddress virtualMasterVolumeAddress = {
|
AudioObjectPropertyAddress virtualMasterVolumeAddress = {
|
||||||
kAudioHardwareServiceDeviceProperty_VirtualMasterVolume,
|
kAudioHardwareServiceDeviceProperty_VirtualMainVolume,
|
||||||
inScope,
|
inScope,
|
||||||
kAudioObjectPropertyElementMaster
|
kAudioObjectPropertyElementMaster
|
||||||
};
|
};
|
||||||
|
@ -277,7 +277,7 @@ bool BGMAudioDevice::SetVirtualMasterVolumeScalar(AudioObjectPropertyScope in
|
||||||
|
|
||||||
// Reset the balance
|
// Reset the balance
|
||||||
AudioObjectPropertyAddress virtualMasterBalanceAddress = {
|
AudioObjectPropertyAddress virtualMasterBalanceAddress = {
|
||||||
kAudioHardwareServiceDeviceProperty_VirtualMasterBalance,
|
kAudioHardwareServiceDeviceProperty_VirtualMainBalance,
|
||||||
inScope,
|
inScope,
|
||||||
kAudioObjectPropertyElementMaster
|
kAudioObjectPropertyElementMaster
|
||||||
};
|
};
|
||||||
|
@ -310,7 +310,7 @@ bool BGMAudioDevice::GetVirtualMasterBalance(AudioObjectPropertyScope inScope
|
||||||
Float32& outVirtualMasterBalance) const
|
Float32& outVirtualMasterBalance) const
|
||||||
{
|
{
|
||||||
AudioObjectPropertyAddress virtualMasterBalanceAddress = {
|
AudioObjectPropertyAddress virtualMasterBalanceAddress = {
|
||||||
kAudioHardwareServiceDeviceProperty_VirtualMasterBalance,
|
kAudioHardwareServiceDeviceProperty_VirtualMainBalance,
|
||||||
inScope,
|
inScope,
|
||||||
kAudioObjectPropertyElementMaster
|
kAudioObjectPropertyElementMaster
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue