audioconvert: implement passthrough

Add some const and SPA_RESTRICT to methods
When the input and output is the same, work in passthrough mode
where we simply copy place the input pointer onto the output buffer
without doing a memcpy.
Do memcpy when the resampler is not active.
This commit is contained in:
Wim Taymans 2019-03-20 19:29:14 +01:00
parent 74cf412f47
commit 0505f2dc98
9 changed files with 247 additions and 167 deletions

View file

@ -55,7 +55,6 @@
#define S32_TO_F32(v) S24_TO_F32((v) >> 8)
#define F32_TO_S32(v) (F32_TO_S24(v) << 8)
static inline int32_t read_s24(const void *src)
{
const int8_t *s = src;