mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-22 19:58:39 -05:00
Add solo squelch break
This commit is contained in:
parent
16ba35a892
commit
008a7bf77d
@ -17,6 +17,7 @@ DemodulatorThread::DemodulatorThread(DemodulatorInstance *parent) : IOThread(),
|
||||
|
||||
demodInstance = parent;
|
||||
muted.store(false);
|
||||
squelchBreak = false;
|
||||
}
|
||||
|
||||
DemodulatorThread::~DemodulatorThread() {
|
||||
@ -147,6 +148,17 @@ void DemodulatorThread::run() {
|
||||
|
||||
bool squelched = (squelchEnabled && (signalLevel < squelchLevel));
|
||||
|
||||
if (squelchEnabled) {
|
||||
if (!squelched && !squelchBreak) {
|
||||
if (wxGetApp().getSoloMode()) {
|
||||
wxGetApp().getDemodMgr().setActiveDemodulator(demodInstance, false);
|
||||
}
|
||||
squelchBreak = true;
|
||||
} else if (squelched && squelchBreak) {
|
||||
squelchBreak = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (audioOutputQueue != NULL && ati && !squelched) {
|
||||
std::vector<float>::iterator data_i;
|
||||
ati->peak = 0;
|
||||
|
@ -33,6 +33,7 @@ public:
|
||||
void setSquelchLevel(float signal_level_in);
|
||||
float getSquelchLevel();
|
||||
|
||||
bool getSquelchBreak();
|
||||
|
||||
protected:
|
||||
|
||||
@ -46,7 +47,7 @@ protected:
|
||||
|
||||
std::atomic<float> squelchLevel;
|
||||
std::atomic<float> signalLevel;
|
||||
bool squelchEnabled;
|
||||
bool squelchEnabled, squelchBreak;
|
||||
|
||||
Modem *cModem;
|
||||
ModemKit *cModemKit;
|
||||
|
Loading…
Reference in New Issue
Block a user