Merge remote-tracking branch 'neheb/h'

This commit is contained in:
Max Kellermann
2020-03-16 17:29:05 +01:00
16 changed files with 72 additions and 34 deletions

View File

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