]> 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 e81f747b22183b7dcf9c990fe6331c7e8af9249c..88076aa4532bd1b71ece4ae1e63ab24c30b242e6 100644 (file)
 #define AOUT_VOLUME_DEFAULT             256
 #define AOUT_VOLUME_MAX                 512
 
-VLC_API audio_volume_t aout_VolumeGet( vlc_object_t * );
+VLC_API float aout_VolumeGet( vlc_object_t * );
 #define aout_VolumeGet(a) aout_VolumeGet(VLC_OBJECT(a))
-VLC_API int aout_VolumeSet( vlc_object_t *, audio_volume_t );
+VLC_API int aout_VolumeSet( vlc_object_t *, float );
 #define aout_VolumeSet(a, b) aout_VolumeSet(VLC_OBJECT(a), b)
-VLC_API int aout_VolumeUp( vlc_object_t *, int, audio_volume_t * );
+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_ToggleMute( vlc_object_t *, audio_volume_t * );
-#define aout_ToggleMute(a, b) aout_ToggleMute(VLC_OBJECT(a), b)
-VLC_API int aout_SetMute( vlc_object_t *, audio_volume_t *, bool );
-VLC_API bool aout_IsMuted( vlc_object_t * );
+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 ) \