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/mpg123_decoder_plugin.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/decoder/mpg123_decoder_plugin.c') diff --git a/src/decoder/mpg123_decoder_plugin.c b/src/decoder/mpg123_decoder_plugin.c index 62e6b00b0..0d7cb9e0e 100644 --- a/src/decoder/mpg123_decoder_plugin.c +++ b/src/decoder/mpg123_decoder_plugin.c @@ -103,7 +103,7 @@ mpd_mpg123_file_decode(struct decoder *decoder, const char *path_fs) struct audio_format audio_format; mpg123_handle *handle; int error; - off_t num_samples, position; + off_t num_samples; enum decoder_command cmd; /* open the file */ @@ -134,8 +134,6 @@ mpd_mpg123_file_decode(struct decoder *decoder, const char *path_fs) unsigned char buffer[8192]; size_t nbytes; - position = mpg123_tell(handle); - /* decode */ error = mpg123_read(handle, buffer, sizeof(buffer), &nbytes); @@ -149,8 +147,6 @@ mpd_mpg123_file_decode(struct decoder *decoder, const char *path_fs) /* send to MPD */ cmd = decoder_data(decoder, NULL, buffer, nbytes, - (float)position / - (float)audio_format.sample_rate, 0, NULL); /* seeking not yet implemented */ -- cgit v1.2.3