restore audio chopper decoding
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
from pycsdr.modules import Reader
|
||||
from csdr.chain import Chain
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
@ -10,6 +11,10 @@ class BaseDemodulatorChain(Chain):
|
||||
return True
|
||||
|
||||
|
||||
class SecondaryDemodulator(Chain):
|
||||
pass
|
||||
|
||||
|
||||
class FixedAudioRateChain(ABC):
|
||||
@abstractmethod
|
||||
def getFixedAudioRate(self):
|
||||
|
14
csdr/chain/digimodes.py
Normal file
14
csdr/chain/digimodes.py
Normal file
@ -0,0 +1,14 @@
|
||||
from csdr.chain.demodulator import SecondaryDemodulator, FixedAudioRateChain
|
||||
from owrx.audio.chopper import AudioChopper
|
||||
from pycsdr.modules import Agc, Convert
|
||||
from pycsdr.types import Format
|
||||
|
||||
|
||||
class AudioChopperDemodulator(SecondaryDemodulator, FixedAudioRateChain):
|
||||
# TODO parser typing
|
||||
def __init__(self, mode: str, parser):
|
||||
workers = [Convert(Format.FLOAT, Format.SHORT), AudioChopper(mode, parser)]
|
||||
super().__init__(workers)
|
||||
|
||||
def getFixedAudioRate(self):
|
||||
return 12000
|
Reference in New Issue
Block a user