From cc6f1020d01a6f8f814a6a6a211a00d490459f66 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 22 May 2014 11:24:40 +0200 Subject: test/run_decoder: merge code into FakeDecoderAPI.cxx Eliminate duplicate code. --- test/FakeDecoderAPI.cxx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'test/FakeDecoderAPI.cxx') diff --git a/test/FakeDecoderAPI.cxx b/test/FakeDecoderAPI.cxx index 4dfc545ee..155e7d5df 100644 --- a/test/FakeDecoderAPI.cxx +++ b/test/FakeDecoderAPI.cxx @@ -18,6 +18,7 @@ */ #include "config.h" +#include "FakeDecoderAPI.hxx" #include "decoder/DecoderAPI.hxx" #include "input/InputStream.hxx" #include "util/Error.hxx" @@ -26,11 +27,21 @@ #include void -decoder_initialized(gcc_unused Decoder &decoder, - gcc_unused const AudioFormat audio_format, +decoder_initialized(Decoder &decoder, + const AudioFormat audio_format, gcc_unused bool seekable, - gcc_unused float total_time) + float duration) { + struct audio_format_string af_string; + + assert(!decoder.initialized); + assert(audio_format.IsValid()); + + fprintf(stderr, "audio_format=%s duration=%f\n", + audio_format_to_string(audio_format, &af_string), + duration); + + decoder.initialized = true; } DecoderCommand -- cgit v1.2.3