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 5968ef2..6207774 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 @@ -158,14 +158,6 @@ impl SoftAgc { let gain = self.update_gain(x.abs()); (x * gain).clamp(-1.0, 1.0) } - - pub(crate) fn process_pair(&mut self, left: f32, right: f32) -> (f32, f32) { - let gain = self.update_gain(left.abs().max(right.abs())); - ( - (left * gain).clamp(-1.0, 1.0), - (right * gain).clamp(-1.0, 1.0), - ) - } } impl BiquadBandPass { diff --git a/src/trx-server/trx-backend/trx-backend-soapysdr/src/dsp.rs b/src/trx-server/trx-backend/trx-backend-soapysdr/src/dsp.rs index 803d975..7d0e599 100644 --- a/src/trx-server/trx-backend/trx-backend-soapysdr/src/dsp.rs +++ b/src/trx-server/trx-backend/trx-backend-soapysdr/src/dsp.rs @@ -654,25 +654,7 @@ impl ChannelDsp { // All other modes: stateless demodulator → DC blocker (where enabled) → AGC. // AGC is applied to WFM output too so all modes share the same target level. let audio = if let Some(decoder) = self.wfm_decoder.as_mut() { - let mut out = decoder.process_iq(&decimated); - if !self.wfm_stereo && self.output_channels >= 2 { - for pair in out.chunks_exact_mut(2) { - let mono = self.audio_agc.process(pair[0]); - pair[0] = mono; - pair[1] = mono; - } - } else if self.wfm_stereo && self.output_channels >= 2 { - for pair in out.chunks_exact_mut(2) { - let (left, right) = self.audio_agc.process_pair(pair[0], pair[1]); - pair[0] = left; - pair[1] = right; - } - } else { - for s in &mut out { - *s = self.audio_agc.process(*s); - } - } - out + decoder.process_iq(&decimated) } else { let mut raw = self.demodulator.demodulate(&decimated); for s in &mut raw {