Commit 22f2605e authored by Max Kellermann's avatar Max Kellermann

pcm/Interleave: convert PcmInterleave32() to template

parent 69476b4f
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment