[vlc-commits] skins2: fix mute behaviour

Jean-Paul Saman git at videolan.org
Mon Mar 12 15:46:01 CET 2012


vlc | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Mon Mar 12 14:55:09 2012 +0100| [4f96ae4a9bf70543b421e1b039cad0356a696b92] | committer: Jean-Paul Saman

skins2: fix mute behaviour

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.

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

 modules/gui/skins2/src/vlcproc.cpp |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/gui/skins2/src/vlcproc.cpp b/modules/gui/skins2/src/vlcproc.cpp
index 8e8f5f9..c953d74 100644
--- a/modules/gui/skins2/src/vlcproc.cpp
+++ b/modules/gui/skins2/src/vlcproc.cpp
@@ -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();
 }



More information about the vlc-commits mailing list