From d1b7473418b413d28aee091ec79b11334f2abd5b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 24 Dec 2013 23:38:11 +0100 Subject: [PATCH] pcm/Dither: rename DitherShift() to DitherConvert() --- src/pcm/PcmDither.cxx | 14 +++++++------- src/pcm/PcmDither.hxx | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/pcm/PcmDither.cxx b/src/pcm/PcmDither.cxx index 71ec5db1e..62214ce28 100644 --- a/src/pcm/PcmDither.cxx +++ b/src/pcm/PcmDither.cxx @@ -64,7 +64,7 @@ PcmDither::Dither(T sample) template inline typename DT::value_type -PcmDither::DitherShift(typename ST::value_type sample) +PcmDither::DitherConvert(typename ST::value_type sample) { static_assert(ST::BITS > DT::BITS, "Sample formats cannot be dithered"); @@ -77,12 +77,12 @@ PcmDither::DitherShift(typename ST::value_type sample) template inline void -PcmDither::DitherShift(typename DT::pointer_type dest, - typename ST::const_pointer_type src, - typename ST::const_pointer_type src_end) +PcmDither::DitherConvert(typename DT::pointer_type dest, + typename ST::const_pointer_type src, + typename ST::const_pointer_type src_end) { while (src < src_end) - *dest++ = DitherShift(*src++); + *dest++ = DitherConvert(*src++); } void @@ -91,7 +91,7 @@ PcmDither::Dither24To16(int16_t *dest, const int32_t *src, { typedef SampleTraits ST; typedef SampleTraits DT; - DitherShift(dest, src, src_end); + DitherConvert(dest, src, src_end); } void @@ -100,5 +100,5 @@ PcmDither::Dither32To16(int16_t *dest, const int32_t *src, { typedef SampleTraits ST; typedef SampleTraits DT; - DitherShift(dest, src, src_end); + DitherConvert(dest, src, src_end); } diff --git a/src/pcm/PcmDither.hxx b/src/pcm/PcmDither.hxx index 2b75cdaeb..0d81b8794 100644 --- a/src/pcm/PcmDither.hxx +++ b/src/pcm/PcmDither.hxx @@ -43,12 +43,12 @@ private: T Dither(T sample); template - typename DT::value_type DitherShift(typename ST::value_type sample); + typename DT::value_type DitherConvert(typename ST::value_type sample); template - void DitherShift(typename DT::pointer_type dest, - typename ST::const_pointer_type src, - typename ST::const_pointer_type src_end); + void DitherConvert(typename DT::pointer_type dest, + typename ST::const_pointer_type src, + typename ST::const_pointer_type src_end); }; #endif