mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-14 08:56:37 -05:00
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:
parent
30982775d9
commit
35cbe4e939
48 changed files with 54 additions and 91 deletions
|
|
@ -46,6 +46,8 @@
|
|||
#define SPA_LOG_TOPIC_DEFAULT log_topic
|
||||
static struct spa_log_topic *log_topic = &SPA_LOG_TOPIC(0, "spa.audioadapter");
|
||||
|
||||
#define DEFAULT_ALIGN 16
|
||||
|
||||
#define MAX_PORTS SPA_AUDIO_MAX_CHANNELS
|
||||
|
||||
/** \cond */
|
||||
|
|
@ -367,13 +369,15 @@ static int negotiate_buffers(struct impl *this)
|
|||
follower_alloc = false;
|
||||
}
|
||||
|
||||
align = DEFAULT_ALIGN;
|
||||
|
||||
if ((res = spa_pod_parse_object(param,
|
||||
SPA_TYPE_OBJECT_ParamBuffers, NULL,
|
||||
SPA_PARAM_BUFFERS_buffers, SPA_POD_Int(&buffers),
|
||||
SPA_PARAM_BUFFERS_blocks, SPA_POD_Int(&blocks),
|
||||
SPA_PARAM_BUFFERS_size, SPA_POD_Int(&size),
|
||||
SPA_PARAM_BUFFERS_stride, SPA_POD_Int(&stride),
|
||||
SPA_PARAM_BUFFERS_align, SPA_POD_Int(&align))) < 0)
|
||||
SPA_PARAM_BUFFERS_align, SPA_POD_OPT_Int(&align))) < 0)
|
||||
return res;
|
||||
|
||||
spa_log_debug(this->log, "%p: buffers:%d, blocks:%d, size:%d, stride:%d align:%d %d:%d",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue