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/mpc_plugin.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'src/decoder/mpc_plugin.c') diff --git a/src/decoder/mpc_plugin.c b/src/decoder/mpc_plugin.c index 02b20a942..584b9fed6 100644 --- a/src/decoder/mpc_plugin.c +++ b/src/decoder/mpc_plugin.c @@ -96,7 +96,7 @@ static inline int32_t convertSample(MPC_SAMPLE_FORMAT sample) return val; } -static bool +static void mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream) { mpc_decoder decoder; @@ -135,21 +135,17 @@ mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream) mpc_streaminfo_init(&info); if ((ret = mpc_streaminfo_read(&info, &reader)) != ERROR_CODE_OK) { - if (decoder_get_command(mpd_decoder) != DECODE_COMMAND_STOP) { + if (decoder_get_command(mpd_decoder) != DECODE_COMMAND_STOP) ERROR("Not a valid musepack stream\n"); - return false; - } - return true; + return; } mpc_decoder_setup(&decoder, &reader); if (!mpc_decoder_initialize(&decoder, &info)) { - if (decoder_get_command(mpd_decoder) != DECODE_COMMAND_STOP) { + if (decoder_get_command(mpd_decoder) != DECODE_COMMAND_STOP) ERROR("Not a valid musepack stream\n"); - return false; - } - return true; + return; } audio_format.bits = 24; @@ -232,8 +228,6 @@ mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream) } replay_gain_info_free(replayGainInfo); - - return true; } static float mpcGetTime(const char *file) -- cgit v1.2.3