2021-09-07 17:31:32 +02:00
|
|
|
from csdr.chain.demodulator import BaseDemodulatorChain, FixedIfSampleRateChain, FixedAudioRateChain
|
2021-09-08 13:48:11 +02:00
|
|
|
from pycsdr.modules import Convert, Downmix
|
2021-09-07 17:31:32 +02:00
|
|
|
from pycsdr.types import Format
|
2021-09-20 15:32:26 +02:00
|
|
|
from csdr.module.drm import DrmModule
|
2021-09-07 17:31:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class Drm(BaseDemodulatorChain, FixedIfSampleRateChain, FixedAudioRateChain):
|
|
|
|
|
def __init__(self):
|
2024-01-22 01:14:05 +01:00
|
|
|
workers = [
|
|
|
|
|
Convert(Format.COMPLEX_FLOAT, Format.COMPLEX_SHORT),
|
|
|
|
|
DrmModule(),
|
|
|
|
|
Downmix(Format.SHORT),
|
|
|
|
|
]
|
2021-09-07 17:31:32 +02:00
|
|
|
super().__init__(workers)
|
|
|
|
|
|
2021-09-08 13:48:11 +02:00
|
|
|
def supportsSquelch(self) -> bool:
|
|
|
|
|
return False
|
|
|
|
|
|
2021-09-07 17:31:32 +02:00
|
|
|
def getFixedIfSampleRate(self) -> int:
|
|
|
|
|
return 48000
|
|
|
|
|
|
|
|
|
|
def getFixedAudioRate(self) -> int:
|
|
|
|
|
return 48000
|