aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_thread.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-01 10:37:26 +0100
committerMax Kellermann <max@duempel.org>2009-03-01 10:37:26 +0100
commite1b79479a53aaff6d49d65d7ad3689792343a442 (patch)
tree1839a4e87dba1bd671f3c68d50c0e7b340f9dc26 /src/output_thread.c
parenta81a84eaa45235c4a3343b3aacaf132c521a0b0e (diff)
downloadmpd-e1b79479a53aaff6d49d65d7ad3689792343a442.tar.gz
mpd-e1b79479a53aaff6d49d65d7ad3689792343a442.tar.xz
mpd-e1b79479a53aaff6d49d65d7ad3689792343a442.zip
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.
Diffstat (limited to '')
-rw-r--r--src/output_thread.c16
1 files changed, 16 insertions, 0 deletions
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,