aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-05-28 23:37:26 +0200
committerMax Kellermann <max@duempel.org>2009-05-28 23:37:26 +0200
commit68f1aed452e9059cab66530749ceb2f02c93d84a (patch)
treef46723e1f2b7eb1007100c76dc9d5f5588185166 /src
parenta54f14f31d5ccd498b6e3e3577127e4e57fe60d3 (diff)
downloadmpd-68f1aed452e9059cab66530749ceb2f02c93d84a.tar.gz
mpd-68f1aed452e9059cab66530749ceb2f02c93d84a.tar.xz
mpd-68f1aed452e9059cab66530749ceb2f02c93d84a.zip
volume: converted volume_mixer_type to an enum
Don't use CPP macros when you can use C enums.
Diffstat (limited to 'src')
-rw-r--r--src/volume.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/volume.c b/src/volume.c
index 4c0667618..3df57ad46 100644
--- a/src/volume.c
+++ b/src/volume.c
@@ -37,13 +37,14 @@
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "volume"
-#define VOLUME_MIXER_TYPE_SOFTWARE 0
-#define VOLUME_MIXER_TYPE_HARDWARE 1
-#define VOLUME_MIXER_TYPE_DISABLED 2
-
#define SW_VOLUME_STATE "sw_volume: "
-static int volume_mixer_type = VOLUME_MIXER_TYPE_HARDWARE;
+static enum {
+ VOLUME_MIXER_TYPE_SOFTWARE,
+ VOLUME_MIXER_TYPE_HARDWARE,
+ VOLUME_MIXER_TYPE_DISABLED,
+} volume_mixer_type = VOLUME_MIXER_TYPE_HARDWARE;
+
static int volume_software_set = 100;
/** the cached hardware mixer value; invalid if negative */