Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
alberti42 committed Oct 27, 2024
1 parent bf58d3a commit ac0b109
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion iTunes Volume Control/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -1673,7 +1673,7 @@ - (void)updateHideFromStatusBarHintPopover:(NSTimer*)aTimer

- (void)setHideFromStatusBarHintLabelWithSeconds:(NSUInteger)seconds
{
[_hideFromStatusBarHintLabel setStringValue:[NSString stringWithFormat:@"iTunes Volume Control will hide after %ld seconds.\n\nLaunch it again to re-show the icon.",seconds]];
[_hideFromStatusBarHintLabel setStringValue:[NSString stringWithFormat:@"Volume Control will hide after %ld seconds.\n\nLaunch it again to see the icon in the menu bar again.",seconds]];
}

#pragma mark - Music players
Expand Down
8 changes: 4 additions & 4 deletions iTunes Volume Control/ISSoundAdditions.m
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,17 @@ + (void)setSystemVolume:(float)theVolume
return;
}

//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);
//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);
if (newValue != theVolume) {
NSLog(@"Tentative volume (%5.2f) was out of range; reset to %5.2f", theVolume, newValue);
}

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

0 comments on commit ac0b109

Please sign in to comment.