From e1b79479a53aaff6d49d65d7ad3689792343a442 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 1 Mar 2009 10:37:26 +0100 Subject: [PATCH] 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. --- src/output_thread.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/output_thread.c b/src/output_thread.c index c4d5b16ee..ea2926b98 100644 --- a/src/output_thread.c +++ b/src/output_thread.c @@ -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,