get freedv back by modeling a corresponding module and chain
This commit is contained in:
28
csdr/chain/freedv.py
Normal file
28
csdr/chain/freedv.py
Normal file
@ -0,0 +1,28 @@
|
||||
from csdr.chain.demodulator import BaseDemodulatorChain, FixedIfSampleRateChain, FixedAudioRateChain
|
||||
from owrx.freedv import FreeDVModule
|
||||
from pycsdr.modules import RealPart, Agc, Convert
|
||||
from pycsdr.types import Format
|
||||
|
||||
|
||||
class FreeDV(BaseDemodulatorChain, FixedIfSampleRateChain, FixedAudioRateChain):
|
||||
def __init__(self):
|
||||
agc = Agc(Format.SHORT)
|
||||
agc.setMaxGain(30)
|
||||
agc.setInitialGain(3)
|
||||
workers = [
|
||||
RealPart(),
|
||||
Agc(Format.FLOAT),
|
||||
Convert(Format.FLOAT, Format.SHORT),
|
||||
FreeDVModule(),
|
||||
agc,
|
||||
]
|
||||
super().__init__(workers)
|
||||
|
||||
def getFixedIfSampleRate(self) -> int:
|
||||
return 8000
|
||||
|
||||
def getFixedAudioRate(self) -> int:
|
||||
return 8000
|
||||
|
||||
def supportsSquelch(self) -> bool:
|
||||
return False
|
Reference in New Issue
Block a user