From 9ac18c39a1efd2b2c8bef4c5449ef9f241cc25ed Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 24 Dec 2013 23:39:29 +0100 Subject: pcm/Dither: move shift from DitherConvert() to Dither() All callers need this shift, so let's move it to the basic method. --- src/pcm/PcmDither.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pcm/PcmDither.cxx') 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 @@ -72,7 +72,7 @@ PcmDither::DitherConvert(typename ST::value_type sample) constexpr unsigned scale_bits = ST::BITS - DT::BITS; return Dither(sample) >> scale_bits; + scale_bits>(sample); } template -- cgit v1.2.3