mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
audioconvert: align some buffers
so that we can use aligned read and writes in SSE.
This commit is contained in:
parent
662bf68122
commit
2c132be626
3 changed files with 16 additions and 10 deletions
|
|
@ -775,7 +775,11 @@ int channelmix_init(struct channelmix *mix)
|
|||
mix->delay = (uint32_t)(mix->rear_delay * mix->freq / 1000.0f);
|
||||
mix->func_name = info->name;
|
||||
|
||||
spa_zero(mix->taps);
|
||||
spa_zero(mix->taps_mem);
|
||||
mix->taps = SPA_PTR_ALIGN(mix->taps_mem, CHANNELMIX_OPS_MAX_ALIGN, float);
|
||||
mix->buffer[0] = SPA_PTR_ALIGN(&mix->buffer_mem[0], CHANNELMIX_OPS_MAX_ALIGN, float);
|
||||
mix->buffer[1] = SPA_PTR_ALIGN(&mix->buffer_mem[2*BUFFER_SIZE], CHANNELMIX_OPS_MAX_ALIGN, float);
|
||||
|
||||
if (mix->hilbert_taps > 0) {
|
||||
mix->n_taps = SPA_CLAMP(mix->hilbert_taps, 15u, MAX_TAPS) | 1;
|
||||
blackman_window(mix->taps, mix->n_taps);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue