aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:27:14 +0200
committerEric Wong <normalperson@yhbt.net>2008-08-31 00:41:10 -0700
commit6208397d5c06e1f637057a61c2cd6fb23f3e066a (patch)
treef28329a5037c8f743aaad27a9a0e7bdff6f1f15e /src
parent4ea80a16634be04aad3dfcb5cb46afa8a7e84827 (diff)
downloadmpd-6208397d5c06e1f637057a61c2cd6fb23f3e066a.tar.gz
mpd-6208397d5c06e1f637057a61c2cd6fb23f3e066a.tar.xz
mpd-6208397d5c06e1f637057a61c2cd6fb23f3e066a.zip
mp3: converted the DECODE_ constants to an enum
Diffstat (limited to 'src')
-rw-r--r--src/inputPlugins/mp3_plugin.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c
index a39b0d128..a1c0510da 100644
--- a/src/inputPlugins/mp3_plugin.c
+++ b/src/inputPlugins/mp3_plugin.c
@@ -34,10 +34,12 @@
#define READ_BUFFER_SIZE 40960
-#define DECODE_SKIP -3
-#define DECODE_BREAK -2
-#define DECODE_CONT -1
-#define DECODE_OK 0
+enum mp3_action {
+ DECODE_SKIP = -3,
+ DECODE_BREAK = -2,
+ DECODE_CONT = -1,
+ DECODE_OK = 0
+};
#define MUTEFRAME_SKIP 1
#define MUTEFRAME_SEEK 2
@@ -367,8 +369,9 @@ fail:
}
#endif
-static int decodeNextFrameHeader(mp3DecodeData * data, MpdTag ** tag,
- ReplayGainInfo ** replayGainInfo)
+static enum mp3_action
+decodeNextFrameHeader(mp3DecodeData * data, MpdTag ** tag,
+ ReplayGainInfo ** replayGainInfo)
{
enum mad_layer layer;
@@ -430,7 +433,8 @@ static int decodeNextFrameHeader(mp3DecodeData * data, MpdTag ** tag,
return DECODE_OK;
}
-static int decodeNextFrame(mp3DecodeData * data)
+static enum mp3_action
+decodeNextFrame(mp3DecodeData * data)
{
if ((data->stream).buffer == NULL
|| (data->stream).error == MAD_ERROR_BUFLEN) {
@@ -846,7 +850,8 @@ static void mp3Read_seek(mp3DecodeData * data)
}
}
-static int mp3Read(mp3DecodeData * data, ReplayGainInfo ** replayGainInfo)
+static enum mp3_action
+mp3Read(mp3DecodeData * data, ReplayGainInfo ** replayGainInfo)
{
unsigned int pcm_length, max_samples;
unsigned int i;