diff options
author | Max Kellermann <max@musicpd.org> | 2018-10-29 22:50:06 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-10-29 22:50:06 +0100 |
commit | a3f7127e7250196ce3cb7224739dffa2f10bf72e (patch) | |
tree | 7619a6f6ce2cc79a3c2fb0e9f40db7acf129c92b /src/pcm | |
parent | b0a6a569dff5aee5cadee57aea52e5ec9a03aa11 (diff) |
pcm/FloatConvert: use FloatToIntegerSampleConvert::factor for IntegerToFloatSampleConvert::factor
Diffstat (limited to 'src/pcm')
-rw-r--r-- | src/pcm/FloatConvert.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pcm/FloatConvert.hxx b/src/pcm/FloatConvert.hxx index 5a1756b36..2270fbb90 100644 --- a/src/pcm/FloatConvert.hxx +++ b/src/pcm/FloatConvert.hxx @@ -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 |