mixer: increase mixer ports from 128 to 512

Don't allocate the mixer arrays on the stack but include in the
implementation structure.
This commit is contained in:
Wim Taymans 2023-04-21 15:58:38 +02:00
parent b9cf2638b3
commit 8cfa5ccd79
3 changed files with 20 additions and 11 deletions

View file

@ -23,7 +23,7 @@
#define NAME "control-mixer"
#define MAX_BUFFERS 64
#define MAX_PORTS 128
#define MAX_PORTS 512
struct buffer {
uint32_t id;
@ -70,6 +70,9 @@ struct impl {
struct port *in_ports[MAX_PORTS];
struct port out_ports[1];
struct spa_pod_control *mix_ctrl[MAX_PORTS];
struct spa_pod_sequence *mix_seq[MAX_PORTS];
int n_formats;
unsigned int have_format:1;
@ -624,9 +627,9 @@ static int impl_node_process(void *object)
return -EPIPE;
}
ctrl = alloca(MAX_PORTS * sizeof(struct spa_pod_control *));
seq = alloca(MAX_PORTS * sizeof(struct spa_pod_sequence *));
n_seq = 0;
ctrl = this->mix_ctrl;
seq = this->mix_seq;
n_seq = 0;
/* collect all sequence pod on input ports */
for (i = 0; i < this->last_port; i++) {