mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
delay: improve delay performance
Use a wrap around delay ringbuffer. We can then avoid some modulo arithmetic and read more efficiently. Also handle the delay convolver case better by reversing the taps and reading the taps and delay buffer without extra overhead.
This commit is contained in:
parent
668055e612
commit
a57f2f25b6
4 changed files with 31 additions and 14 deletions
|
|
@ -43,6 +43,13 @@ static inline int hilbert_generate(float *taps, int n_taps)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline void reverse_taps(float *taps, int n_taps)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < n_taps/2; i++)
|
||||
SPA_SWAP(taps[i], taps[n_taps-1-i]);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue