aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_thread.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-10 17:57:14 +0100
committerMax Kellermann <max@duempel.org>2009-11-14 01:15:26 +0100
commitcef5dcc0a15759588fcfd079ec87592511e02df4 (patch)
treeea594056a9f0b786a0fe55090d8c13a5b0e0bcff /src/output_thread.c
parente5b119a3243bf688879d601bce431d24227679c9 (diff)
downloadmpd-cef5dcc0a15759588fcfd079ec87592511e02df4.tar.gz
mpd-cef5dcc0a15759588fcfd079ec87592511e02df4.tar.xz
mpd-cef5dcc0a15759588fcfd079ec87592511e02df4.zip
audio_format: added function audio_format_to_string()
Unified function for converting an audio_format object to a string, for log messages and for the "status" command.
Diffstat (limited to 'src/output_thread.c')
-rw-r--r--src/output_thread.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/output_thread.c b/src/output_thread.c
index 0b61ab171..fccbad5eb 100644
--- a/src/output_thread.c
+++ b/src/output_thread.c
@@ -93,6 +93,7 @@ ao_open(struct audio_output *ao)
bool success;
GError *error = NULL;
const struct audio_format *filter_audio_format;
+ struct audio_format_string af_string;
assert(!ao->open);
assert(ao->fail_timer == NULL);
@@ -145,20 +146,15 @@ ao_open(struct audio_output *ao)
ao->open = true;
g_debug("opened plugin=%s name=\"%s\" "
- "audio_format=%u:%u:%u:%u",
+ "audio_format=%s",
ao->plugin->name, ao->name,
- ao->out_audio_format.sample_rate,
- ao->out_audio_format.bits,
- ao->out_audio_format.channels,
- ao->out_audio_format.reverse_endian);
+ audio_format_to_string(&ao->out_audio_format, &af_string));
if (!audio_format_equals(&ao->in_audio_format,
&ao->out_audio_format))
- g_debug("converting from %u:%u:%u:%u",
- ao->in_audio_format.sample_rate,
- ao->in_audio_format.bits,
- ao->in_audio_format.channels,
- ao->in_audio_format.reverse_endian);
+ g_debug("converting from %s",
+ audio_format_to_string(&ao->in_audio_format,
+ &af_string));
}
static void