]> git.sesse.net Git - vlc/commitdiff
skins2: fix mute behaviour
authorJean-Paul Saman <jean-paul.saman@m2x.nl>
Mon, 12 Mar 2012 13:55:09 +0000 (14:55 +0100)
committerJean-Paul Saman <jean-paul.saman@m2x.nl>
Mon, 12 Mar 2012 14:43:02 +0000 (15:43 +0100)
The skins2 code checked for the audio volume to be zero. However the audio is muted with by caling
the function aout_SetMute() or aout_ToggleMute(). Use aout_IsMuted() to test for muted audio.

modules/gui/skins2/src/vlcproc.cpp

index 8e8f5f9b54a40fd4b2d7dabcd7b5f8b4e8b4d20f..c953d745338b4bbb95e0e6abe30f1f5bd1b3445d 100644 (file)
@@ -727,7 +727,8 @@ void VlcProc::on_volume_changed( vlc_object_t* p_obj, vlc_value_t newVal )
 
     audio_volume_t volume = aout_VolumeGet( pPlaylist );
     SET_VOLUME( m_cVarVolume, volume, false );
-    SET_BOOL( m_cVarMute, volume == 0 );
+    bool b_is_muted = aout_IsMuted( VLC_OBJECT(pPlaylist) );
+    SET_BOOL( m_cVarMute, b_is_muted );
 }
 
 void VlcProc::on_audio_filter_changed( vlc_object_t* p_obj, vlc_value_t newVal )
@@ -831,7 +832,8 @@ void VlcProc::init_variables()
 
     audio_volume_t volume = aout_VolumeGet( pPlaylist );
     SET_VOLUME( m_cVarVolume, volume, false );
-    SET_BOOL( m_cVarMute, volume == 0 );
+    bool b_is_muted = aout_IsMuted( VLC_OBJECT(pPlaylist) );
+    SET_BOOL( m_cVarMute, b_is_muted );
 
     update_equalizer();
 }