Misc Notes on using raw_rms values during testing;

This commit is contained in:
lwvmobile 2024-03-21 12:34:01 -04:00
parent b273e5b7be
commit c985fea035
3 changed files with 17 additions and 0 deletions

View File

@ -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
{

View File

@ -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)

View File

@ -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));