AudioFormat: replace struct audio_format_string with class StringBuffer, return it
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include "thread/Slack.hxx"
|
||||
#include "thread/Name.hxx"
|
||||
#include "util/ConstBuffer.hxx"
|
||||
#include "util/StringBuffer.hxx"
|
||||
#include "util/ScopeExit.hxx"
|
||||
#include "util/RuntimeError.hxx"
|
||||
#include "Log.hxx"
|
||||
@@ -154,14 +155,11 @@ AudioOutput::Open()
|
||||
}
|
||||
}
|
||||
|
||||
if (f != source.GetInputAudioFormat() || f != out_audio_format) {
|
||||
struct audio_format_string afs1, afs2, afs3;
|
||||
if (f != source.GetInputAudioFormat() || f != out_audio_format)
|
||||
FormatDebug(output_domain, "converting in=%s -> f=%s -> out=%s",
|
||||
audio_format_to_string(source.GetInputAudioFormat(),
|
||||
&afs1),
|
||||
audio_format_to_string(f, &afs2),
|
||||
audio_format_to_string(out_audio_format, &afs3));
|
||||
}
|
||||
ToString(source.GetInputAudioFormat()).c_str(),
|
||||
ToString(f).c_str(),
|
||||
ToString(out_audio_format).c_str());
|
||||
}
|
||||
|
||||
void
|
||||
@@ -176,11 +174,10 @@ AudioOutput::OpenOutputAndConvert(AudioFormat desired_audio_format)
|
||||
name, plugin.name));
|
||||
}
|
||||
|
||||
struct audio_format_string af_string;
|
||||
FormatDebug(output_domain,
|
||||
"opened plugin=%s name=\"%s\" audio_format=%s",
|
||||
plugin.name, name,
|
||||
audio_format_to_string(out_audio_format, &af_string));
|
||||
ToString(out_audio_format).c_str());
|
||||
|
||||
try {
|
||||
convert_filter_set(convert_filter.Get(), out_audio_format);
|
||||
|
||||
Reference in New Issue
Block a user