output_thread: log audio format in a debug message

To aid debugging, print the audio format of the output plugin in a
debug message, and print information about PCM conversion.
This commit is contained in:
Max Kellermann 2009-03-01 10:37:26 +01:00
parent a81a84eaa4
commit e1b79479a5

View File

@ -134,6 +134,22 @@ static gpointer audio_output_task(gpointer arg)
if (ret) {
pcm_convert_init(&ao->convert_state);
ao->open = true;
g_debug("opened plugin=%s name=\"%s\" "
"audio_format=%u:%u:%u",
ao->plugin->name,
ao->name,
ao->out_audio_format.sample_rate,
ao->out_audio_format.bits,
ao->out_audio_format.channels);
if (!audio_format_equals(&ao->in_audio_format,
&ao->out_audio_format))
g_debug("converting from %u:%u:%u",
ao->in_audio_format.sample_rate,
ao->in_audio_format.bits,
ao->in_audio_format.channels);
} else {
g_warning("Failed to open \"%s\" [%s]: %s",
ao->name, ao->plugin->name,