Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
54bcbe13
Commit
54bcbe13
authored
Sep 16, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use var_GetNonEmptyString were applicable
parent
00aa3ff1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
54 deletions
+54
-54
modules/gui/macosx/equalizer.m
modules/gui/macosx/equalizer.m
+49
-49
modules/gui/wxwidgets/extrapanel.cpp
modules/gui/wxwidgets/extrapanel.cpp
+5
-5
No files found.
modules/gui/macosx/equalizer.m
View file @
54bcbe13
...
@@ -53,7 +53,7 @@ static void ChangeFiltersString( intf_thread_t *p_intf,
...
@@ -53,7 +53,7 @@ static void ChangeFiltersString( intf_thread_t *p_intf,
if
(
p_object
==
NULL
)
if
(
p_object
==
NULL
)
return
;
return
;
psz_string
=
var_GetString
(
p_object
,
"audio-filter"
);
psz_string
=
var_Get
NonEmpty
String
(
p_object
,
"audio-filter"
);
if
(
!
psz_string
)
psz_string
=
strdup
(
""
);
if
(
!
psz_string
)
psz_string
=
strdup
(
""
);
...
@@ -117,7 +117,7 @@ static vlc_bool_t GetFiltersStatus( intf_thread_t *p_intf,
...
@@ -117,7 +117,7 @@ static vlc_bool_t GetFiltersStatus( intf_thread_t *p_intf,
if
(
p_object
==
NULL
)
if
(
p_object
==
NULL
)
return
VLC_FALSE
;
return
VLC_FALSE
;
psz_string
=
var_GetString
(
p_object
,
"audio-filter"
);
psz_string
=
var_Get
NonEmpty
String
(
p_object
,
"audio-filter"
);
vlc_object_release
(
p_object
);
vlc_object_release
(
p_object
);
...
@@ -192,9 +192,9 @@ static vlc_bool_t GetFiltersStatus( intf_thread_t *p_intf,
...
@@ -192,9 +192,9 @@ static vlc_bool_t GetFiltersStatus( intf_thread_t *p_intf,
VLC_VAR_DOINHERIT
);
VLC_VAR_DOINHERIT
);
f_preamp
=
var_GetFloat
(
p_object
,
"equalizer-preamp"
);
f_preamp
=
var_GetFloat
(
p_object
,
"equalizer-preamp"
);
psz_bands
=
var_GetString
(
p_object
,
"equalizer-bands"
);
psz_bands
=
var_Get
NonEmpty
String
(
p_object
,
"equalizer-bands"
);
if
(
!
strcmp
(
psz_bands
,
""
)
)
if
(
psz_bands
==
NULL
)
psz_bands
=
strdup
(
"0 0 0 0 0 0 0 0 0 0"
);
psz_bands
=
strdup
(
"0 0 0 0 0 0 0 0 0 0"
);
b_2p
=
var_GetBool
(
p_object
,
"equalizer-2pass"
);
b_2p
=
var_GetBool
(
p_object
,
"equalizer-2pass"
);
...
@@ -404,12 +404,13 @@ static vlc_bool_t GetFiltersStatus( intf_thread_t *p_intf,
...
@@ -404,12 +404,13 @@ static vlc_bool_t GetFiltersStatus( intf_thread_t *p_intf,
var_Create
(
p_object
,
"equalizer-preset"
,
VLC_VAR_STRING
|
var_Create
(
p_object
,
"equalizer-preset"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
VLC_VAR_DOINHERIT
);
psz_preset
=
var_GetString
(
p_object
,
"equalizer-preset"
);
psz_preset
=
var_Get
NonEmpty
String
(
p_object
,
"equalizer-preset"
);
for
(
i
=
0
;
i
<
18
;
i
++
)
for
(
i
=
0
;
(
psz_preset
!=
NULL
)
&&
(
i
<
18
)
;
i
++
)
{
if
(
!
strcmp
(
preset_list
[
i
],
psz_preset
)
)
{
{
if
(
strcmp
(
preset_list
[
i
],
psz_preset
)
)
continue
;
[
o_popup_presets
selectItemAtIndex
:
i
];
[
o_popup_presets
selectItemAtIndex
:
i
];
[
o_slider_preamp
setFloatValue
:
eqz_preset_10b
[
i
]
->
f_preamp
];
[
o_slider_preamp
setFloatValue
:
eqz_preset_10b
[
i
]
->
f_preamp
];
...
@@ -431,9 +432,9 @@ static vlc_bool_t GetFiltersStatus( intf_thread_t *p_intf,
...
@@ -431,9 +432,9 @@ static vlc_bool_t GetFiltersStatus( intf_thread_t *p_intf,
if
(
strcmp
(
psz_preset
,
"flat"
)
)
if
(
strcmp
(
psz_preset
,
"flat"
)
)
{
{
char
psz_bands
[
100
];
char
psz_bands
[
100
];
memset
(
psz_bands
,
0
,
100
);
sprintf
(
psz_bands
,
"%.1f %.1f %.1f %.1f %.1f %.1f %.1f "
snprintf
(
psz_bands
,
sizeof
(
psz_bands
),
"%.1f %.1f %.1f %.1f %.1f %.1f %.1f "
"%.1f %.1f %.1f"
,
"%.1f %.1f %.1f"
,
eqz_preset_10b
[
i
]
->
f_amp
[
0
],
eqz_preset_10b
[
i
]
->
f_amp
[
0
],
eqz_preset_10b
[
i
]
->
f_amp
[
1
],
eqz_preset_10b
[
i
]
->
f_amp
[
1
],
...
@@ -455,7 +456,6 @@ static vlc_bool_t GetFiltersStatus( intf_thread_t *p_intf,
...
@@ -455,7 +456,6 @@ static vlc_bool_t GetFiltersStatus( intf_thread_t *p_intf,
var_SetString
(
p_object
,
"equalizer-bands"
,
psz_bands
);
var_SetString
(
p_object
,
"equalizer-bands"
,
psz_bands
);
}
}
}
}
}
free
(
psz_preset
);
free
(
psz_preset
);
vlc_object_release
(
p_object
);
vlc_object_release
(
p_object
);
}
}
...
...
modules/gui/wxwidgets/extrapanel.cpp
View file @
54bcbe13
...
@@ -544,10 +544,10 @@ wxPanel *ExtraPanel::EqzPanel( wxWindow *parent )
...
@@ -544,10 +544,10 @@ wxPanel *ExtraPanel::EqzPanel( wxWindow *parent )
aout_instance_t
*
p_aout
=
(
aout_instance_t
*
)
vlc_object_find
(
p_intf
,
aout_instance_t
*
p_aout
=
(
aout_instance_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_AOUT
,
FIND_ANYWHERE
);
VLC_OBJECT_AOUT
,
FIND_ANYWHERE
);
char
*
psz_af
=
NULL
;
char
*
psz_af
;
if
(
p_aout
)
if
(
p_aout
)
{
{
psz_af
=
var_GetString
(
p_aout
,
"audio-filter"
);
psz_af
=
var_Get
NonEmpty
String
(
p_aout
,
"audio-filter"
);
if
(
var_GetBool
(
p_aout
,
"equalizer-2pass"
)
)
if
(
var_GetBool
(
p_aout
,
"equalizer-2pass"
)
)
eq_2p_chkbox
->
SetValue
(
true
);
eq_2p_chkbox
->
SetValue
(
true
);
vlc_object_release
(
p_aout
);
vlc_object_release
(
p_aout
);
...
@@ -558,7 +558,7 @@ wxPanel *ExtraPanel::EqzPanel( wxWindow *parent )
...
@@ -558,7 +558,7 @@ wxPanel *ExtraPanel::EqzPanel( wxWindow *parent )
if
(
config_GetInt
(
p_intf
,
"equalizer-2pass"
)
)
if
(
config_GetInt
(
p_intf
,
"equalizer-2pass"
)
)
eq_2p_chkbox
->
SetValue
(
true
);
eq_2p_chkbox
->
SetValue
(
true
);
}
}
if
(
psz_af
!=
NULL
?
strstr
(
psz_af
,
"equalizer"
)
!=
NULL
:
VLC_FALSE
)
if
(
psz_af
!=
NULL
&&
strstr
(
psz_af
,
"equalizer"
)
)
{
{
eq_chkbox
->
SetValue
(
true
);
eq_chkbox
->
SetValue
(
true
);
}
else
{
}
else
{
...
@@ -1114,7 +1114,7 @@ static void ChangeFiltersString( intf_thread_t *p_intf,
...
@@ -1114,7 +1114,7 @@ static void ChangeFiltersString( intf_thread_t *p_intf,
if
(
p_aout
)
if
(
p_aout
)
{
{
psz_string
=
var_GetString
(
p_aout
,
"audio-filter"
);
psz_string
=
var_Get
NonEmpty
String
(
p_aout
,
"audio-filter"
);
}
}
else
else
{
{
...
...
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