use 16bit agc for freedv and dsd modes, refs #126

This commit is contained in:
Jakob Ketterl 2020-08-27 22:35:49 +02:00
parent 53eefa7c80
commit d1cea95eb4
2 changed files with 13 additions and 9 deletions

View File

@ -212,8 +212,11 @@ class dsp(object):
chain += ["dsd -fd -i - -o - -u {unvoiced_quality} -g -1 "] chain += ["dsd -fd -i - -o - -u {unvoiced_quality} -g -1 "]
elif which == "nxdn": elif which == "nxdn":
chain += ["dsd -fi -i - -o - -u {unvoiced_quality} -g -1 "] chain += ["dsd -fi -i - -o - -u {unvoiced_quality} -g -1 "]
chain += ["CSDR_FIXED_BUFSIZE=32 csdr convert_s16_f"] chain += [
max_gain = 50 "digitalvoice_filter",
"CSDR_FIXED_BUFSIZE=32 csdr agc_s16 --max 50 --initial 5",
"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 - ",
]
# digiham modes # digiham modes
else: else:
chain += ["rrc_filter", "gfsk_demodulator"] chain += ["rrc_filter", "gfsk_demodulator"]
@ -227,7 +230,7 @@ class dsp(object):
max_gain = 0.005 max_gain = 0.005
chain += [ chain += [
"digitalvoice_filter -f", "digitalvoice_filter -f",
"CSDR_FIXED_BUFSIZE=32 csdr agc_ff --max {max_gain} --initial {initial_gain}".format(max_gain=max_gain, initial_gain=max_gain / 10), "CSDR_FIXED_BUFSIZE=32 csdr agc_ff --max 0.005 --initial 0.0005",
"sox -t raw -r 8000 -e floating-point -b 32 -c 1 --buffer 32 - -t raw -r {output_rate} -e signed-integer -b 16 -c 1 - ", "sox -t raw -r 8000 -e floating-point -b 32 -c 1 --buffer 32 - -t raw -r {output_rate} -e signed-integer -b 16 -c 1 - ",
] ]
elif which == "am": elif which == "am":
@ -245,6 +248,7 @@ class dsp(object):
"csdr agc_ff", "csdr agc_ff",
"csdr convert_f_s16", "csdr convert_f_s16",
"freedv_rx 1600 - -", "freedv_rx 1600 - -",
"csdr agc_s16",
"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 - ", "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 which == "ssb": elif which == "ssb":

View File

@ -54,8 +54,8 @@ cmakebuild itpp bb5c7e95f40e8fdb5c3f3d01a84bcbaf76f3676d
git clone https://github.com/jketterl/csdr.git git clone https://github.com/jketterl/csdr.git
cd csdr cd csdr
# develop as of 2020-08-26, includes agc rework # develop as of 2020-08-27
git checkout a308c6b369d3eb47242e644c0c41dd27c6a4ec47 git checkout 3ebba68e956379c6e906e48777fbdcd950839d80
autoreconf -i autoreconf -i
./configure ./configure
make make