[vlc-commits] Qt: Spatializer: add values multiplier.
Francois Cartegnie
git at videolan.org
Fri Jan 4 13:41:36 CET 2013
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Jan 4 00:59:00 2013 +0100| [7c9c04a0663d1226f1f4fbe9c7b9810f4bd0341a] | committer: Francois Cartegnie
Qt: Spatializer: add values multiplier.
For some filters, module's values may differ from the range shown to
users.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7c9c04a0663d1226f1f4fbe9c7b9810f4bd0341a
---
modules/gui/qt4/components/extended_panels.cpp | 26 ++++++++++++------------
modules/gui/qt4/components/extended_panels.hpp | 1 +
2 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp
index eba5bae..2318579 100644
--- a/modules/gui/qt4/components/extended_panels.cpp
+++ b/modules/gui/qt4/components/extended_panels.cpp
@@ -945,7 +945,7 @@ void FilterSliderData::setValue( float f )
void FilterSliderData::updateText( int i )
{
- float f = ((float) i) * p_data->f_resolution;
+ float f = ((float) i) * p_data->f_resolution * p_data->f_visual_multiplier;
valueLabel->setText( QString( p_data->units )
.prepend( "%1" )
.arg( QString::number( f, 'f', 1 ) ) );
@@ -1382,13 +1382,13 @@ Compressor::Compressor( intf_thread_t *p_intf, QWidget *parent )
i_smallfont = -2;
const FilterSliderData::slider_data_t a[7] =
{
- { "compressor-rms-peak", qtr("RMS/peak"), "", 0.0f, 1.0f, 0.00f, 0.001f },
- { "compressor-attack", qtr("Attack"), qtr(" ms"), 1.5f, 400.0f, 25.00f, 0.100f },
- { "compressor-release", qtr("Release"), qtr(" ms"), 2.0f, 800.0f, 100.00f, 0.100f },
- { "compressor-threshold", qtr("Threshold"), qtr(" dB"), -30.0f, 0.0f, -11.00f, 0.010f },
- { "compressor-ratio", qtr("Ratio"), ":1", 1.0f, 20.0f, 8.00f, 0.010f },
- { "compressor-knee", qtr("Knee\nradius"), qtr(" dB"), 1.0f, 10.0f, 2.50f, 0.010f },
- { "compressor-makeup-gain", qtr("Makeup\ngain"), qtr(" dB"), 0.0f, 24.0f, 7.00f, 0.010f },
+ { "compressor-rms-peak", qtr("RMS/peak"), "", 0.0f, 1.0f, 0.00f, 0.001f, 1.0 },
+ { "compressor-attack", qtr("Attack"), qtr(" ms"), 1.5f, 400.0f, 25.00f, 0.100f, 1.0 },
+ { "compressor-release", qtr("Release"), qtr(" ms"), 2.0f, 800.0f, 100.00f, 0.100f, 1.0 },
+ { "compressor-threshold", qtr("Threshold"), qtr(" dB"), -30.0f, 0.0f, -11.00f, 0.010f, 1.0 },
+ { "compressor-ratio", qtr("Ratio"), ":1", 1.0f, 20.0f, 8.00f, 0.010f, 1.0 },
+ { "compressor-knee", qtr("Knee\nradius"), qtr(" dB"), 1.0f, 10.0f, 2.50f, 0.010f, 1.0 },
+ { "compressor-makeup-gain", qtr("Makeup\ngain"), qtr(" dB"), 0.0f, 24.0f, 7.00f, 0.010f, 1.0 },
};
for( int i=0; i<7 ;i++ ) controls.append( a[i] );
build();
@@ -1404,11 +1404,11 @@ Spatializer::Spatializer( intf_thread_t *p_intf, QWidget *parent )
i_smallfont = -1;
const FilterSliderData::slider_data_t a[5] =
{
- { "spatializer-roomsize", qtr("Size"), "", 0.0f, 1.1f, 0.85f, 0.1f },
- { "spatializer-width", qtr("Width"), "", 0.0f, 1.0f, 1.0f, 0.1f },
- { "spatializer-wet", qtr("Wet"), "", 0.0f, 1.0f, 0.4f, 0.1f },
- { "spatializer-dry", qtr("Dry"), "", 0.0f, 1.0f, 0.5f, 0.1f },
- { "spatializer-damp", qtr("Damp"), "", 0.0f, 1.0f, 0.5f, 0.1f },
+ { "spatializer-roomsize", qtr("Size"), "", 0.0f, 1.1f, 0.85f, 0.1f, 10.0 },
+ { "spatializer-width", qtr("Width"), "", 0.0f, 1.0f, 1.0f, 0.1f, 10.0 },
+ { "spatializer-wet", qtr("Wet"), "", 0.0f, 1.0f, 0.4f, 0.1f, 10.0 },
+ { "spatializer-dry", qtr("Dry"), "", 0.0f, 1.0f, 0.5f, 0.1f, 10.0 },
+ { "spatializer-damp", qtr("Damp"), "", 0.0f, 1.0f, 0.5f, 0.1f, 10.0 },
};
for( int i=0; i<5 ;i++ ) controls.append( a[i] );
build();
diff --git a/modules/gui/qt4/components/extended_panels.hpp b/modules/gui/qt4/components/extended_panels.hpp
index 29692e6..e44e0d0 100644
--- a/modules/gui/qt4/components/extended_panels.hpp
+++ b/modules/gui/qt4/components/extended_panels.hpp
@@ -95,6 +95,7 @@ public:
float f_max; // max
float f_value; // value
float f_resolution; // resolution
+ float f_visual_multiplier; // only for display (f_value *)
} slider_data_t;
FilterSliderData( QObject *parent, intf_thread_t *p_intf,
QSlider *slider,
More information about the vlc-commits
mailing list