diff options
author | Max Kellermann <max@duempel.org> | 2009-12-25 19:47:33 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-12-26 03:01:43 +0100 |
commit | bad350bc18ab81661253bf42245b9e3fa175d026 (patch) | |
tree | 47a1dd5d4b81520eb9ae1ce407d2fea84d71736f /src/decoder/_flac_common.c | |
parent | 870436a592b081c4630b9ecc36ff8daecf6496cc (diff) | |
download | mpd-bad350bc18ab81661253bf42245b9e3fa175d026.tar.gz mpd-bad350bc18ab81661253bf42245b9e3fa175d026.tar.xz mpd-bad350bc18ab81661253bf42245b9e3fa175d026.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/decoder/_flac_common.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/decoder/_flac_common.c b/src/decoder/_flac_common.c index 70b2c0202..4dd2b46ea 100644 --- a/src/decoder/_flac_common.c +++ b/src/decoder/_flac_common.c @@ -161,7 +161,6 @@ flac_common_write(struct flac_data *data, const FLAC__Frame * frame, enum decoder_command cmd; size_t buffer_size = frame->header.blocksize * data->frame_size; void *buffer; - float position; unsigned bit_rate; buffer = pcm_buffer_get(&data->buffer, buffer_size); @@ -170,12 +169,6 @@ flac_common_write(struct flac_data *data, const FLAC__Frame * frame, data->sample_format, buf, 0, frame->header.blocksize); - if (data->next_frame >= data->first_frame) - position = (float)(data->next_frame - data->first_frame) / - frame->header.sample_rate; - else - position = 0; - if (nbytes > 0) bit_rate = nbytes * 8 * frame->header.sample_rate / (1000 * frame->header.blocksize); @@ -184,7 +177,7 @@ flac_common_write(struct flac_data *data, const FLAC__Frame * frame, cmd = decoder_data(data->decoder, data->input_stream, buffer, buffer_size, - position, bit_rate, + bit_rate, data->replay_gain_info); data->next_frame += frame->header.blocksize; switch (cmd) { |