aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-11 16:18:31 +0100
committerMax Kellermann <max@duempel.org>2008-11-11 16:18:31 +0100
commit837cefdb04b5c9526ac2f51e269d8350c6b98f00 (patch)
tree86bc106d817d3c93dbe5e7a7226e0bae9c37dd8d
parente9c3497cd23055fd9730424a21068012d3a63236 (diff)
downloadmpd-837cefdb04b5c9526ac2f51e269d8350c6b98f00.tar.gz
mpd-837cefdb04b5c9526ac2f51e269d8350c6b98f00.tar.xz
mpd-837cefdb04b5c9526ac2f51e269d8350c6b98f00.zip
replay_gain: converted replay_gain_mode to an enum
Prefer C enums over CPP macros.
-rw-r--r--src/replay_gain.c2
-rw-r--r--src/replay_gain.h10
2 files changed, 7 insertions, 5 deletions
diff --git a/src/replay_gain.c b/src/replay_gain.c
index d4f9f33ea..4f589c233 100644
--- a/src/replay_gain.c
+++ b/src/replay_gain.c
@@ -25,7 +25,7 @@
#include "audio_format.h"
#include "os_compat.h"
-int replay_gain_mode = REPLAY_GAIN_OFF;
+enum replay_gain_mode replay_gain_mode = REPLAY_GAIN_OFF;
static float replay_gain_preamp = 1.0;
diff --git a/src/replay_gain.h b/src/replay_gain.h
index 9dae1fb1b..d3fae3f46 100644
--- a/src/replay_gain.h
+++ b/src/replay_gain.h
@@ -20,13 +20,15 @@
#ifndef MPD_REPLAY_GAIN_H
#define MPD_REPLAY_GAIN_H
-#define REPLAY_GAIN_OFF 0
-#define REPLAY_GAIN_TRACK 1
-#define REPLAY_GAIN_ALBUM 2
+enum replay_gain_mode {
+ REPLAY_GAIN_OFF = -1,
+ REPLAY_GAIN_ALBUM,
+ REPLAY_GAIN_TRACK,
+};
struct audio_format;
-extern int replay_gain_mode;
+extern enum replay_gain_mode replay_gain_mode;
struct replay_gain_info {
float album_gain;