audioconvert: handle odd writes in delay

Add some padding to the delay buffer. If we wrap around, copy the
spilled samples to the front of the buffer. This makes it possible to
use the more optimized sse delay function in more cases.
This commit is contained in:
Wim Taymans 2024-10-23 12:34:04 +02:00
parent 3309e0b244
commit 662bf68122
2 changed files with 14 additions and 5 deletions

View file

@ -59,7 +59,7 @@ struct channelmix {
uint32_t hilbert_taps; /* to phase shift, 0 disabled */
struct lr4 lr4[SPA_AUDIO_MAX_CHANNELS];
float buffer[2][BUFFER_SIZE*2];
float buffer[2][BUFFER_SIZE*2 + 16];
uint32_t pos[2];
uint32_t delay;
float taps[MAX_TAPS];