pcm/FloatConvert: use FloatToIntegerSampleConvert::factor for IntegerToFloatSampleConvert::factor

This commit is contained in:
Max Kellermann 2018-10-29 22:50:06 +01:00
parent b0a6a569df
commit a3f7127e72

View File

@ -54,7 +54,7 @@ struct IntegerToFloatSampleConvert {
typedef typename SrcTraits::value_type SV;
typedef typename DstTraits::value_type DV;
static constexpr DV factor = 0.5 / (1 << (SrcTraits::BITS - 2));
static constexpr DV factor = 1.0 / FloatToIntegerSampleConvert<F, Traits>::factor;
static_assert(factor > 0, "Wrong factor");
gcc_const