From bad350bc18ab81661253bf42245b9e3fa175d026 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 25 Dec 2009 19:47:33 +0100 Subject: decoder_api: added function decoder_timestamp() Remove the data_time parameter from decoder_data(). This patch eliminates the timestamp counting in most decoder plugins, because the MPD core will do it automatically by default. --- src/decoder/mikmod_plugin.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/decoder/mikmod_plugin.c') diff --git a/src/decoder/mikmod_plugin.c b/src/decoder/mikmod_plugin.c index 2185fe21c..bbb330cb7 100644 --- a/src/decoder/mikmod_plugin.c +++ b/src/decoder/mikmod_plugin.c @@ -147,7 +147,6 @@ mikmod_decoder_file_decode(struct decoder *decoder, const char *path_fs) struct audio_format audio_format; int ret; SBYTE buffer[MIKMOD_FRAME_SIZE]; - unsigned frame_size, current_frame = 0; enum decoder_command cmd = DECODE_COMMAND_NONE; path2 = g_strdup(path_fs); @@ -167,14 +166,10 @@ mikmod_decoder_file_decode(struct decoder *decoder, const char *path_fs) decoder_initialized(decoder, &audio_format, false, 0); - frame_size = audio_format_frame_size(&audio_format); - Player_Start(handle); while (cmd == DECODE_COMMAND_NONE && Player_Active()) { ret = VC_WriteBytes(buffer, sizeof(buffer)); - current_frame += ret / frame_size; cmd = decoder_data(decoder, NULL, buffer, ret, - (float)current_frame / (float)mikmod_sample_rate, 0, NULL); } -- cgit v1.2.3