From f779da1a5936a2e7f6c86cf80d99a076761baa80 Mon Sep 17 00:00:00 2001 From: Watcom Hecht Date: Sun, 19 Apr 2015 11:32:51 -0300 Subject: PulseAudio muted volume support (fixes #27) --- include/i3status.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/i3status.h') diff --git a/include/i3status.h b/include/i3status.h index 8fb1b79..05827a9 100644 --- a/include/i3status.h +++ b/include/i3status.h @@ -21,6 +21,9 @@ enum { O_DZEN2, #define max(a, b) ((a) > (b) ? (a) : (b)) #define DEFAULT_SINK_INDEX UINT32_MAX +#define COMPOSE_VOLUME_MUTE(vol, mute) ((vol) | ((mute) ? (1 << 30) : 0)) +#define DECOMPOSE_VOLUME(cvol) ((cvol) & ~(1 << 30)) +#define DECOMPOSE_MUTED(cvol) (((cvol) & (1 << 30)) != 0) #if defined(LINUX) -- cgit v1.2.3