From 0ad318f61c34972197920acf3304dd79c1705469 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 11 Jan 2022 10:40:42 +0100 Subject: [PATCH] channelmix: enable normalization by default It is probably a better default to avoid clipping when downmixing. --- spa/plugins/audioconvert/channelmix.c | 2 ++ src/daemon/client-rt.conf.in | 2 +- src/daemon/client.conf.in | 2 +- src/daemon/pipewire-pulse.conf.in | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/spa/plugins/audioconvert/channelmix.c b/spa/plugins/audioconvert/channelmix.c index 59c5b9afc..a7f697d6f 100644 --- a/spa/plugins/audioconvert/channelmix.c +++ b/spa/plugins/audioconvert/channelmix.c @@ -1539,6 +1539,8 @@ impl_init(const struct spa_handle_factory *factory, props_reset(&this->props); + this->mix.options = CHANNELMIX_OPTION_NORMALIZE; + for (i = 0; info && i < info->n_items; i++) { const char *k = info->items[i].key; const char *s = info->items[i].value; diff --git a/src/daemon/client-rt.conf.in b/src/daemon/client-rt.conf.in index 9dca000aa..e902beafd 100644 --- a/src/daemon/client-rt.conf.in +++ b/src/daemon/client-rt.conf.in @@ -75,7 +75,7 @@ stream.properties = { #node.latency = 1024/48000 #node.autoconnect = true #resample.quality = 4 - #channelmix.normalize = false + #channelmix.normalize = true #channelmix.mix-lfe = true #channelmix.upmix = false #channelmix.lfe-cutoff = 0 diff --git a/src/daemon/client.conf.in b/src/daemon/client.conf.in index f4fed269d..8910085e4 100644 --- a/src/daemon/client.conf.in +++ b/src/daemon/client.conf.in @@ -65,7 +65,7 @@ stream.properties = { #node.latency = 1024/48000 #node.autoconnect = true #resample.quality = 4 - #channelmix.normalize = false + #channelmix.normalize = true #channelmix.mix-lfe = false #channelmix.upmix = false #channelmix.lfe-cutoff = 0 diff --git a/src/daemon/pipewire-pulse.conf.in b/src/daemon/pipewire-pulse.conf.in index f9faaf269..23870190e 100644 --- a/src/daemon/pipewire-pulse.conf.in +++ b/src/daemon/pipewire-pulse.conf.in @@ -73,7 +73,7 @@ stream.properties = { #node.latency = 1024/48000 #node.autoconnect = true #resample.quality = 4 - #channelmix.normalize = false + #channelmix.normalize = true #channelmix.mix-lfe = false #channelmix.upmix = false #channelmix.lfe-cutoff = 0