From b6053729a43c062dd61bc04f5f5bdacb781377bd Mon Sep 17 00:00:00 2001 From: Stan Grams Date: Sat, 28 Feb 2026 22:07:34 +0100 Subject: [PATCH] [fix](trx-backend-soapysdr): emit proper stereo pcm frames Co-authored-by: Codex Signed-off-by: Stan Grams --- .../trx-backend/trx-backend-soapysdr/src/dsp.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 4910e83..f292fd9 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 @@ -674,7 +674,16 @@ impl ChannelDsp { } *s = self.audio_agc.process(*s); } - raw + if self.output_channels >= 2 { + let mut stereo = Vec::with_capacity(raw.len() * self.output_channels); + for sample in raw { + stereo.push(sample); + stereo.push(sample); + } + stereo + } else { + raw + } }; // --- 5. Emit complete PCM frames ------------------------------------