[vlc-commits] Qt: increase the granularity of the spatializer module

Jean-Baptiste Kempf git at videolan.org
Sat Feb 25 18:08:12 CET 2012


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Feb 25 18:07:52 2012 +0100| [eed192a415b396e36476cd9e8915c604d8ea9d40] | committer: Jean-Baptiste Kempf

Qt: increase the granularity of the spatializer module

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

 modules/gui/qt4/components/extended_panels.cpp |   26 ++++++++++++------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp
index 1cfb778..63d8dcc 100644
--- a/modules/gui/qt4/components/extended_panels.cpp
+++ b/modules/gui/qt4/components/extended_panels.cpp
@@ -1366,19 +1366,19 @@ Spatializer::Spatializer( intf_thread_t *_p_intf, QWidget *_parent )
         spatCtrl[i] = new QSlider( Qt::Vertical );
         if( i < 2 )
         {
-            spatCtrl[i]->setMaximum( 10 );
-            spatCtrl[i]->setValue( 2 );
+            spatCtrl[i]->setMaximum( 100 );
+            spatCtrl[i]->setValue( 20 );
         }
         else if( i < 4 )
         {
-            spatCtrl[i]->setMaximum( 10 );
-            spatCtrl[i]->setValue( 2 );
-            spatCtrl[i]->setMinimum( -10 );
+            spatCtrl[i]->setMaximum( 100 );
+            spatCtrl[i]->setValue( 20 );
+            spatCtrl[i]->setMinimum( -100 );
         }
         else
         {
-            spatCtrl[i]->setMaximum( 4 );
-            spatCtrl[i]->setValue( 1 );
+            spatCtrl[i]->setMaximum( 40 );
+            spatCtrl[i]->setValue( 10 );
         }
 
         oldControlVars[i] = spatCtrl[i]->value();
@@ -1453,20 +1453,20 @@ void Spatializer::setValues()
 
     for( int i = 0 ; i < NUM_SP_CTRL ; i++ )
     {
-        float f = (float)(  spatCtrl[i]->value() );
+        float f = (float)( spatCtrl[i]->value() ) / 10;
         ctrl_readout[i]->setText( QString::number( f, 'f',  1 ) );
     }
+
     if( p_aout )
     {
         for( int i = 0 ; i < NUM_SP_CTRL ; i++ )
         {
+            float f = (float)( spatCtrl[i]->value() ) / 10 ;
             if( oldControlVars[i] != spatCtrl[i]->value() )
             {
-                var_SetFloat( p_aout, spat_controls[i].psz_name,
-                        ( float )spatCtrl[i]->value() );
-                config_PutFloat( p_intf, spat_controls[i].psz_name,
-                        ( float ) spatCtrl[i]->value() );
-                oldControlVars[i] = ( float ) spatCtrl[i]->value();
+                var_SetFloat( p_aout, spat_controls[i].psz_name, f );
+                config_PutFloat( p_intf, spat_controls[i].psz_name, f );
+                oldControlVars[i] = spatCtrl[i]->value();
             }
         }
         vlc_object_release( p_aout );



More information about the vlc-commits mailing list