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.
This commit is contained in:
Wim Taymans 2020-06-16 15:51:15 +02:00
parent f2245ecbb1
commit fc57f05e56
2 changed files with 8 additions and 8 deletions

View file

@ -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)

View file

@ -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)