diff options
author | Max Kellermann <max@duempel.org> | 2008-11-11 17:13:44 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-11-11 17:13:44 +0100 |
commit | 9eed41911f5b65bb51d2395388439918e799cade (patch) | |
tree | 7d9ce92fe427b7049fc50087923b5fa8ecb53eff /src/decoder/audiofile_plugin.c | |
parent | 05e69ac0868658411123f8c549b7f34c2c478742 (diff) | |
download | mpd-9eed41911f5b65bb51d2395388439918e799cade.tar.gz mpd-9eed41911f5b65bb51d2395388439918e799cade.tar.xz mpd-9eed41911f5b65bb51d2395388439918e799cade.zip |
decoder: return void from decode() methods
The stream_decode() and file_decode() methods returned a boolean,
indicating whether they were able to decode the song. This is
redundant, since we already know that: if decoder_initialized() has
been called (and dc.state==DECODE), the plugin succeeded. Change both
methods to return void.
Diffstat (limited to 'src/decoder/audiofile_plugin.c')
-rw-r--r-- | src/decoder/audiofile_plugin.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/decoder/audiofile_plugin.c b/src/decoder/audiofile_plugin.c index 637478819..7fd5d2320 100644 --- a/src/decoder/audiofile_plugin.c +++ b/src/decoder/audiofile_plugin.c @@ -41,7 +41,7 @@ static int getAudiofileTotalTime(const char *file) return total_time; } -static bool +static void audiofile_decode(struct decoder *decoder, const char *path) { int fs, frame_count; @@ -56,13 +56,13 @@ audiofile_decode(struct decoder *decoder, const char *path) if (stat(path, &st) < 0) { ERROR("failed to stat: %s\n", path); - return false; + return; } af_fp = afOpenFile(path, "r", NULL); if (af_fp == AF_NULL_FILEHANDLE) { ERROR("failed to open: %s\n", path); - return false; + return; } afSetVirtualSampleFormat(af_fp, AF_DEFAULT_TRACK, @@ -84,7 +84,7 @@ audiofile_decode(struct decoder *decoder, const char *path) ERROR("Only 8 and 16-bit files are supported. %s is %i-bit\n", path, audio_format.bits); afCloseFile(af_fp); - return false; + return; } fs = (int)afGetVirtualFrameSize(af_fp, AF_DEFAULT_TRACK, 1); @@ -112,7 +112,6 @@ audiofile_decode(struct decoder *decoder, const char *path) } while (decoder_get_command(decoder) != DECODE_COMMAND_STOP); afCloseFile(af_fp); - return true; } static struct tag *audiofileTagDup(const char *file) |