pipewire/spa
Torkel Niklasson 476d068738 audiomixer: allocate DSP mixer port buffers dynamically
Like the audioconvert node, the DSP mixer embedded a fixed
buffers[MAX_BUFFERS] array (MAX_BUFFERS == 64) in struct port, each
struct buffer holding datas[MAX_DATAS] (MAX_DATAS == 64), reserving
~37 KB per port regardless of the actual buffer/channel count. A DSP
mixer port is created for every link set that mixes into a port, so
this adds up.

Allocate the buffer table and the per-buffer data-pointer pool in a
single calloc in port_use_buffers(), sized to the real number of
buffers and their data blocks, and release it in clear_buffers().
remove_port() now clears the port before zeroing it so a pooled port
does not leak its allocation, and impl_clear() clears the input and
output ports on teardown. Mirrors the audioconvert dynamic-allocation
change.

Co-authored-by: Copilot copilot@github.com
Change-Id: I47286a36ae60cc10d520c0cd500fcd00d6d37657
2026-06-12 18:19:35 +00:00
..
examples examples: set diffent Clock and Position on source 2026-05-11 14:02:29 +02:00
include port-config: add internalFormat to PortConfig 2026-06-12 17:50:46 +02:00
include-private/spa-private
lib spa: update lib.c 2026-03-09 18:33:32 +01:00
plugins audiomixer: allocate DSP mixer port buffers dynamically 2026-06-12 18:19:35 +00:00
tests tests: don't redefine spa_assert 2026-05-25 11:05:35 +02:00
tools tools: port various tools to the new json-builder 2026-02-26 10:51:17 +01:00
meson.build meson: Always use -fno-strict-aliasing and -fno-strict-overflow 2025-07-24 07:30:28 +00:00