pcm/Interleave: convert PcmInterleave32() to template

This commit is contained in:
Max Kellermann 2015-06-22 17:19:42 +02:00
parent 69476b4f21
commit 22f2605e25

View File

@ -36,10 +36,11 @@ GenericPcmInterleave(uint8_t *gcc_restrict dest,
} }
} }
void template<typename T>
PcmInterleave32(int32_t *gcc_restrict dest, static void
const ConstBuffer<const int32_t *> src, PcmInterleaveT(T *gcc_restrict dest,
size_t n_frames) const ConstBuffer<const T *> src,
size_t n_frames)
{ {
for (const auto *s : src) { for (const auto *s : src) {
auto *d = dest++; auto *d = dest++;
@ -50,6 +51,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 void
PcmInterleave(void *gcc_restrict dest, PcmInterleave(void *gcc_restrict dest,
ConstBuffer<const void *> src, ConstBuffer<const void *> src,