summaryrefslogtreecommitdiff
path: root/src/output
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-09-22 19:08:03 +0200
committerMax Kellermann <max@musicpd.org>2018-09-22 19:08:03 +0200
commit863722545f1d892ce4d30b91f6bf25bb08b48a19 (patch)
tree7506cbab436c3819172acf5e553e2f1582d1b676 /src/output
parentd3d1d37782952e9b1142a4735635aac3dd2db466 (diff)
player/CrossFade, ...: use lround()
Diffstat (limited to 'src/output')
-rw-r--r--src/output/plugins/HaikuOutputPlugin.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/output/plugins/HaikuOutputPlugin.cxx b/src/output/plugins/HaikuOutputPlugin.cxx
index 578d701f6..a18aa34f4 100644
--- a/src/output/plugins/HaikuOutputPlugin.cxx
+++ b/src/output/plugins/HaikuOutputPlugin.cxx
@@ -38,6 +38,8 @@
#include <StringList.h>
#include <SoundPlayer.h>
+#include <cmath>
+
#include <string.h>
#define UTF8_PLAY "\xE2\x96\xB6"
@@ -439,7 +441,7 @@ haiku_output_get_volume(HaikuOutput &haiku)
if (soundPlayer == NULL || soundPlayer->InitCheck() != B_OK)
return 0;
- return (int)(soundPlayer->Volume() * 100 + 0.5);
+ return lround(soundPlayer->Volume() * 100);
}
bool