mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04: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
|
|
@ -60,7 +60,7 @@ struct channelmix {
|
|||
uint32_t hilbert_taps; /* to phase shift, 0 disabled */
|
||||
struct lr4 lr4[SPA_AUDIO_MAX_CHANNELS];
|
||||
|
||||
float buffer[2][BUFFER_SIZE];
|
||||
float buffer[2][BUFFER_SIZE*2];
|
||||
uint32_t pos[2];
|
||||
uint32_t delay;
|
||||
float taps[MAX_TAPS];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue