Commit 20abd0db authored by Geoffroy Couprie's avatar Geoffroy Couprie

Skins: set the maximum volume to 1024, not 512

close #2089
parent d147daa2
...@@ -682,7 +682,7 @@ void VlcProc::on_volume_changed( vlc_object_t* p_obj, vlc_value_t newVal ) ...@@ -682,7 +682,7 @@ void VlcProc::on_volume_changed( vlc_object_t* p_obj, vlc_value_t newVal )
audio_volume_t volume; audio_volume_t volume;
aout_VolumeGet( pPlaylist, &volume ); aout_VolumeGet( pPlaylist, &volume );
SET_VOLUME( m_cVarVolume, (double)volume * 2.0 / AOUT_VOLUME_MAX, false ); SET_VOLUME( m_cVarVolume, (double)volume / AOUT_VOLUME_MAX, false );
SET_BOOL( m_cVarMute, volume == 0 ); SET_BOOL( m_cVarMute, volume == 0 );
} }
...@@ -775,7 +775,7 @@ void VlcProc::init_variables() ...@@ -775,7 +775,7 @@ void VlcProc::init_variables()
audio_volume_t volume; audio_volume_t volume;
aout_VolumeGet( pPlaylist, &volume ); aout_VolumeGet( pPlaylist, &volume );
SET_VOLUME( m_cVarVolume, (double)volume * 2.0 / AOUT_VOLUME_MAX, false ); SET_VOLUME( m_cVarVolume, (double)volume / AOUT_VOLUME_MAX, false );
SET_BOOL( m_cVarMute, volume == 0 ); SET_BOOL( m_cVarMute, volume == 0 );
update_equalizer(); update_equalizer();
......
...@@ -37,7 +37,7 @@ Volume::Volume( intf_thread_t *pIntf ): VarPercent( pIntf ) ...@@ -37,7 +37,7 @@ Volume::Volume( intf_thread_t *pIntf ): VarPercent( pIntf )
audio_volume_t val; audio_volume_t val;
aout_VolumeGet( getIntf()->p_sys->p_playlist, &val ); aout_VolumeGet( getIntf()->p_sys->p_playlist, &val );
VarPercent::set( val * 2.0 / AOUT_VOLUME_MAX ); VarPercent::set( val / AOUT_VOLUME_MAX );
} }
...@@ -48,10 +48,9 @@ void Volume::set( float percentage, bool updateVLC ) ...@@ -48,10 +48,9 @@ void Volume::set( float percentage, bool updateVLC )
(int)(percentage * AOUT_VOLUME_MAX) ) (int)(percentage * AOUT_VOLUME_MAX) )
{ {
VarPercent::set( percentage ); VarPercent::set( percentage );
if( updateVLC ) if( updateVLC )
aout_VolumeSet( getIntf()->p_sys->p_playlist, aout_VolumeSet( getIntf()->p_sys->p_playlist,
(int)(get() * AOUT_VOLUME_MAX / 2.0) ); (int)(get() * AOUT_VOLUME_MAX) );
} }
} }
......
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