Skip to content

Commit

Permalink
- Fixed bug #27
Browse files Browse the repository at this point in the history
  • Loading branch information
alberti42 committed Oct 27, 2024
1 parent 8051ceb commit 7f70a2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Controllers/ISSoundAdditions.m
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ + (void)setSystemVolume:(float)theVolume
}

//check if the new value is in the correct range - normalize it if not
newValue = theVolume > 1.0 ? 1.0 : (theVolume < 0.0 ? 0.0 : theVolume);
newValue = theVolume > 1.0 ? 1.0 : (theVolume <= 0.0 ? 0.0 : theVolume);
if (newValue != theVolume) {
NSLog(@"Tentative volume (%5.2f) was out of range; reset to %5.2f", theVolume, newValue);
}
Expand All @@ -138,7 +138,7 @@ + (void)setSystemVolume:(float)theVolume
theAddress.mScope = kAudioDevicePropertyScopeOutput;

//set the selector to mute or not by checking if under threshold and check if a mute command is available
if ( (muteValue = (newValue < THRESHOLD)) )
if ( (muteValue = (newValue <= THRESHOLD)) )
{
theAddress.mSelector = kAudioDevicePropertyMute;
hasMute = AudioObjectHasProperty(defaultDevID, &theAddress);
Expand Down

0 comments on commit 7f70a2c

Please sign in to comment.