aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
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/decoder
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 '')
-rw-r--r--src/decoder_api.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/decoder_api.c b/src/decoder_api.c
index c6c23182e..eb316bc49 100644
--- a/src/decoder_api.c
+++ b/src/decoder_api.c
@@ -44,6 +44,7 @@ decoder_initialized(struct decoder *decoder,
bool seekable, float total_time)
{
struct decoder_control *dc = decoder->dc;
+ struct audio_format_string af_string;
assert(dc->state == DECODE_STATE_START);
assert(dc->pipe != NULL);
@@ -67,18 +68,15 @@ decoder_initialized(struct decoder *decoder,
player_lock_signal();
- g_debug("audio_format=%u:%u:%u, seekable=%s",
- dc->in_audio_format.sample_rate,
- dc->in_audio_format.bits,
- dc->in_audio_format.channels,
+ g_debug("audio_format=%s, seekable=%s",
+ audio_format_to_string(&dc->in_audio_format, &af_string),
seekable ? "true" : "false");
if (!audio_format_equals(&dc->in_audio_format,
&dc->out_audio_format))
- g_debug("converting to %u:%u:%u",
- dc->out_audio_format.sample_rate,
- dc->out_audio_format.bits,
- dc->out_audio_format.channels);
+ g_debug("converting to %s",
+ audio_format_to_string(&dc->out_audio_format,
+ &af_string));
}
char *decoder_get_uri(G_GNUC_UNUSED struct decoder *decoder)