diff --git a/Sources/Controllers/ISSoundAdditions.m b/Sources/Controllers/ISSoundAdditions.m index 4f2297f..e9094b3 100755 --- a/Sources/Controllers/ISSoundAdditions.m +++ b/Sources/Controllers/ISSoundAdditions.m @@ -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); } @@ -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);