Commit ce072b89 authored by Max Kellermann's avatar Max Kellermann

command: added new "status" line with more precise "elapsed time"

parent 4ffd9bce
ver 0.16 (20??/??/??) ver 0.16 (20??/??/??)
* commands:
- added new "status" line with more precise "elapsed time"
ver 0.15 (2009/06/23) ver 0.15 (2009/06/23)
......
...@@ -279,6 +279,16 @@ ...@@ -279,6 +279,16 @@
</listitem> </listitem>
<listitem> <listitem>
<para> <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>: <varname>bitrate</varname>:
<returnvalue>instantaneous bitrate in <returnvalue>instantaneous bitrate in
kbps</returnvalue> kbps</returnvalue>
......
...@@ -501,9 +501,11 @@ handle_status(struct client *client, ...@@ -501,9 +501,11 @@ handle_status(struct client *client,
const struct audio_format *af = player_get_audio_format(); const struct audio_format *af = player_get_audio_format();
client_printf(client, client_printf(client,
COMMAND_STATUS_TIME ": %i:%i\n" COMMAND_STATUS_TIME ": %i:%i\n"
"elapsed: %1.3f\n"
COMMAND_STATUS_BITRATE ": %li\n" COMMAND_STATUS_BITRATE ": %li\n"
COMMAND_STATUS_AUDIO ": %u:%u:%u\n", COMMAND_STATUS_AUDIO ": %u:%u:%u\n",
getPlayerElapsedTime(), getPlayerTotalTime(), getPlayerElapsedTime(), getPlayerTotalTime(),
pc.elapsed_time,
getPlayerBitRate(), getPlayerBitRate(),
af->sample_rate, af->bits, af->channels); af->sample_rate, af->bits, af->channels);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment