From 6e03b4005d48a27191820c194a01952016d60c10 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 1 Jul 2020 11:41:46 +0200 Subject: [PATCH] increase amount of datas in a buffer --- pipewire-alsa/alsa-plugins/pcm_pipewire.c | 2 +- spa/plugins/audioconvert/channelmix.c | 2 +- spa/plugins/audioconvert/fmtconvert.c | 8 +++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/pipewire-alsa/alsa-plugins/pcm_pipewire.c b/pipewire-alsa/alsa-plugins/pcm_pipewire.c index 918c36663..9d2397f4d 100644 --- a/pipewire-alsa/alsa-plugins/pcm_pipewire.c +++ b/pipewire-alsa/alsa-plugins/pcm_pipewire.c @@ -48,7 +48,7 @@ #define MIN_BUFFERS 3u #define MAX_BUFFERS 64u -#define MAX_CHANNELS 32 +#define MAX_CHANNELS 64 #define MAX_RATE (48000*8) #define MIN_PERIOD 64 diff --git a/spa/plugins/audioconvert/channelmix.c b/spa/plugins/audioconvert/channelmix.c index 479ea8acb..3d6d62b74 100644 --- a/spa/plugins/audioconvert/channelmix.c +++ b/spa/plugins/audioconvert/channelmix.c @@ -49,7 +49,7 @@ #define DEFAULT_SAMPLES 8192 #define MAX_BUFFERS 32 -#define MAX_DATAS 32 +#define MAX_DATAS 64 #define DEFAULT_CONTROL_BUFFER_SIZE 32768 diff --git a/spa/plugins/audioconvert/fmtconvert.c b/spa/plugins/audioconvert/fmtconvert.c index 2624a1fc6..917565d38 100644 --- a/spa/plugins/audioconvert/fmtconvert.c +++ b/spa/plugins/audioconvert/fmtconvert.c @@ -49,10 +49,9 @@ #define DEFAULT_CHANNELS 2 #define MAX_SAMPLES 8192 -#define MAX_BUFFERS 64 +#define MAX_BUFFERS 32 #define MAX_ALIGN 16 -#define MAX_DATAS 32 -#define MAX_PORTS 128 +#define MAX_DATAS 64 #define PROP_DEFAULT_TRUNCATE false #define PROP_DEFAULT_DITHER 0 @@ -617,8 +616,7 @@ static int port_set_format(void *object, if (SPA_AUDIO_FORMAT_IS_PLANAR(info.info.raw.format)) { port->blocks = info.info.raw.channels; - } - else { + } else { port->stride *= info.info.raw.channels; port->blocks = 1; }