diff --git a/src/dsd_symbol.c b/src/dsd_symbol.c index 5579383..82ed3c1 100644 --- a/src/dsd_symbol.c +++ b/src/dsd_symbol.c @@ -290,6 +290,11 @@ getSymbol (dsd_opts * opts, dsd_state * state, int have_sync) //pass band filter pbf(state, state->analog_out, 960); + //Running RMS after filtering does remove the analog spike from the RMS value + //but noise floor noise will still produce higher values + // if (opts->audio_in_type != 3 && opts->monitor_input_audio == 1) + // opts->rtl_rms = raw_rms(state->analog_out, 960, 1); + //seems to be working now, but RMS values are lower on actual analog signal than on no signal but noise if ( (opts->rtl_rms > opts->rtl_squelch_level) && opts->monitor_input_audio == 1 && state->carrier == 0 ) //added carrier check here in lieu of disabling it above { diff --git a/src/edacs-fme.c b/src/edacs-fme.c index 012315a..ab87082 100644 --- a/src/edacs-fme.c +++ b/src/edacs-fme.c @@ -235,6 +235,12 @@ void edacs_analog(dsd_opts * opts, dsd_state * state, int afs, unsigned char lcn pbf (state, analog2, 960); pbf (state, analog3, 960); + //NOTE: Ideally, we would run raw_rms for TCP/VS here, but the analog spike on EDACS (STM) + //system gets filtered out, and when they hold the radio open and don't talk, + //it counts against the squelch hit as no audio, so we will just have to use + //the squelch checkbox in SDR++ and similar when using those input methods + // if (opts->audio_in_type != 3) + // rms = raw_rms(analog3, 960, 1); //reconfigured to use seperate audio out stream that is always 48k short if (opts->audio_out_type == 0 && opts->slot1_on == 1) diff --git a/src/m17.c b/src/m17.c index 6b601f0..3ed065c 100644 --- a/src/m17.c +++ b/src/m17.c @@ -1861,6 +1861,12 @@ void encodeM17STR(dsd_opts * opts, dsd_state * state) pbf (state, voice2, 160); } + //NOTE: Similar to EDACS analog, if calculating raw rms here after filtering, + //anytime the walkie-talkie is held open but no voice, the center spike is removed, + //and counts against the squelch hits making vox mode inconsistent + // if (opts->audio_in_type != 3) + // opts->rtl_rms = raw_rms(voice1, 160, 1); + //convert out audio input into CODEC2 (3200bps) 8 byte data stream uint8_t vc1_bytes[8]; memset (vc1_bytes, 0, sizeof(vc1_bytes)); uint8_t vc2_bytes[8]; memset (vc2_bytes, 0, sizeof(vc2_bytes));