summaryrefslogtreecommitdiff
path: root/src/pcm
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-02-02 21:21:57 -0800
committerRosen Penev <rosenp@gmail.com>2020-03-15 20:17:31 -0700
commit3ec9fcfc443a68c9f57e0314c47e70ca02a32530 (patch)
treee92291e958bc2368eb7c7a43dee8ceeae7efea6a /src/pcm
parentb5d1a0901022d4711973740edadd87ce5913ac68 (diff)
treewide: use boost::lround when std::round is unavailable
This is the case with uClibc-ng currently. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'src/pcm')
-rw-r--r--src/pcm/Mix.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pcm/Mix.cxx b/src/pcm/Mix.cxx
index b17343513..a39a85947 100644
--- a/src/pcm/Mix.cxx
+++ b/src/pcm/Mix.cxx
@@ -22,11 +22,11 @@
#include "Clamp.hxx"
#include "Traits.hxx"
#include "util/Clamp.hxx"
+#include "util/Math.hxx"
#include "Dither.cxx" // including the .cxx file to get inlined templates
#include <cassert>
-#include <cmath>
template<SampleFormat F, class Traits=SampleTraits<F>>
static typename Traits::value_type
@@ -224,7 +224,7 @@ pcm_mix(PcmDither &dither, void *buffer1, const void *buffer2, size_t size,
s = sin(M_PI_2 * portion1);
s *= s;
- int vol1 = std::lround(s * PCM_VOLUME_1S);
+ int vol1 = lround(s * PCM_VOLUME_1S);
vol1 = Clamp<int>(vol1, 0, PCM_VOLUME_1S);
return pcm_add_vol(dither, buffer1, buffer2, size,