pcm/Interleave: convert PcmInterleave32() to template
This commit is contained in:
parent
69476b4f21
commit
22f2605e25
@ -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++;
|
||||
@ -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
|
||||
PcmInterleave(void *gcc_restrict dest,
|
||||
ConstBuffer<const void *> src,
|
||||
|
Loading…
Reference in New Issue
Block a user