From 844eee678abab92b13b8dec0073978f9234e2eb2 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 12 Jan 2022 19:15:13 +0100 Subject: [PATCH] filter: return NULL when no DSP buffer is available Instead of returning the dummy empty buffer. The dummy buffer is problematic in various ways: 1) it has a fixed hardcoded size and doesn't adapt to the quantum_limit. 2) when used as output buffer, data is written to the void with no indication for the application. 3) using random data as an input buffer is going to cause unexpected noise with no indication to the application. --- src/pipewire/filter.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pipewire/filter.c b/src/pipewire/filter.c index 1bec67cea..43710872d 100644 --- a/src/pipewire/filter.c +++ b/src/pipewire/filter.c @@ -52,7 +52,6 @@ PW_LOG_TOPIC_EXTERN(log_filter); #define MASK_BUFFERS (MAX_BUFFERS-1) #define MAX_PORTS 1024 -static float empty[MAX_SAMPLES]; static bool mlock_warned = false; static uint32_t mappable_dataTypes = (1<buffer->datas[0];