[vlc-commits] Qt4: clean volume step computation

Rémi Denis-Courmont git at videolan.org
Fri Jul 20 16:58:40 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jul 20 17:38:18 2012 +0300| [8f6a01586a7aa72a9520dfdcd1a45b8ef03e0c09] | committer: Rémi Denis-Courmont

Qt4: clean volume step computation

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8f6a01586a7aa72a9520dfdcd1a45b8ef03e0c09
---

 modules/gui/qt4/util/input_slider.cpp |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt4/util/input_slider.cpp b/modules/gui/qt4/util/input_slider.cpp
index 3eaa9ce..3380763 100644
--- a/modules/gui/qt4/util/input_slider.cpp
+++ b/modules/gui/qt4/util/input_slider.cpp
@@ -439,7 +439,8 @@ SoundSlider::SoundSlider( QWidget *_parent, int _i_step,
                           char *psz_colors )
                         : QAbstractSlider( _parent )
 {
-    f_step = ( _i_step * 100 ) / AOUT_VOLUME_MAX ;
+    f_step = (float)(_i_step * 10000)
+           / (float)((SOUNDMAX - SOUNDMIN) * AOUT_VOLUME_DEFAULT);
     setRange( SOUNDMIN, SOUNDMAX );
     setMouseTracking( true );
     isSliding = false;



More information about the vlc-commits mailing list