[vlc-commits] aout_MuteSet: fix name and remove unused parameter

Rémi Denis-Courmont git at videolan.org
Tue Jul 3 17:04:14 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jul  1 20:45:25 2012 +0300| [297280a2108881149483bf524bff4619e3d4686a] | committer: Rémi Denis-Courmont

aout_MuteSet: fix name and remove unused parameter

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

 include/vlc_aout_intf.h                          |    3 ++-
 lib/audio.c                                      |    2 +-
 modules/gui/qt4/components/controller_widget.cpp |    2 +-
 src/audio_output/intf.c                          |   10 ++++------
 src/libvlccore.sym                               |    2 +-
 5 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/include/vlc_aout_intf.h b/include/vlc_aout_intf.h
index b31d980..e889ef1 100644
--- a/include/vlc_aout_intf.h
+++ b/include/vlc_aout_intf.h
@@ -38,7 +38,8 @@ VLC_API int aout_VolumeUp( vlc_object_t *, int, audio_volume_t * );
 #define aout_VolumeDown(a, b, c) aout_VolumeUp(a, -(b), c)
 VLC_API int aout_MuteToggle( vlc_object_t * );
 #define aout_MuteToggle(a) aout_MuteToggle(VLC_OBJECT(a))
-VLC_API int aout_SetMute( vlc_object_t *, audio_volume_t *, bool );
+VLC_API int aout_MuteSet( vlc_object_t *, bool );
+#define aout_MuteSet(a, b) aout_MuteSet(VLC_OBJECT(a), b)
 VLC_API bool aout_IsMuted( vlc_object_t * );
 
 VLC_API void aout_EnableFilter( vlc_object_t *, const char *, bool );
diff --git a/lib/audio.c b/lib/audio.c
index 7a5a288..91e96b1 100644
--- a/lib/audio.c
+++ b/lib/audio.c
@@ -323,7 +323,7 @@ int libvlc_audio_get_mute( libvlc_media_player_t *mp )
 
 void libvlc_audio_set_mute( libvlc_media_player_t *mp, int mute )
 {
-    aout_SetMute( VLC_OBJECT(mp), NULL, !!mute );
+    aout_MuteSet( VLC_OBJECT(mp), mute != 0 );
 }
 
 /*****************************************************************************
diff --git a/modules/gui/qt4/components/controller_widget.cpp b/modules/gui/qt4/components/controller_widget.cpp
index 7f973c0..25163cd 100644
--- a/modules/gui/qt4/components/controller_widget.cpp
+++ b/modules/gui/qt4/components/controller_widget.cpp
@@ -204,7 +204,7 @@ void SoundWidget::setMuted( bool mute )
 {
     b_is_muted = mute;
     playlist_t *p_playlist = pl_Get( p_intf );
-    aout_SetMute( VLC_OBJECT(p_playlist), NULL, mute );
+    aout_MuteSet( VLC_OBJECT(p_playlist), mute );
 }
 
 bool SoundWidget::eventFilter( QObject *obj, QEvent *e )
diff --git a/src/audio_output/intf.c b/src/audio_output/intf.c
index 7f61e7b..1182ea6 100644
--- a/src/audio_output/intf.c
+++ b/src/audio_output/intf.c
@@ -187,6 +187,7 @@ int aout_VolumeUp (vlc_object_t *obj, int value, audio_volume_t *volp)
 int aout_MuteToggle (vlc_object_t *obj)
 {
     audio_output_t *aout;
+    float vol;
     bool mute;
 
     prepareVolume (obj, &aout, &vol, &mute);
@@ -207,20 +208,17 @@ bool aout_IsMuted (vlc_object_t *obj)
     return mute;
 }
 
+#undef aout_MuteSet
 /**
  * Sets mute status.
  */
-int aout_SetMute (vlc_object_t *obj, audio_volume_t *volp, bool mute)
+int aout_MuteSet (vlc_object_t *obj, bool mute)
 {
     audio_output_t *aout;
-    int ret;
     float vol;
 
     prepareVolume (obj, &aout, &vol, NULL);
-    ret = commitVolume (obj, aout, vol, mute);
-    if (volp != NULL)
-        *volp = mute ? 0 : lroundf (vol * AOUT_VOLUME_DEFAULT);
-    return ret;
+    return commitVolume (obj, aout, vol, mute);
 }
 
 
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 6e8c49e..45c8494 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -18,8 +18,8 @@ aout_VolumeGet
 aout_VolumeSet
 aout_VolumeUp
 aout_MuteToggle
+aout_MuteSet
 aout_IsMuted
-aout_SetMute
 aout_VolumeSoftInit
 aout_VolumeHardInit
 block_Alloc



More information about the vlc-commits mailing list