aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm/PcmDither.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-12-22 16:09:07 +0100
committerMax Kellermann <max@duempel.org>2013-12-22 22:06:25 +0100
commit4043f320fe6f9d2128e1a7be52ab89b380e208cc (patch)
tree3badb591800d4844f147116507be3317d1214d9c /src/pcm/PcmDither.hxx
parent32b834aa04bd05dade4e9db7759f2473f3e24b7e (diff)
downloadmpd-4043f320fe6f9d2128e1a7be52ab89b380e208cc.tar.gz
mpd-4043f320fe6f9d2128e1a7be52ab89b380e208cc.tar.xz
mpd-4043f320fe6f9d2128e1a7be52ab89b380e208cc.zip
pcm/Dither: generic sample dithering using template
Diffstat (limited to 'src/pcm/PcmDither.hxx')
-rw-r--r--src/pcm/PcmDither.hxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pcm/PcmDither.hxx b/src/pcm/PcmDither.hxx
index 106382307..f3213a6e6 100644
--- a/src/pcm/PcmDither.hxx
+++ b/src/pcm/PcmDither.hxx
@@ -30,6 +30,9 @@ public:
constexpr PcmDither()
:error{0, 0, 0}, random(0) {}
+ template<typename T, T MIN, T MAX, unsigned scale_bits>
+ T Dither(T sample);
+
void Dither24To16(int16_t *dest, const int32_t *src,
const int32_t *src_end);