start building digiham chains
This commit is contained in:
@ -4,8 +4,10 @@ from pycsdr.types import Format
|
||||
|
||||
|
||||
class ClientAudioChain(Chain):
|
||||
def __init__(self, inputRate: int, clientRate: int, compression: str):
|
||||
def __init__(self, format: Format, inputRate: int, clientRate: int, compression: str):
|
||||
workers = []
|
||||
if format != Format.FLOAT:
|
||||
workers += [Convert(format, Format.FLOAT)]
|
||||
if inputRate != clientRate:
|
||||
workers += [AudioResampler(inputRate, clientRate)]
|
||||
workers += [Convert(Format.FLOAT, Format.SHORT)]
|
||||
|
31
csdr/chain/digiham.py
Normal file
31
csdr/chain/digiham.py
Normal file
@ -0,0 +1,31 @@
|
||||
from csdr.chain import Chain
|
||||
from pycsdr.modules import FmDemod
|
||||
from digiham.modules import DstarDecoder, DcBlock, FskDemodulator, DigitalVoiceFilter, MbeSynthesizer, NarrowRrcFilter, NxdnDecoder
|
||||
|
||||
|
||||
class Dstar(Chain):
|
||||
def __init__(self, codecserver: str = ""):
|
||||
workers = [
|
||||
FmDemod(),
|
||||
DcBlock(),
|
||||
FskDemodulator(samplesPerSymbol=10),
|
||||
DstarDecoder(),
|
||||
MbeSynthesizer(codecserver),
|
||||
DigitalVoiceFilter()
|
||||
]
|
||||
super().__init__(*workers)
|
||||
|
||||
|
||||
class Nxdn(Chain):
|
||||
def __init__(self, codecserver: str = ""):
|
||||
workers = [
|
||||
FmDemod(),
|
||||
DcBlock(),
|
||||
NarrowRrcFilter(),
|
||||
# todo: switch out with gfsk
|
||||
FskDemodulator(samplesPerSymbol=20),
|
||||
NxdnDecoder(),
|
||||
MbeSynthesizer(codecserver),
|
||||
DigitalVoiceFilter()
|
||||
]
|
||||
super().__init__(*workers)
|
Reference in New Issue
Block a user