#35 Updates AM & NBFM decoders to use Adaptive Squelch, a power squelch that includes an adaptive noise floor monitor. Implements vectorized magnitude operations for AM & FM decoders. Adds talkgroup assignment and squelch controls to AM channel configuration editor. Implements new AM gain control that attempts to normalize audio gain quickly at beginning of call/transmission and maintains that gain across lifecycle of the call and resets the gain for the next call. (#1540)

Notes on usage:
- When using either AM or FM squelch control use either the Heterodyne channelizer or if using the Polyphase channelizer, avoid using trunk tracking decoders like DMR or P25 or set the squelch threshold high enough to avoid changes in noise floor from polyphase channelizer where it can vary between using the one channel or the two-channel combined channel sources.

Co-authored-by: Dennis Sheirer <dsheirer@github.com>
This commit is contained in:
Denny Sheirer
2023-05-07 07:27:44 -04:00
committed by GitHub
parent 5654254cbb
commit 4f8b8e978b
74 changed files with 4630 additions and 2012 deletions

View File

@@ -1,6 +1,6 @@
/*
* *****************************************************************************
* Copyright (C) 2014-2022 Dennis Sheirer
* Copyright (C) 2014-2023 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -47,6 +47,7 @@ public class ComplexWaveSource extends Source implements IControllableFileSource
private final static Logger mLog = LoggerFactory.getLogger(ComplexWaveSource.class);
private IFrameLocationListener mFrameLocationListener;
private int mBufferSampleCount = 65536; //Complex samples per buffer
private int mBytesPerFrame;
private int mFrameCounter = 0;
private long mFrequency = 0;
@@ -119,7 +120,8 @@ public class ComplexWaveSource extends Source implements IControllableFileSource
*/
public int getBufferSampleCount()
{
return (int)(getSampleRate() / 20.0d);
return mBufferSampleCount;
// return (int)(getSampleRate() / 20.0d);
}
@Override
@@ -139,12 +141,11 @@ public class ComplexWaveSource extends Source implements IControllableFileSource
if(mAutoReplay)
{
long intervalMilliseconds = 50; //20 intervals per second
double framesPerInterval = getSampleRate() / 20.0d;
mReplayController = ThreadPool.SCHEDULED.scheduleAtFixedRate(new ReplayController(framesPerInterval),
double sampleRate = getSampleRate();
double buffersPerSecond = (sampleRate / mBufferSampleCount);
long intervalMilliseconds = (long)(1000.0 / buffersPerSecond);
mReplayController = ThreadPool.SCHEDULED.scheduleAtFixedRate(new ReplayController(mBufferSampleCount),
0, intervalMilliseconds, TimeUnit.MILLISECONDS);
}
}