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
476618bd
Commit
476618bd
authored
Sep 22, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix equalizer crash
parent
6880e8ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
13 deletions
+15
-13
modules/gui/qt4/components/equalizer.cpp
modules/gui/qt4/components/equalizer.cpp
+15
-13
No files found.
modules/gui/qt4/components/equalizer.cpp
View file @
476618bd
...
...
@@ -70,6 +70,7 @@ Equalizer::Equalizer( intf_thread_t *_p_intf, QWidget *_parent ) :
{
bands
[
i
]
=
new
QSlider
(
Qt
::
Vertical
);
bands
[
i
]
->
setMaximum
(
400
);
bands
[
i
]
->
setValue
(
200
);
CONNECT
(
bands
[
i
],
valueChanged
(
int
),
this
,
setBand
()
);
band_texts
[
i
]
=
new
QLabel
(
band_frequencies
[
i
]
+
"
\n
0.0dB"
);
band_texts
[
i
]
->
setFont
(
smallFont
);
...
...
@@ -196,20 +197,21 @@ void Equalizer::setBand()
void
Equalizer
::
setValues
(
char
*
psz_bands
,
float
f_preamp
)
{
char
*
p
=
psz_bands
;
for
(
int
i
=
0
;
i
<
10
;
i
++
)
if
(
p
)
{
char
psz_val
[
5
];
float
f
=
strtof
(
p
,
&
p
);
int
i_val
=
(
int
)(
(
f
+
20
)
*
10
);
bands
[
i
]
->
setValue
(
i_val
);
sprintf
(
psz_val
,
"% 5.1f"
,
f
);
band_texts
[
i
]
->
setText
(
band_frequencies
[
i
]
+
"
\n
"
+
psz_val
+
"dB"
);
if
(
p
==
NULL
)
break
;
p
++
;
if
(
*
p
==
0
)
break
;
for
(
int
i
=
0
;
i
<
10
;
i
++
)
{
char
psz_val
[
5
];
float
f
=
strtof
(
p
,
&
p
);
int
i_val
=
(
int
)(
(
f
+
20
)
*
10
);
bands
[
i
]
->
setValue
(
i_val
);
sprintf
(
psz_val
,
"% 5.1f"
,
f
);
band_texts
[
i
]
->
setText
(
band_frequencies
[
i
]
+
"
\n
"
+
psz_val
+
"dB"
);
if
(
p
==
NULL
)
break
;
p
++
;
if
(
*
p
==
0
)
break
;
}
}
char
psz_val
[
5
];
int
i_val
=
(
int
)(
(
f_preamp
+
20
)
*
10
);
...
...
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