aboutsummaryrefslogtreecommitdiffstats
path: root/src/command.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/command.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/command.c')
-rw-r--r--src/command.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/command.c b/src/command.c
index 3466da4d1..db0bafa31 100644
--- a/src/command.c
+++ b/src/command.c
@@ -515,18 +515,19 @@ handle_status(struct client *client,
}
if (player_status.state != PLAYER_STATE_STOP) {
+ struct audio_format_string af_string;
+
client_printf(client,
COMMAND_STATUS_TIME ": %i:%i\n"
"elapsed: %1.3f\n"
COMMAND_STATUS_BITRATE ": %u\n"
- COMMAND_STATUS_AUDIO ": %u:%u:%u\n",
+ COMMAND_STATUS_AUDIO ": %s\n",
(int)(player_status.elapsed_time + 0.5),
(int)(player_status.total_time + 0.5),
player_status.elapsed_time,
player_status.bit_rate,
- player_status.audio_format.sample_rate,
- player_status.audio_format.bits,
- player_status.audio_format.channels);
+ audio_format_to_string(&player_status.audio_format,
+ &af_string));
}
if ((updateJobId = isUpdatingDB())) {