player/CrossFade, ...: use lround()

This commit is contained in:
Max Kellermann
2018-09-22 19:08:03 +02:00
parent d3d1d37782
commit 863722545f
6 changed files with 19 additions and 10 deletions

View File

@@ -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