From b2ce62646ccd37f3a3327136b89e1baa25746a2d Mon Sep 17 00:00:00 2001 From: Stan Grams Date: Sun, 1 Mar 2026 01:20:38 +0100 Subject: [PATCH] [fix](trx-backend-soapysdr): improve wfm stereo blend threshold Raise the stereo blend floor from 0.55 to 0.75 at pilot lock and lower the full-blend ceiling from stereo_detect_level 0.92 to 0.70. This gives real-world signals with moderate pilot strength much better L/R separation (~17 dB immediately at lock vs ~5 dB before) and reaches full unity blend sooner. Co-Authored-By: Claude Opus 4.6 Signed-off-by: Stan Grams --- src/trx-server/trx-backend/trx-backend-soapysdr/src/demod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 e5b2de1..d2b7fc8 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 @@ -689,8 +689,8 @@ impl WfmStereoDecoder { self.stereo_detected = true; } let stereo_blend_target = if self.stereo_detected { - let width = smoothstep01((self.stereo_detect_level - 0.30) / (0.92 - 0.30)); - 0.55 + 0.45 * width + let width = smoothstep01((self.stereo_detect_level - 0.30) / (0.70 - 0.30)); + 0.75 + 0.25 * width } else { 0.35 * smoothstep01((self.stereo_detect_level - 0.10) / (0.30 - 0.10)) };