[vlc-commits] aout: remove aout_MuteToggle()
Rémi Denis-Courmont
git at videolan.org
Thu Nov 1 18:26:12 CET 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Nov 1 19:16:12 2012 +0200| [7dba440e2ba695278337fe0a250264234043fb91] | committer: Rémi Denis-Courmont
aout: remove aout_MuteToggle()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7dba440e2ba695278337fe0a250264234043fb91
---
include/vlc_aout_intf.h | 9 ---------
lib/audio.c | 4 +++-
2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/include/vlc_aout_intf.h b/include/vlc_aout_intf.h
index 248d7f3..204f8bc 100644
--- a/include/vlc_aout_intf.h
+++ b/include/vlc_aout_intf.h
@@ -38,13 +38,4 @@ VLC_API int aout_MuteSet( vlc_object_t *, bool );
VLC_API int aout_MuteGet( vlc_object_t * );
#define aout_MuteGet(a) aout_MuteGet(VLC_OBJECT(a))
-static inline int aout_MuteToggle (vlc_object_t *obj)
-{
- int val = aout_MuteGet (obj);
- if (val >= 0)
- val = aout_MuteSet (obj, !val);
- return val;
-}
-#define aout_MuteToggle(a) aout_MuteToggle(VLC_OBJECT(a))
-
#endif /* _VLC_AOUT_H */
diff --git a/lib/audio.c b/lib/audio.c
index 7ae1966..3183ad9 100644
--- a/lib/audio.c
+++ b/lib/audio.c
@@ -249,7 +249,9 @@ void libvlc_audio_output_set_device_type( libvlc_media_player_t *mp,
void libvlc_audio_toggle_mute( libvlc_media_player_t *mp )
{
- aout_MuteToggle( mp );
+ int mute = libvlc_audio_get_mute( mp );
+ if( mute != -1 )
+ libvlc_audio_set_mute( mp, !mute );
}
int libvlc_audio_get_mute( libvlc_media_player_t *mp )
More information about the vlc-commits
mailing list