aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm/Interleave.cxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/pcm/Interleave.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/pcm/Interleave.cxx b/src/pcm/Interleave.cxx
index 8f8f152c5..9926b5f7f 100644
--- a/src/pcm/Interleave.cxx
+++ b/src/pcm/Interleave.cxx
@@ -36,10 +36,11 @@ GenericPcmInterleave(uint8_t *gcc_restrict dest,
}
}
-void
-PcmInterleave32(int32_t *gcc_restrict dest,
- const ConstBuffer<const int32_t *> src,
- size_t n_frames)
+template<typename T>
+static void
+PcmInterleaveT(T *gcc_restrict dest,
+ const ConstBuffer<const T *> src,
+ size_t n_frames)
{
for (const auto *s : src) {
auto *d = dest++;
@@ -51,6 +52,14 @@ PcmInterleave32(int32_t *gcc_restrict dest,
}
void
+PcmInterleave32(int32_t *gcc_restrict dest,
+ const ConstBuffer<const int32_t *> src,
+ size_t n_frames)
+{
+ PcmInterleaveT(dest, src, n_frames);
+}
+
+void
PcmInterleave(void *gcc_restrict dest,
ConstBuffer<const void *> src,
size_t n_frames, size_t sample_size)