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
57ebbaea
Commit
57ebbaea
authored
Dec 17, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Qt] SPrefs, activate the headphone filter correctly.
Remark by Babal.
parent
caafebf4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
33 deletions
+30
-33
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/components/simple_preferences.cpp
+26
-31
modules/gui/qt4/components/simple_preferences.hpp
modules/gui/qt4/components/simple_preferences.hpp
+4
-2
No files found.
modules/gui/qt4/components/simple_preferences.cpp
View file @
57ebbaea
...
@@ -292,9 +292,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
...
@@ -292,9 +292,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
CONFIG_GENERIC
(
"force-dolby-surround"
,
IntegerList
,
NULL
,
CONFIG_GENERIC
(
"force-dolby-surround"
,
IntegerList
,
NULL
,
detectionDolby
);
detectionDolby
);
CONFIG_GENERIC
(
"headphone-dolby"
,
Bool
,
NULL
,
headphoneEffect
);
CONFIG_GENERIC_NO_BOOL
(
"norm-max-level"
,
Float
,
NULL
,
CONFIG_GENERIC_NO_BOOL
(
"norm-max-level"
,
Float
,
NULL
,
volNormSpin
);
volNormSpin
);
CONFIG_GENERIC
(
"audio-visual"
,
Module
,
NULL
,
visualisation
);
CONFIG_GENERIC
(
"audio-visual"
,
Module
,
NULL
,
visualisation
);
...
@@ -314,6 +312,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
...
@@ -314,6 +312,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
/*Little mofification of ui.volumeValue to compile with Qt < 4.3 */
/*Little mofification of ui.volumeValue to compile with Qt < 4.3 */
ui
.
volumeValue
->
setButtonSymbols
(
QAbstractSpinBox
::
NoButtons
);
ui
.
volumeValue
->
setButtonSymbols
(
QAbstractSpinBox
::
NoButtons
);
optionWidgets
.
append
(
ui
.
volumeValue
);
optionWidgets
.
append
(
ui
.
volumeValue
);
optionWidgets
.
append
(
ui
.
headphoneEffect
);
updateAudioOptions
(
ui
.
outputModule
->
currentIndex
()
);
updateAudioOptions
(
ui
.
outputModule
->
currentIndex
()
);
/* LastFM */
/* LastFM */
...
@@ -335,17 +334,19 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
...
@@ -335,17 +334,19 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
ui
.
lastfm
->
hide
();
ui
.
lastfm
->
hide
();
/* Normalizer */
/* Normalizer */
CONNECT
(
ui
.
volNormBox
,
toggled
(
bool
),
ui
.
volNormSpin
,
CONNECT
(
ui
.
volNormBox
,
toggled
(
bool
),
ui
.
volNormSpin
,
setEnabled
(
bool
)
);
setEnabled
(
bool
)
);
char
*
psz
=
config_GetPsz
(
p_intf
,
"audio-filter"
);
char
*
psz
=
config_GetPsz
(
p_intf
,
"audio-filter"
);
qs_filter
=
qfu
(
psz
);
qs_filter
=
qfu
(
psz
)
.
split
(
':'
,
QString
::
SkipEmptyParts
)
;
free
(
psz
);
free
(
psz
);
bool
b_normalizer
=
(
qs_filter
.
contains
(
"volnorm"
)
);
{
bool
b_enabled
=
(
qs_filter
.
contains
(
"volnorm"
)
);
ui
.
volNormBox
->
setChecked
(
b_normalizer
);
ui
.
volNormBox
->
setChecked
(
b_enabled
);
ui
.
volNormSpin
->
setEnabled
(
b_normalizer
);
ui
.
volNormSpin
->
setEnabled
(
b_enabled
);
}
b_enabled
=
(
qs_filter
.
contains
(
"headphone"
)
);
ui
.
headphoneEffect
->
setChecked
(
b_enabled
);
/* Volume Label */
/* Volume Label */
updateAudioVolume
(
ui
.
defaultVolume
->
value
()
);
// First time init
updateAudioVolume
(
ui
.
defaultVolume
->
value
()
);
// First time init
...
@@ -658,28 +659,22 @@ void SPrefsPanel::apply()
...
@@ -658,28 +659,22 @@ void SPrefsPanel::apply()
case
SPrefsAudio
:
case
SPrefsAudio
:
{
{
bool
b_
normC
hecked
=
bool
b_
c
hecked
=
qobject_cast
<
QCheckBox
*>
(
optionWidgets
[
normalizerChB
])
->
isChecked
();
qobject_cast
<
QCheckBox
*>
(
optionWidgets
[
normalizerChB
])
->
isChecked
();
if
(
qs_filter
.
isEmpty
()
)
if
(
b_checked
&&
!
qs_filter
.
contains
(
"volnorm"
)
)
{
qs_filter
.
append
(
"volnorm"
);
/* the psz_filter is already empty, so we just append it needed */
if
(
!
b_checked
&&
qs_filter
.
contains
(
"volnorm"
)
)
if
(
b_normChecked
)
qs_filter
=
"volnorm"
;
qs_filter
.
removeAll
(
"volnorm"
);
}
else
/* Not Empty */
b_checked
=
{
qobject_cast
<
QCheckBox
*>
(
optionWidgets
[
headphoneB
])
->
isChecked
();
if
(
qs_filter
.
contains
(
"volnorm"
)
)
{
if
(
b_checked
&&
!
qs_filter
.
contains
(
"headphone"
)
)
/* The qs_filter not empty and contains "volnorm"
qs_filter
.
append
(
"headphone"
);
that we have to remove */
if
(
!
b_checked
&&
qs_filter
.
contains
(
"headphone"
)
)
if
(
!
b_normChecked
)
qs_filter
.
removeAll
(
"headphone"
);
{
qs_filter
.
remove
(
QRegExp
(
":?volnorm:?"
)
);
config_PutPsz
(
p_intf
,
"audio-filter"
,
qtu
(
qs_filter
.
join
(
":"
)
)
);
}
}
else
/* qs_filter not empty, but doesn't have volnorm inside */
if
(
b_normChecked
)
qs_filter
.
append
(
":volnorm"
);
}
config_PutPsz
(
p_intf
,
"audio-filter"
,
qtu
(
qs_filter
)
);
break
;
break
;
}
}
}
}
...
...
modules/gui/qt4/components/simple_preferences.hpp
View file @
57ebbaea
...
@@ -71,7 +71,9 @@ enum {
...
@@ -71,7 +71,9 @@ enum {
fileW
,
fileW
,
audioOutCoB
,
audioOutCoB
,
normalizerChB
,
normalizerChB
,
volLW
};
volLW
,
headphoneB
,
};
enum
{
inputLE
,
cachingCoB
};
enum
{
inputLE
,
cachingCoB
};
enum
{
skinRB
,
qtRB
};
enum
{
skinRB
,
qtRB
};
...
@@ -115,7 +117,7 @@ private:
...
@@ -115,7 +117,7 @@ private:
int
number
;
int
number
;
QList
<
QWidget
*>
optionWidgets
;
QList
<
QWidget
*>
optionWidgets
;
QString
qs_filter
;
QString
List
qs_filter
;
#ifdef WIN32
#ifdef WIN32
QList
<
QTreeWidgetItem
*>
listAsso
;
QList
<
QTreeWidgetItem
*>
listAsso
;
...
...
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