Commit ddf080f5 authored by David Fuhrmann's avatar David Fuhrmann

macosx: set max volume as configuable

no new strings.

close #8628
parent 8fd45605
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
@interface VLCCoreInteraction : NSObject { @interface VLCCoreInteraction : NSObject {
int i_currentPlaybackRate; int i_currentPlaybackRate;
mtime_t timeA, timeB; mtime_t timeA, timeB;
float f_maxVolume;
} }
+ (VLCCoreInteraction *)sharedInstance; + (VLCCoreInteraction *)sharedInstance;
@property (readwrite) int volume; @property (readwrite) int volume;
......
...@@ -558,7 +558,11 @@ static VLCCoreInteraction *_o_sharedInstance = nil; ...@@ -558,7 +558,11 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
- (float)maxVolume - (float)maxVolume
{ {
return 1.2 * AOUT_VOLUME_DEFAULT; if (f_maxVolume == 0.) {
f_maxVolume = (float)var_InheritInteger(VLCIntf, "macosx-max-volume") / 100. * AOUT_VOLUME_DEFAULT;
}
return f_maxVolume;
} }
#pragma mark - #pragma mark -
......
...@@ -128,6 +128,9 @@ static const char *const itunes_list_text[] = { ...@@ -128,6 +128,9 @@ static const char *const itunes_list_text[] = {
N_("Do nothing"), N_("Pause iTunes"), N_("Pause and resume iTunes") N_("Do nothing"), N_("Pause iTunes"), N_("Pause and resume iTunes")
}; };
#define VOLUME_MAX_TEXT N_("Maximum Volume displayed")
vlc_module_begin() vlc_module_begin()
set_description(N_("Mac OS X interface")) set_description(N_("Mac OS X interface"))
set_capability("interface", 200) set_capability("interface", 200)
...@@ -144,6 +147,7 @@ vlc_module_begin() ...@@ -144,6 +147,7 @@ vlc_module_begin()
add_bool("macosx-show-playmode-buttons", false, PLAYMODEBUTTONS_TEXT, PLAYMODEBUTTONS_LONGTEXT, false) add_bool("macosx-show-playmode-buttons", false, PLAYMODEBUTTONS_TEXT, PLAYMODEBUTTONS_LONGTEXT, false)
add_bool("macosx-show-effects-button", false, EFFECTSBUTTON_TEXT, EFFECTSBUTTON_LONGTEXT, false) add_bool("macosx-show-effects-button", false, EFFECTSBUTTON_TEXT, EFFECTSBUTTON_LONGTEXT, false)
add_bool("macosx-show-sidebar", true, SIDEBAR_TEXT, SIDEBAR_LONGTEXT, false) add_bool("macosx-show-sidebar", true, SIDEBAR_TEXT, SIDEBAR_LONGTEXT, false)
add_integer_with_range("macosx-max-volume", 125, 60, 200, VOLUME_MAX_TEXT, VOLUME_MAX_TEXT, true)
set_section(N_("Behavior"), 0) set_section(N_("Behavior"), 0)
add_bool("macosx-autoplay", true, AUTOPLAY_OSX_TEST, AUTOPLAY_OSX_LONGTEXT, false) add_bool("macosx-autoplay", true, AUTOPLAY_OSX_TEST, AUTOPLAY_OSX_LONGTEXT, false)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment