From 9eed41911f5b65bb51d2395388439918e799cade Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 11 Nov 2008 17:13:44 +0100 Subject: 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. --- src/decoder/audiofile_plugin.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/decoder/audiofile_plugin.c') 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) -- cgit v1.2.3