From 313c9b39a677ffffbd15634fe51b75c830baa691 Mon Sep 17 00:00:00 2001 From: Stan Grams Date: Sun, 1 Mar 2026 11:19:50 +0100 Subject: [PATCH] [fix](trx-backend-soapysdr): increase wfm stereo matrix gain to 0.80 More stereo headroom for broadcast audio. With WFM_OUTPUT_GAIN at 0.35 the effective output is 0.28 peak, well within clipping margin. Co-Authored-By: Claude Opus 4.6 Signed-off-by: Stan Grams --- src/trx-server/trx-backend/trx-backend-soapysdr/src/demod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/trx-server/trx-backend/trx-backend-soapysdr/src/demod.rs b/src/trx-server/trx-backend/trx-backend-soapysdr/src/demod.rs index 052e7e7..42b2278 100644 --- a/src/trx-server/trx-backend/trx-backend-soapysdr/src/demod.rs +++ b/src/trx-server/trx-backend/trx-backend-soapysdr/src/demod.rs @@ -33,7 +33,7 @@ const STEREO_SEPARATION_PHASE_TRIM: f32 = 0.0; const STEREO_SEPARATION_GAIN: f32 = 1.000; /// Extra headroom in the stereo matrix to reduce stereo-only clipping/IMD on /// strong program material. This keeps bass excursions from flattening treble. -const STEREO_MATRIX_GAIN: f32 = 0.50; +const STEREO_MATRIX_GAIN: f32 = 0.80; /// Stereo detection runs every N composite samples to reduce CPU. const STEREO_DETECT_DECIMATION: u32 = 16; /// Gentle high-pass memory for the stereo L-R path.