aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Stapelberg2015-04-19 09:40:09 -0700
committerMichael Stapelberg2015-04-19 09:40:09 -0700
commita1d50689185323af6ac8e656fbd3cbac7adde535 (patch)
treeafa302b10aac7522d403abf11f03836f5e910981 /include
parentMerge pull request #23 from Deiz/net-speed (diff)
parentPulseAudio muted volume support (fixes #27) (diff)
Merge pull request #28 from Watcom/mute
PulseAudio muted volume support
Diffstat (limited to 'include')
-rw-r--r--include/i3status.h3
1 files changed, 3 insertions, 0 deletions
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)