implement DRM mode with dream
This commit is contained in:
parent
bec02795b8
commit
2411929455
13
csdr/csdr.py
13
csdr/csdr.py
@ -249,6 +249,10 @@ class dsp(object):
|
||||
"csdr agc_s16 --max 30 --initial 3",
|
||||
"sox -t raw -r 8000 -e signed-integer -b 16 -c 1 --buffer 32 - -t raw -r {output_rate} -e signed-integer -b 16 -c 1 - ",
|
||||
]
|
||||
elif self.isDrm(which):
|
||||
chain += last_decimation_block
|
||||
chain += ["csdr convert_f_s16"]
|
||||
chain += ["dream -c 6 --sigsrate 48000 -w test.wav -I - -O -"]
|
||||
elif which == "ssb":
|
||||
chain += ["csdr realpart_cf"]
|
||||
chain += last_decimation_block
|
||||
@ -534,7 +538,7 @@ class dsp(object):
|
||||
return self.hd_output_rate
|
||||
|
||||
def get_audio_rate(self):
|
||||
if self.isDigitalVoice() or self.isPacket() or self.isPocsag():
|
||||
if self.isDigitalVoice() or self.isPacket() or self.isPocsag() or self.isDrm():
|
||||
return 48000
|
||||
elif self.isWsjtMode() or self.isJs8():
|
||||
return 12000
|
||||
@ -577,7 +581,12 @@ class dsp(object):
|
||||
def isHdAudio(self, demodulator=None):
|
||||
if demodulator is None:
|
||||
demodulator = self.get_demodulator()
|
||||
return demodulator == "wfm"
|
||||
return demodulator in ["wfm", "drm"]
|
||||
|
||||
def isDrm(self, demodulator=None):
|
||||
if demodulator is None:
|
||||
demodulator = self.get_demodulator()
|
||||
return demodulator == "drm"
|
||||
|
||||
def set_output_rate(self, output_rate):
|
||||
if self.output_rate == output_rate:
|
||||
|
@ -45,6 +45,7 @@ class FeatureDetector(object):
|
||||
"packet": ["direwolf", "sox"],
|
||||
"pocsag": ["digiham", "sox"],
|
||||
"js8call": ["js8", "sox"],
|
||||
"drm": ["dream"],
|
||||
}
|
||||
|
||||
def feature_availability(self):
|
||||
@ -435,3 +436,6 @@ class FeatureDetector(object):
|
||||
You can find the codec2 source code [here](https://github.com/drowe67/codec2).
|
||||
"""
|
||||
return self.command_is_runnable("freedv_rx")
|
||||
|
||||
def has_dream(self):
|
||||
return self.command_is_runnable("dream")
|
||||
|
@ -50,6 +50,7 @@ class Modes(object):
|
||||
AnalogMode("nxdn", "NXDN", bandpass=Bandpass(-3250, 3250), requirements=["digital_voice_dsd"], squelch=False),
|
||||
AnalogMode("ysf", "YSF", bandpass=Bandpass(-4000, 4000), requirements=["digital_voice_digiham"], squelch=False),
|
||||
AnalogMode("freedv", "FreeDV", bandpass=Bandpass(300, 3000), requirements=["digital_voice_freedv"], squelch=False),
|
||||
AnalogMode("drm", "DRM", bandpass=Bandpass(-5000, 5000), requirements=["drm"], squelch=False),
|
||||
DigitalMode("bpsk31", "BPSK31", underlying=["usb"]),
|
||||
DigitalMode("bpsk63", "BPSK63", underlying=["usb"]),
|
||||
DigitalMode("ft8", "FT8", underlying=["usb"], requirements=["wsjt-x"], service=True),
|
||||
|
Loading…
Reference in New Issue
Block a user