diff options
author | Max Kellermann <max@duempel.org> | 2013-12-24 23:39:29 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-12-24 23:39:29 +0100 |
commit | 9ac18c39a1efd2b2c8bef4c5449ef9f241cc25ed (patch) | |
tree | d3b8ecfd16164b076bbc12510ac7ab987650f68c | |
parent | d1b7473418b413d28aee091ec79b11334f2abd5b (diff) | |
download | mpd-9ac18c39a1efd2b2c8bef4c5449ef9f241cc25ed.tar.gz mpd-9ac18c39a1efd2b2c8bef4c5449ef9f241cc25ed.tar.xz mpd-9ac18c39a1efd2b2c8bef4c5449ef9f241cc25ed.zip |
pcm/Dither: move shift from DitherConvert() to Dither()
All callers need this shift, so let's move it to the basic method.
Diffstat (limited to '')
-rw-r--r-- | src/pcm/PcmDither.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pcm/PcmDither.cxx b/src/pcm/PcmDither.cxx index 62214ce28..975c91cbd 100644 --- a/src/pcm/PcmDither.cxx +++ b/src/pcm/PcmDither.cxx @@ -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> |