diff --git a/Audio/Helper.m b/Audio/Helper.m index 48998e6e6..ee2662ed6 100644 --- a/Audio/Helper.m +++ b/Audio/Helper.m @@ -17,11 +17,11 @@ //Input/Output values are in percents. double logarithmicToLinear(double logarithmic, double MAX_VOLUME) { - return pow((logarithmic/MAX_VOLUME), 0.25) * 100.0; + return (MAX_VOLUME == 100.0) ? logarithmic : pow((logarithmic/MAX_VOLUME), 0.25) * 100.0; } double linearToLogarithmic(double linear, double MAX_VOLUME) { - return (linear/100.0) * (linear/100.0) * (linear/100.0) * (linear/100.0) * MAX_VOLUME; + return (MAX_VOLUME == 100.0) ? linear : (linear/100.0) * (linear/100.0) * (linear/100.0) * (linear/100.0) * MAX_VOLUME; } //End helper volume function thingies. ONWARDS TO GLORY! diff --git a/Base.lproj/MainMenu.xib b/Base.lproj/MainMenu.xib index f9f02832a..be0991ad4 100644 --- a/Base.lproj/MainMenu.xib +++ b/Base.lproj/MainMenu.xib @@ -2119,7 +2119,7 @@ Gw - + diff --git a/Window/VolumeSlider.m b/Window/VolumeSlider.m index b8f351ab5..8c8522c26 100644 --- a/Window/VolumeSlider.m +++ b/Window/VolumeSlider.m @@ -59,13 +59,8 @@ - (void)updateToolTip { double value = [self doubleValue]; - BOOL volumeLimit = [[[NSUserDefaultsController sharedUserDefaultsController] defaults] boolForKey:@"volumeLimit"]; double volume; - if (volumeLimit) { - volume = (value - self.minValue) * (MAX_VOLUME / (self.maxValue - self.minValue)); - } else { - volume = linearToLogarithmic(value, MAX_VOLUME); - } + volume = linearToLogarithmic(value, MAX_VOLUME); NSString *text = [NSString stringWithFormat:@"%0.lf%%", volume];