Commit 304bd1e5 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: increase the granularity of the spatializer module

(cherry picked from commit eed192a415b396e36476cd9e8915c604d8ea9d40)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 98761902
...@@ -1368,19 +1368,19 @@ Spatializer::Spatializer( intf_thread_t *_p_intf, QWidget *_parent ) ...@@ -1368,19 +1368,19 @@ Spatializer::Spatializer( intf_thread_t *_p_intf, QWidget *_parent )
spatCtrl[i] = new QSlider( Qt::Vertical ); spatCtrl[i] = new QSlider( Qt::Vertical );
if( i < 2 ) if( i < 2 )
{ {
spatCtrl[i]->setMaximum( 10 ); spatCtrl[i]->setMaximum( 100 );
spatCtrl[i]->setValue( 2 ); spatCtrl[i]->setValue( 20 );
} }
else if( i < 4 ) else if( i < 4 )
{ {
spatCtrl[i]->setMaximum( 10 ); spatCtrl[i]->setMaximum( 100 );
spatCtrl[i]->setValue( 2 ); spatCtrl[i]->setValue( 20 );
spatCtrl[i]->setMinimum( -10 ); spatCtrl[i]->setMinimum( -100 );
} }
else else
{ {
spatCtrl[i]->setMaximum( 4 ); spatCtrl[i]->setMaximum( 40 );
spatCtrl[i]->setValue( 1 ); spatCtrl[i]->setValue( 10 );
} }
oldControlVars[i] = spatCtrl[i]->value(); oldControlVars[i] = spatCtrl[i]->value();
...@@ -1455,20 +1455,20 @@ void Spatializer::setValues() ...@@ -1455,20 +1455,20 @@ void Spatializer::setValues()
for( int i = 0 ; i < NUM_SP_CTRL ; i++ ) 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 ) ); ctrl_readout[i]->setText( QString::number( f, 'f', 1 ) );
} }
if( p_aout ) if( p_aout )
{ {
for( int i = 0 ; i < NUM_SP_CTRL ; i++ ) for( int i = 0 ; i < NUM_SP_CTRL ; i++ )
{ {
float f = (float)( spatCtrl[i]->value() ) / 10 ;
if( oldControlVars[i] != spatCtrl[i]->value() ) if( oldControlVars[i] != spatCtrl[i]->value() )
{ {
var_SetFloat( p_aout, spat_controls[i].psz_name, var_SetFloat( p_aout, spat_controls[i].psz_name, f );
( float )spatCtrl[i]->value() ); config_PutFloat( p_intf, spat_controls[i].psz_name, f );
config_PutFloat( p_intf, spat_controls[i].psz_name, oldControlVars[i] = spatCtrl[i]->value();
( float ) spatCtrl[i]->value() );
oldControlVars[i] = ( float ) spatCtrl[i]->value();
} }
} }
vlc_object_release( p_aout ); vlc_object_release( p_aout );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment