diff options
author | Max Kellermann <max@musicpd.org> | 2018-09-22 19:08:03 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-09-22 19:08:03 +0200 |
commit | 863722545f1d892ce4d30b91f6bf25bb08b48a19 (patch) | |
tree | 7506cbab436c3819172acf5e553e2f1582d1b676 /src/command | |
parent | d3d1d37782952e9b1142a4735635aac3dd2db466 (diff) |
player/CrossFade, ...: use lround()
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/PlayerCommands.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/command/PlayerCommands.cxx b/src/command/PlayerCommands.cxx index 570bc75b8..27147f373 100644 --- a/src/command/PlayerCommands.cxx +++ b/src/command/PlayerCommands.cxx @@ -39,6 +39,8 @@ #include "db/update/Service.hxx" #endif +#include <cmath> + #define COMMAND_STATUS_STATE "state" #define COMMAND_STATUS_REPEAT "repeat" #define COMMAND_STATUS_SINGLE "single" @@ -151,8 +153,8 @@ handle_status(Client &client, gcc_unused Request args, Response &r) state); if (pc.GetCrossFade() > 0) - r.Format(COMMAND_STATUS_CROSSFADE ": %i\n", - int(pc.GetCrossFade() + 0.5)); + r.Format(COMMAND_STATUS_CROSSFADE ": %lu\n", + std::lround(pc.GetCrossFade())); if (pc.GetMixRampDelay() > 0) r.Format(COMMAND_STATUS_MIXRAMPDELAY ": %f\n", |