AudioFormat: replace struct audio_format_string with class StringBuffer, return it

This commit is contained in:
Max Kellermann
2017-01-17 22:04:31 +01:00
parent 4f01387edf
commit 39114f91a7
10 changed files with 36 additions and 53 deletions

View File

@@ -21,6 +21,7 @@
#include "FakeDecoderAPI.hxx"
#include "decoder/DecoderAPI.hxx"
#include "input/InputStream.hxx"
#include "util/StringBuffer.hxx"
#include "Compiler.h"
#include <stdexcept>
@@ -33,13 +34,11 @@ FakeDecoder::Ready(const AudioFormat audio_format,
gcc_unused bool seekable,
SignedSongTime duration)
{
struct audio_format_string af_string;
assert(!initialized);
assert(audio_format.IsValid());
fprintf(stderr, "audio_format=%s duration=%f\n",
audio_format_to_string(audio_format, &af_string),
ToString(audio_format).c_str(),
duration.ToDoubleS());
initialized = true;