From c9e15bc418d4a27305b39ccc63e631ac5e329c8b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 2 Nov 2008 17:01:51 +0100 Subject: decoder_api: pass "seekable" flag to decoder_initialized() Don't pass the "seekable" flag with every decoder_data() invocation. Since that flag won't change within the file, it is enough to pass it to decoder_initialized() once per file. --- src/decoder/mod_plugin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/decoder/mod_plugin.c') diff --git a/src/decoder/mod_plugin.c b/src/decoder/mod_plugin.c index d927f0da4..3d1c8ccaa 100644 --- a/src/decoder/mod_plugin.c +++ b/src/decoder/mod_plugin.c @@ -197,7 +197,7 @@ mod_decode(struct decoder *decoder, const char *path) 1.0 / ((audio_format.bits * audio_format.channels / 8.0) * (float)audio_format.sample_rate); - decoder_initialized(decoder, &audio_format, 0); + decoder_initialized(decoder, &audio_format, false, 0); while (true) { if (decoder_get_command(decoder) == DECODE_COMMAND_SEEK) { @@ -212,7 +212,7 @@ mod_decode(struct decoder *decoder, const char *path) ret = VC_WriteBytes(data->audio_buffer, MIKMOD_FRAME_SIZE); total_time += ret * secPerByte; - decoder_data(decoder, NULL, 0, + decoder_data(decoder, NULL, (char *)data->audio_buffer, ret, total_time, 0, NULL); } -- cgit v1.2.3