buffers: make alignment optional

Make the alignment parameter optional when negotiating buffers.
Default to a 16 bytes alignment and adjust for the max cpu
alignment.
Remove the useless align buffer parameter in plugins, we always
set it to 16 anyway.
This commit is contained in:
Wim Taymans 2022-01-03 12:32:26 +01:00
parent 30982775d9
commit 35cbe4e939
48 changed files with 54 additions and 91 deletions

View file

@ -533,8 +533,7 @@ impl_node_port_enum_params(void *object, int seq,
SPA_PARAM_BUFFERS_buffers, SPA_POD_CHOICE_RANGE_Int(2, 1, MAX_BUFFERS),
SPA_PARAM_BUFFERS_blocks, SPA_POD_Int(port->blocks),
SPA_PARAM_BUFFERS_size, SPA_POD_Int(other->size / other->stride * port->stride),
SPA_PARAM_BUFFERS_stride, SPA_POD_Int(port->stride),
SPA_PARAM_BUFFERS_align, SPA_POD_Int(16));
SPA_PARAM_BUFFERS_stride, SPA_POD_Int(port->stride));
} else {
@ -546,8 +545,7 @@ impl_node_port_enum_params(void *object, int seq,
MAX_SAMPLES * 2 * port->stride,
16 * port->stride,
INT32_MAX),
SPA_PARAM_BUFFERS_stride, SPA_POD_Int(port->stride),
SPA_PARAM_BUFFERS_align, SPA_POD_Int(16));
SPA_PARAM_BUFFERS_stride, SPA_POD_Int(port->stride));
}
break;
}