[vlc-devel] [PATCH] libvlc: fix volume on sound increment when muted

Francois Cartegnie fcvlcdev at free.fr
Sun Jan 10 20:57:56 CET 2010


---
 src/audio_output/intf.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/audio_output/intf.c b/src/audio_output/intf.c
index 0424b88..db55c4a 100644
--- a/src/audio_output/intf.c
+++ b/src/audio_output/intf.c
@@ -118,8 +118,9 @@ int doVolumeChanges( unsigned action, vlc_object_t * p_object, int i_nb_steps,
     {
         i_volume_step = config_GetInt( p_object->p_libvlc, "volume-step" );
 
-        i_volume = config_GetInt( p_object, "volume" )
-                   + i_volume_step * i_nb_steps;
+        if ( !b_unmute_condition )
+            i_volume = config_GetInt( p_object, "volume" );
+        i_volume += i_volume_step * i_nb_steps;
 
         if ( i_volume > AOUT_VOLUME_MAX )
             i_volume = AOUT_VOLUME_MAX;
-- 
1.6.4.4




More information about the vlc-devel mailing list