aboutsummaryrefslogtreecommitdiffstats
path: root/src/nmt
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-10-09 20:49:14 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2017-10-22 19:23:08 +0200
commitb32e0ab6025a025850dc0079fa6596a96d7295a6 (patch)
tree199098e532a80417d5a3a18e80172280ccb84cad /src/nmt
parentf7a0e4622bed9551bb0999d3c54bb69249065d38 (diff)
Implementation of RX level squelch (for A-Netz and B-Netz)
Use -S <dB> for setting RF level or use -S auto for auto level. When squelch closes, audio is muted. If squelch is closed for some seconds (depending on network), call is released. (RF loss condition) The previous loss detection has been removed
Diffstat (limited to 'src/nmt')
-rw-r--r--src/nmt/dsp.c2
-rw-r--r--src/nmt/nmt.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/nmt/dsp.c b/src/nmt/dsp.c
index b95191b..9ff6d67 100644
--- a/src/nmt/dsp.c
+++ b/src/nmt/dsp.c
@@ -303,7 +303,7 @@ void super_reset(nmt_t *nmt)
}
/* Process received audio stream from radio unit. */
-void sender_receive(sender_t *sender, sample_t *samples, int length)
+void sender_receive(sender_t *sender, sample_t *samples, int length, double __attribute__((unused)) rf_level_db)
{
nmt_t *nmt = (nmt_t *) sender;
sample_t *spl;
diff --git a/src/nmt/nmt.c b/src/nmt/nmt.c
index 40d8727..73dcdc7 100644
--- a/src/nmt/nmt.c
+++ b/src/nmt/nmt.c
@@ -283,7 +283,7 @@ int nmt_create(int nmt_system, const char *country, int channel, enum nmt_chan_t
PDEBUG(DNMT, DEBUG_DEBUG, "Creating 'NMT' instance for channel = %d (sample rate %d).\n", channel, samplerate);
/* init general part of transceiver */
- rc = sender_create(&nmt->sender, channel, nmt_channel2freq(nmt_system, country, channel, 0, NULL, NULL, NULL), nmt_channel2freq(nmt_system, country, channel, 1, NULL, NULL, NULL), audiodev, use_sdr, samplerate, rx_gain, pre_emphasis, de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, 0, PAGING_SIGNAL_NONE);
+ rc = sender_create(&nmt->sender, channel, nmt_channel2freq(nmt_system, country, channel, 0, NULL, NULL, NULL), nmt_channel2freq(nmt_system, country, channel, 1, NULL, NULL, NULL), audiodev, use_sdr, samplerate, rx_gain, pre_emphasis, de_emphasis, write_rx_wave, write_tx_wave, read_rx_wave, read_tx_wave, loopback, PAGING_SIGNAL_NONE);
if (rc < 0) {
PDEBUG(DNMT, DEBUG_ERROR, "Failed to init transceiver process!\n");
goto error;