mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-15 08:56:38 -05:00
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:
parent
b9cf2638b3
commit
8cfa5ccd79
3 changed files with 20 additions and 11 deletions
|
|
@ -29,7 +29,7 @@ static struct spa_log_topic *log_topic = &SPA_LOG_TOPIC(0, "spa.audiomixer");
|
||||||
#define DEFAULT_CHANNELS 2
|
#define DEFAULT_CHANNELS 2
|
||||||
|
|
||||||
#define MAX_BUFFERS 64
|
#define MAX_BUFFERS 64
|
||||||
#define MAX_PORTS 128
|
#define MAX_PORTS 512
|
||||||
#define MAX_CHANNELS 64
|
#define MAX_CHANNELS 64
|
||||||
#define MAX_ALIGN MIX_OPS_MAX_ALIGN
|
#define MAX_ALIGN MIX_OPS_MAX_ALIGN
|
||||||
|
|
||||||
|
|
@ -103,6 +103,9 @@ struct impl {
|
||||||
struct port *in_ports[MAX_PORTS];
|
struct port *in_ports[MAX_PORTS];
|
||||||
struct port out_ports[1];
|
struct port out_ports[1];
|
||||||
|
|
||||||
|
struct buffer *mix_buffers[MAX_PORTS];
|
||||||
|
const void *mix_datas[MAX_PORTS];
|
||||||
|
|
||||||
int n_formats;
|
int n_formats;
|
||||||
struct spa_audio_info format;
|
struct spa_audio_info format;
|
||||||
|
|
||||||
|
|
@ -737,9 +740,9 @@ static int impl_node_process(void *object)
|
||||||
outio->buffer_id = SPA_ID_INVALID;
|
outio->buffer_id = SPA_ID_INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
buffers = alloca(MAX_PORTS * sizeof(struct buffer *));
|
buffers = this->mix_buffers;
|
||||||
datas = alloca(MAX_PORTS * sizeof(void *));
|
datas = this->mix_datas;
|
||||||
n_buffers = 0;
|
n_buffers = 0;
|
||||||
|
|
||||||
maxsize = UINT32_MAX;
|
maxsize = UINT32_MAX;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
static struct spa_log_topic *log_topic = &SPA_LOG_TOPIC(0, "spa.mixer-dsp");
|
static struct spa_log_topic *log_topic = &SPA_LOG_TOPIC(0, "spa.mixer-dsp");
|
||||||
|
|
||||||
#define MAX_BUFFERS 64
|
#define MAX_BUFFERS 64
|
||||||
#define MAX_PORTS 128
|
#define MAX_PORTS 512
|
||||||
#define MAX_ALIGN MIX_OPS_MAX_ALIGN
|
#define MAX_ALIGN MIX_OPS_MAX_ALIGN
|
||||||
|
|
||||||
#define PORT_DEFAULT_VOLUME 1.0
|
#define PORT_DEFAULT_VOLUME 1.0
|
||||||
|
|
@ -100,6 +100,9 @@ struct impl {
|
||||||
struct port *in_ports[MAX_PORTS];
|
struct port *in_ports[MAX_PORTS];
|
||||||
struct port out_ports[1];
|
struct port out_ports[1];
|
||||||
|
|
||||||
|
struct buffer *mix_buffers[MAX_PORTS];
|
||||||
|
const void *mix_datas[MAX_PORTS];
|
||||||
|
|
||||||
int n_formats;
|
int n_formats;
|
||||||
struct spa_audio_info format;
|
struct spa_audio_info format;
|
||||||
uint32_t stride;
|
uint32_t stride;
|
||||||
|
|
@ -673,8 +676,8 @@ static int impl_node_process(void *object)
|
||||||
outio->buffer_id = SPA_ID_INVALID;
|
outio->buffer_id = SPA_ID_INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
buffers = alloca(MAX_PORTS * sizeof(struct buffer *));
|
buffers = this->mix_buffers;
|
||||||
datas = alloca(MAX_PORTS * sizeof(void *));
|
datas = this->mix_datas;
|
||||||
n_buffers = 0;
|
n_buffers = 0;
|
||||||
|
|
||||||
maxsize = UINT32_MAX;
|
maxsize = UINT32_MAX;
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
#define NAME "control-mixer"
|
#define NAME "control-mixer"
|
||||||
|
|
||||||
#define MAX_BUFFERS 64
|
#define MAX_BUFFERS 64
|
||||||
#define MAX_PORTS 128
|
#define MAX_PORTS 512
|
||||||
|
|
||||||
struct buffer {
|
struct buffer {
|
||||||
uint32_t id;
|
uint32_t id;
|
||||||
|
|
@ -70,6 +70,9 @@ struct impl {
|
||||||
struct port *in_ports[MAX_PORTS];
|
struct port *in_ports[MAX_PORTS];
|
||||||
struct port out_ports[1];
|
struct port out_ports[1];
|
||||||
|
|
||||||
|
struct spa_pod_control *mix_ctrl[MAX_PORTS];
|
||||||
|
struct spa_pod_sequence *mix_seq[MAX_PORTS];
|
||||||
|
|
||||||
int n_formats;
|
int n_formats;
|
||||||
|
|
||||||
unsigned int have_format:1;
|
unsigned int have_format:1;
|
||||||
|
|
@ -624,9 +627,9 @@ static int impl_node_process(void *object)
|
||||||
return -EPIPE;
|
return -EPIPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctrl = alloca(MAX_PORTS * sizeof(struct spa_pod_control *));
|
ctrl = this->mix_ctrl;
|
||||||
seq = alloca(MAX_PORTS * sizeof(struct spa_pod_sequence *));
|
seq = this->mix_seq;
|
||||||
n_seq = 0;
|
n_seq = 0;
|
||||||
|
|
||||||
/* collect all sequence pod on input ports */
|
/* collect all sequence pod on input ports */
|
||||||
for (i = 0; i < this->last_port; i++) {
|
for (i = 0; i < this->last_port; i++) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue