add empty demodulator (for modes that don't produce any usable audio)
This commit is contained in:
parent
f62b536388
commit
063023564b
|
|
@ -74,3 +74,14 @@ class Ssb(BaseDemodulatorChain):
|
||||||
Agc(Format.FLOAT),
|
Agc(Format.FLOAT),
|
||||||
]
|
]
|
||||||
super().__init__(workers)
|
super().__init__(workers)
|
||||||
|
|
||||||
|
|
||||||
|
class Empty(BaseDemodulatorChain):
|
||||||
|
def __init__(self):
|
||||||
|
super().__init__([])
|
||||||
|
|
||||||
|
def getOutputFormat(self) -> Format:
|
||||||
|
return Format.FLOAT
|
||||||
|
|
||||||
|
def setWriter(self, writer):
|
||||||
|
pass
|
||||||
|
|
|
||||||
|
|
@ -554,6 +554,9 @@ class DspManager(SdrSourceEventClient, ClientDemodulatorSecondaryDspEventClient)
|
||||||
elif demod == "freedv":
|
elif demod == "freedv":
|
||||||
from csdr.chain.freedv import FreeDV
|
from csdr.chain.freedv import FreeDV
|
||||||
return FreeDV()
|
return FreeDV()
|
||||||
|
elif demod == "none":
|
||||||
|
from csdr.chain.analog import Empty
|
||||||
|
return Empty()
|
||||||
|
|
||||||
def setDemodulator(self, mod):
|
def setDemodulator(self, mod):
|
||||||
self.chain.stopDemodulator()
|
self.chain.stopDemodulator()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue