Commit fc57f05e authored by Wim Taymans's avatar Wim Taymans
Browse files

audioconvert: reduce memory usage

We only need as many ports and buffer data as the maximum number
of channels, which is 64.
Fix empty output size. We're only ever going to fill this with
float samples.
parent f2245ecb
Pipeline #161566 passed with stages
in 1 minute and 37 seconds
......@@ -53,9 +53,9 @@
#define MAX_SAMPLES 8192
#define MAX_ALIGN 16
#define MAX_BUFFERS 64
#define MAX_DATAS 32
#define MAX_PORTS 128
#define MAX_BUFFERS 32
#define MAX_DATAS 64
#define MAX_PORTS 64
struct buffer {
uint32_t id;
......@@ -116,7 +116,7 @@ struct impl {
unsigned int monitor:1;
unsigned int have_profile:1;
float empty[MAX_SAMPLES*2 + MAX_ALIGN];
float empty[MAX_SAMPLES + MAX_ALIGN];
};
#define CHECK_IN_PORT(this,d,p) ((d) == SPA_DIRECTION_INPUT && (p) < this->port_count)
......
......@@ -52,9 +52,9 @@
#define MAX_SAMPLES 8192
#define MAX_ALIGN 16
#define MAX_BUFFERS 64
#define MAX_DATAS 32
#define MAX_PORTS 128
#define MAX_BUFFERS 32
#define MAX_DATAS 64
#define MAX_PORTS 64
struct buffer {
uint32_t id;
......@@ -116,7 +116,7 @@ struct impl {
bool have_profile;
float empty[MAX_SAMPLES*2 + MAX_ALIGN];
float empty[MAX_SAMPLES + MAX_ALIGN];
};
#define CHECK_OUT_PORT(this,d,p) ((d) == SPA_DIRECTION_OUTPUT && (p) < this->port_count)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment