summaryrefslogtreecommitdiff
path: root/src/output/plugins/HaikuOutputPlugin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/output/plugins/HaikuOutputPlugin.cxx')
-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