From 85c27840a303145e887d7d30f0141236c21aafef Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 2 Feb 2020 21:21:57 -0800 Subject: treewide: use boost::lround when std::round is unavailable This is the case with uClibc-ng currently. Signed-off-by: Rosen Penev (cherry picked from commit 769cd0ee9f0cf8ceb026aa751b5d4a390bb5dbdc) (changed define to match master) --- src/pcm/PcmMix.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/pcm') diff --git a/src/pcm/PcmMix.cxx b/src/pcm/PcmMix.cxx index 13f558d5e..bbb26d1c4 100644 --- a/src/pcm/PcmMix.cxx +++ b/src/pcm/PcmMix.cxx @@ -22,11 +22,10 @@ #include "Clamp.hxx" #include "Traits.hxx" #include "util/Clamp.hxx" +#include "util/Math.hxx" #include "PcmDither.cxx" // including the .cxx file to get inlined templates -#include - #include template> @@ -225,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(vol1, 0, PCM_VOLUME_1S); return pcm_add_vol(dither, buffer1, buffer2, size, -- cgit v1.2.3