diff options
author | Max Kellermann <max@duempel.org> | 2008-08-26 08:27:14 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-08-26 08:27:14 +0200 |
commit | 95fff55d7e5c77b907709e27450ce8d851427e6f (patch) | |
tree | 5d4aed3d1924719b9e1552a0598b1b7cac1d3d59 /src | |
parent | 1c196478b6258f666cbc3efb9bccc60c595949fe (diff) | |
download | mpd-95fff55d7e5c77b907709e27450ce8d851427e6f.tar.gz mpd-95fff55d7e5c77b907709e27450ce8d851427e6f.tar.xz mpd-95fff55d7e5c77b907709e27450ce8d851427e6f.zip |
mp3: converted the DECODE_ constants to an enum
Diffstat (limited to 'src')
-rw-r--r-- | src/inputPlugins/mp3_plugin.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c index aaf5ae55a..18894c399 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 @@ -364,8 +366,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; @@ -427,7 +430,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) { @@ -821,7 +825,8 @@ static int openMp3FromInputStream(InputStream * inStream, mp3DecodeData * data, return 0; } -static int mp3Read(mp3DecodeData * data, ReplayGainInfo ** replayGainInfo) +static enum mp3_action +mp3Read(mp3DecodeData * data, ReplayGainInfo ** replayGainInfo) { struct decoder *decoder = data->decoder; unsigned int pcm_length, max_samples; |