Commit 9ac18c39 authored by Max Kellermann's avatar Max Kellermann

pcm/Dither: move shift from DitherConvert() to Dither()

All callers need this shift, so let's move it to the basic method.
parent d1b74734
......@@ -59,7 +59,7 @@ PcmDither::Dither(T sample)
error[0] = sample - output;
return output;
return output >> scale_bits;
}
template<typename ST, typename DT>
......@@ -72,7 +72,7 @@ PcmDither::DitherConvert(typename ST::value_type sample)
constexpr unsigned scale_bits = ST::BITS - DT::BITS;
return Dither<typename ST::sum_type, ST::MIN, ST::MAX,
scale_bits>(sample) >> scale_bits;
scale_bits>(sample);
}
template<typename ST, typename DT>
......
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