diff options
author | Max Kellermann <max@duempel.org> | 2009-06-25 08:37:34 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-06-25 08:37:34 +0200 |
commit | ce072b89d24aba8b54da5958ef73b1864ad003ae (patch) | |
tree | 5560e2e7b6f0953f3a28133a6f7b2546a0da34df | |
parent | 4ffd9bce5a9a12a03ecaecac7c0861e5f692d9e3 (diff) | |
download | mpd-ce072b89d24aba8b54da5958ef73b1864ad003ae.tar.gz mpd-ce072b89d24aba8b54da5958ef73b1864ad003ae.tar.xz mpd-ce072b89d24aba8b54da5958ef73b1864ad003ae.zip |
command: added new "status" line with more precise "elapsed time"
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | doc/protocol.xml | 10 | ||||
-rw-r--r-- | src/command.c | 2 |
3 files changed, 14 insertions, 0 deletions
@@ -1,4 +1,6 @@ ver 0.16 (20??/??/??) +* commands: + - added new "status" line with more precise "elapsed time" ver 0.15 (2009/06/23) diff --git a/doc/protocol.xml b/doc/protocol.xml index b4addf35a..7ef1dc379 100644 --- a/doc/protocol.xml +++ b/doc/protocol.xml @@ -279,6 +279,16 @@ </listitem> <listitem> <para> + <varname>elapsed</varname>: + <footnote id="since_0_16"><simpara>Since MPD 0.16</simpara></footnote> + <returnvalue> + Total time elapsed within the current song, but + with higher resolution. + </returnvalue> + </para> + </listitem> + <listitem> + <para> <varname>bitrate</varname>: <returnvalue>instantaneous bitrate in kbps</returnvalue> diff --git a/src/command.c b/src/command.c index d30b63594..5b2973d3e 100644 --- a/src/command.c +++ b/src/command.c @@ -501,9 +501,11 @@ handle_status(struct client *client, const struct audio_format *af = player_get_audio_format(); client_printf(client, COMMAND_STATUS_TIME ": %i:%i\n" + "elapsed: %1.3f\n" COMMAND_STATUS_BITRATE ": %li\n" COMMAND_STATUS_AUDIO ": %u:%u:%u\n", getPlayerElapsedTime(), getPlayerTotalTime(), + pc.elapsed_time, getPlayerBitRate(), af->sample_rate, af->bits, af->channels); } |