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/output | |
parent | d3d1d37782952e9b1142a4735635aac3dd2db466 (diff) |
player/CrossFade, ...: use lround()
Diffstat (limited to 'src/output')
-rw-r--r-- | src/output/plugins/HaikuOutputPlugin.cxx | 4 |
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 |