diff options
author | Max Kellermann <max@duempel.org> | 2009-05-28 23:37:26 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-05-28 23:37:26 +0200 |
commit | 68f1aed452e9059cab66530749ceb2f02c93d84a (patch) | |
tree | f46723e1f2b7eb1007100c76dc9d5f5588185166 | |
parent | a54f14f31d5ccd498b6e3e3577127e4e57fe60d3 (diff) | |
download | mpd-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 '')
-rw-r--r-- | src/volume.c | 11 |
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 */ |