From cef5dcc0a15759588fcfd079ec87592511e02df4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 10 Nov 2009 17:57:14 +0100 Subject: 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. --- src/output_thread.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/output_thread.c') diff --git a/src/output_thread.c b/src/output_thread.c index 0b61ab17..fccbad5e 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 -- cgit v1.2.3