Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
78e9ac23
Commit
78e9ac23
authored
Aug 23, 2011
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: store index of eq set in the menuitems' tags instead of relying on their order
parent
3257c6c0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
52 deletions
+42
-52
modules/gui/macosx/AudioEffects.m
modules/gui/macosx/AudioEffects.m
+30
-34
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+3
-0
modules/gui/macosx/macosx.m
modules/gui/macosx/macosx.m
+9
-18
No files found.
modules/gui/macosx/AudioEffects.m
View file @
78e9ac23
...
...
@@ -68,8 +68,11 @@ static VLCAudioEffects *_o_sharedInstance = nil;
[
o_eq_twopass_ckb
setTitle
:
_NS
(
"2 Pass"
)];
[
o_eq_preamp_lbl
setStringValue
:
_NS
(
"Preamp"
)];
[
o_eq_presets_popup
removeAllItems
];
for
(
int
i
=
0
;
i
<
18
;
i
++
)
[
o_eq_presets_popup
insertItemWithTitle
:
_NS
(
preset_list_text
[
i
])
atIndex
:
i
];
for
(
int
i
=
0
;
i
<
NB_PRESETS
;
i
++
)
{
[
o_eq_presets_popup
addItemWithTitle
:
_NS
(
preset_list_text
[
i
])];
[[
o_eq_presets_popup
lastItem
]
setTag
:
i
];
}
/* Compressor */
[
o_comp_enable_ckb
setTitle
:
_NS
(
"Enable dynamic range compressor"
)];
...
...
@@ -185,26 +188,23 @@ static bool GetEqualizerStatus( intf_thread_t *p_custom_intf,
-
(
void
)
setupEqualizer
{
int
i
;
vlc_object_t
*
p_object
=
VLC_OBJECT
(
getAout
());
if
(
p_object
==
NULL
)
p_object
=
vlc_object_hold
(
pl_Get
(
VLCIntf
)
);
p_object
=
pl_Get
(
VLCIntf
);
if
(
p_object
)
{
char
*
psz_preset
;
var_Create
(
p_object
,
"equalizer-preset"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_object
,
"equalizer-preset"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
psz_preset
=
var_GetNonEmptyString
(
p_object
,
"equalizer-preset"
);
for
(
i
=
0
;
i
<
NB_PRESETS
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
NB_PRESETS
;
i
++
)
{
if
(
strcmp
(
preset_list
[
i
],
psz_preset
)
)
continue
;
[
o_eq_presets_popup
selectItemAtIndex
:
i
];
[
o_eq_presets_popup
selectItemWithTag
:
i
];
[
o_eq_preamp_sld
setFloatValue
:
eqz_preset_10b
[
i
].
f_preamp
];
[
self
setBandSlidersValues
:
(
float
*
)
eqz_preset_10b
[
i
].
f_amp
];
...
...
@@ -227,17 +227,13 @@ static bool GetEqualizerStatus( intf_thread_t *p_custom_intf,
eqz_preset_10b
[
i
].
f_amp
[
8
],
eqz_preset_10b
[
i
].
f_amp
[
9
]
);
var_Create
(
p_object
,
"equalizer-preamp"
,
VLC_VAR_FLOAT
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_object
,
"equalizer-bands"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
var_SetFloat
(
p_object
,
"equalizer-preamp"
,
eqz_preset_10b
[
i
].
f_preamp
);
var_Create
(
p_object
,
"equalizer-preamp"
,
VLC_VAR_FLOAT
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_object
,
"equalizer-bands"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
var_SetFloat
(
p_object
,
"equalizer-preamp"
,
eqz_preset_10b
[
i
].
f_preamp
);
var_SetString
(
p_object
,
"equalizer-bands"
,
psz_bands
);
}
}
free
(
psz_preset
);
vlc_object_release
(
p_object
);
}
[
self
equalizerUpdated
];
...
...
@@ -248,7 +244,6 @@ static bool GetEqualizerStatus( intf_thread_t *p_custom_intf,
float
f_preamp
,
f_band
[
10
];
char
*
psz_bands
,
*
psz_bands_init
,
*
p_next
;
bool
b_2p
;
int
i
;
bool
b_enabled
=
GetEqualizerStatus
(
p_intf
,
(
char
*
)
"equalizer"
);
vlc_object_t
*
p_object
=
VLC_OBJECT
(
getAout
());
...
...
@@ -276,7 +271,7 @@ static bool GetEqualizerStatus( intf_thread_t *p_custom_intf,
/* Set the bands slider */
psz_bands_init
=
psz_bands
;
for
(
i
=
0
;
i
<
10
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
10
;
i
++
)
{
/* Read dB -20/20 */
f_band
[
i
]
=
strtof
(
psz_bands
,
&
p_next
);
...
...
@@ -368,27 +363,28 @@ static bool GetEqualizerStatus( intf_thread_t *p_custom_intf,
vlc_object_t
*
p_object
=
VLC_OBJECT
(
getAout
());
if
(
p_object
==
NULL
)
p_object
=
vlc_object_hold
(
pl_Get
(
p_intf
));
NSInteger
numberOfChosenPreset
=
[[
sender
selectedItem
]
tag
];
var_SetString
(
p_object
,
"equalizer-preset"
,
preset_list
[
[
sender
indexOfSelectedItem
]
]
);
var_SetString
(
p_object
,
"equalizer-preset"
,
preset_list
[
numberOfChosenPreset
]
);
NSString
*
preset
=
@""
;
const
char
*
psz_values
;
for
(
int
i
=
0
;
i
<
EQZ_BANDS_MAX
;
i
++
)
{
preset
=
[
preset
stringByAppendingFormat
:
@"%.1f "
,
eqz_preset_10b
[
[
sender
indexOfSelectedItem
]
].
f_amp
[
i
]
];
preset
=
[
preset
stringByAppendingFormat
:
@"%.1f "
,
eqz_preset_10b
[
numberOfChosenPreset
].
f_amp
[
i
]
];
}
psz_values
=
[
preset
UTF8String
];
var_SetString
(
p_object
,
"equalizer-bands"
,
psz_values
);
var_SetFloat
(
p_object
,
"equalizer-preamp"
,
eqz_preset_10b
[[
sender
indexOfSelectedItem
]].
f_preamp
);
var_SetFloat
(
p_object
,
"equalizer-preamp"
,
eqz_preset_10b
[[
[
sender
selectedItem
]
tag
]].
f_preamp
);
[
o_eq_preamp_sld
setFloatValue
:
eqz_preset_10b
[
[
sender
indexOfSelectedItem
]
].
f_preamp
];
[
o_eq_preamp_sld
setFloatValue
:
eqz_preset_10b
[
numberOfChosenPreset
].
f_preamp
];
[
self
setBandSlidersValues
:(
float
*
)
eqz_preset_10b
[
[
sender
indexOfSelectedItem
]
].
f_amp
];
[
self
setBandSlidersValues
:(
float
*
)
eqz_preset_10b
[
numberOfChosenPreset
].
f_amp
];
/* save changed to config */
config_PutPsz
(
p_intf
,
"equalizer-bands"
,
psz_values
);
config_PutFloat
(
p_intf
,
"equalizer-preamp"
,
eqz_preset_10b
[
[
sender
indexOfSelectedItem
]
].
f_preamp
);
config_PutPsz
(
p_intf
,
"equalizer-preset"
,
preset_list
[
[
sender
indexOfSelectedItem
]
]
);
config_PutFloat
(
p_intf
,
"equalizer-preamp"
,
eqz_preset_10b
[
numberOfChosenPreset
].
f_preamp
);
config_PutPsz
(
p_intf
,
"equalizer-preset"
,
preset_list
[
numberOfChosenPreset
]
);
vlc_object_release
(
p_object
);
}
...
...
modules/gui/macosx/intf.m
View file @
78e9ac23
...
...
@@ -664,6 +664,9 @@ static VLCMain *_o_sharedMainInstance = nil;
if
(
!
p_intf
)
return
;
// save stuff
config_SaveConfigFile
(
p_intf
);
// don't allow a double termination call. If the user has
// already invoked the quit then simply return this time.
int
isTerminating
=
false
;
...
...
modules/gui/macosx/macosx.m
View file @
78e9ac23
...
...
@@ -97,18 +97,12 @@ vlc_module_begin ()
set_category( CAT_INTERFACE )
set_subcategory( SUBCAT_INTERFACE_MAIN )
cannot_unload_broken_library( )
add_bool( "macosx-autoplay", true, AUTOPLAY_OSX_TEST, AUTOPLAY_OSX_LONGTEXT,
false )
add_bool( "macosx-recentitems", true, RECENT_ITEMS_TEXT, RECENT_ITEMS_LONGTEXT,
false )
add_bool( "macosx-fspanel", true, FSPANEL_TEXT, FSPANEL_LONGTEXT,
false )
add_bool( "macosx-appleremote", true, USE_APPLE_REMOTE_TEXT, USE_APPLE_REMOTE_LONGTEXT,
false )
add_bool( "macosx-mediakeys", true, USE_MEDIAKEYS_TEXT, USE_MEDIAKEYS_LONGTEXT,
false )
add_bool( "macosx-interfacestyle", true, INTERFACE_STYLE_TEXT, INTERFACE_STYLE_LONGTEXT,
false )
add_bool( "macosx-autoplay", true, AUTOPLAY_OSX_TEST, AUTOPLAY_OSX_LONGTEXT, false )
add_bool( "macosx-recentitems", true, RECENT_ITEMS_TEXT, RECENT_ITEMS_LONGTEXT, false )
add_bool( "macosx-fspanel", true, FSPANEL_TEXT, FSPANEL_LONGTEXT, false )
add_bool( "macosx-appleremote", true, USE_APPLE_REMOTE_TEXT, USE_APPLE_REMOTE_LONGTEXT, false )
add_bool( "macosx-mediakeys", true, USE_MEDIAKEYS_TEXT, USE_MEDIAKEYS_LONGTEXT, false )
add_bool( "macosx-interfacestyle", true, INTERFACE_STYLE_TEXT, INTERFACE_STYLE_LONGTEXT, false )
add_bool( "macosx-nativefullscreenmode", true, NATIVE_FULLSCREEN_MODE_ON_LION_TEXT, NATIVE_FULLSCREEN_MODE_ON_LION_LONGTEXT, false )
add_obsolete_bool( "macosx-stretch" ) /* since 1.2.0 */
add_obsolete_bool( "macosx-background" ) /* since 1.2.0 */
...
...
@@ -119,11 +113,8 @@ vlc_module_begin ()
set_capability( "vout window nsobject", 100 )
set_callbacks( WindowOpen, WindowClose )
add_integer( "macosx-vdev", 0, VDEV_TEXT, VDEV_LONGTEXT,
false )
add_float_with_range( "macosx-opaqueness", 1, 0, 1,
OPAQUENESS_TEXT, OPAQUENESS_LONGTEXT, true );
add_bool( "macosx-black", true, BLACK_TEXT, BLACK_LONGTEXT,
false )
add_integer( "macosx-vdev", 0, VDEV_TEXT, VDEV_LONGTEXT, false )
add_float_with_range( "macosx-opaqueness", 1, 0, 1, OPAQUENESS_TEXT, OPAQUENESS_LONGTEXT, true );
add_bool( "macosx-black", true, BLACK_TEXT, BLACK_LONGTEXT, false )
vlc_module_end ()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment