summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-12-28 18:30:13 +0100
committerMax Kellermann <max@duempel.org>2013-12-28 18:30:13 +0100
commit394e2815dbaf0edb8d0f34b6ceab96b58f071ea8 (patch)
tree8c040efd019c7460ed61dec6091e189bc9ac2e0f
parentf3bbe4bb1ffc94d7c06769a31c6e61e54949ed9e (diff)
pcm/PcmDither: inline Dither24To16() and Dither32To16()
-rw-r--r--src/pcm/PcmDither.cxx4
-rw-r--r--src/pcm/PcmFormat.cxx3
-rw-r--r--test/test_pcm_dither.cxx2
3 files changed, 5 insertions, 4 deletions
diff --git a/src/pcm/PcmDither.cxx b/src/pcm/PcmDither.cxx
index 975c91cbd..f07d0b343 100644
--- a/src/pcm/PcmDither.cxx
+++ b/src/pcm/PcmDither.cxx
@@ -85,7 +85,7 @@ PcmDither::DitherConvert(typename DT::pointer_type dest,
*dest++ = DitherConvert<ST, DT>(*src++);
}
-void
+inline void
PcmDither::Dither24To16(int16_t *dest, const int32_t *src,
const int32_t *src_end)
{
@@ -94,7 +94,7 @@ PcmDither::Dither24To16(int16_t *dest, const int32_t *src,
DitherConvert<ST, DT>(dest, src, src_end);
}
-void
+inline void
PcmDither::Dither32To16(int16_t *dest, const int32_t *src,
const int32_t *src_end)
{
diff --git a/src/pcm/PcmFormat.cxx b/src/pcm/PcmFormat.cxx
index a0e0bb2de..92d2cd77b 100644
--- a/src/pcm/PcmFormat.cxx
+++ b/src/pcm/PcmFormat.cxx
@@ -19,11 +19,12 @@
#include "config.h"
#include "PcmFormat.hxx"
-#include "PcmDither.hxx"
#include "PcmBuffer.hxx"
#include "PcmUtils.hxx"
#include "Traits.hxx"
+#include "PcmDither.cxx" // including the .cxx file to get inlined templates
+
static void
pcm_convert_8_to_16(int16_t *out, const int8_t *in, const int8_t *in_end)
{
diff --git a/test/test_pcm_dither.cxx b/test/test_pcm_dither.cxx
index 710deffcc..bf7484885 100644
--- a/test/test_pcm_dither.cxx
+++ b/test/test_pcm_dither.cxx
@@ -19,7 +19,7 @@
#include "test_pcm_all.hxx"
#include "test_pcm_util.hxx"
-#include "pcm/PcmDither.hxx"
+#include "pcm/PcmDither.cxx"
void
PcmDitherTest::TestDither24()