Commit a3f7127e authored by Max Kellermann's avatar Max Kellermann

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

parent b0a6a569
...@@ -54,7 +54,7 @@ struct IntegerToFloatSampleConvert { ...@@ -54,7 +54,7 @@ struct IntegerToFloatSampleConvert {
typedef typename SrcTraits::value_type SV; typedef typename SrcTraits::value_type SV;
typedef typename DstTraits::value_type DV; 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"); static_assert(factor > 0, "Wrong factor");
gcc_const gcc_const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment