]> git.sesse.net Git - vlc/blobdiff - include/vlc_aout_intf.h
macosx: improve main menu handling for autogenerated items
[vlc] / include / vlc_aout_intf.h
index dbd1b3061f3d92d5492407f95c4aec8a4ab13f72..88076aa4532bd1b71ece4ae1e63ab24c30b242e6 100644 (file)
@@ -36,13 +36,20 @@ VLC_API int aout_VolumeSet( vlc_object_t *, float );
 VLC_API int aout_VolumeUp( vlc_object_t *, int, float * );
 #define aout_VolumeUp(a, b, c) aout_VolumeUp(VLC_OBJECT(a), b, c)
 #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_MuteSet( vlc_object_t *, bool );
 #define aout_MuteSet(a, b) aout_MuteSet(VLC_OBJECT(a), b)
 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))
+
 VLC_API void aout_EnableFilter( vlc_object_t *, const char *, bool );
 #define aout_EnableFilter( o, n, b ) \
         aout_EnableFilter( VLC_OBJECT(o), n, b )