From 3fa3aac766af7088dbbd20ace45506172d6041ee Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Thu, 23 Sep 2021 15:17:46 +0200 Subject: [PATCH] introduce defaults layer to fix codecserver when empty --- owrx/dsp.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/owrx/dsp.py b/owrx/dsp.py index ac33742..6cb1ca2 100644 --- a/owrx/dsp.py +++ b/owrx/dsp.py @@ -319,11 +319,15 @@ class DspManager(SdrSourceEventClient): ), ) - # TODO wait for the rate to come from the client - if "output_rate" not in self.props: - self.props["output_rate"] = 12000 - if "hd_output_rate" not in self.props: - self.props["hd_output_rate"] = 48000 + # defaults for values that may not be set + self.props.addLayer( + 2, + PropertyLayer( + output_rate=12000, + hd_output_rate=48000, + digital_voice_codecserver="", + ).readonly() + ) self.chain = ClientDemodulatorChain( self._getDemodulator("nfm"),