mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-19 20:27:26 -05:00
More Analog Manual Audio Gain Tweaks;
This commit is contained in:
@@ -1425,7 +1425,7 @@ void analog_gain (dsd_opts * opts, dsd_state * state, short * input, int len)
|
|||||||
int i;
|
int i;
|
||||||
UNUSED(state);
|
UNUSED(state);
|
||||||
|
|
||||||
float gain = (opts->audio_gainA / 100.0f) * 3.0f; //scale 0x - 3x
|
float gain = (opts->audio_gainA / 100.0f) * 5.0f; //scale 0x - 5x
|
||||||
|
|
||||||
for (i = 0; i < len; i++)
|
for (i = 0; i < len; i++)
|
||||||
input[i] *= gain;
|
input[i] *= gain;
|
||||||
|
|||||||
@@ -583,7 +583,7 @@ initOpts (dsd_opts * opts)
|
|||||||
opts->mbe_out_fR = NULL; //second slot on a TDMA system
|
opts->mbe_out_fR = NULL; //second slot on a TDMA system
|
||||||
opts->audio_gain = 0;
|
opts->audio_gain = 0;
|
||||||
opts->audio_gainR = 0;
|
opts->audio_gainR = 0;
|
||||||
opts->audio_gainA = 30.0f; //scale of 1 - 100
|
opts->audio_gainA = 20.0f; //scale of 1 - 100
|
||||||
opts->audio_out = 1;
|
opts->audio_out = 1;
|
||||||
opts->wav_out_file[0] = 0;
|
opts->wav_out_file[0] = 0;
|
||||||
opts->wav_out_fileR[0] = 0;
|
opts->wav_out_fileR[0] = 0;
|
||||||
|
|||||||
@@ -278,9 +278,6 @@ getSymbol (dsd_opts * opts, dsd_state * state, int have_sync)
|
|||||||
sf_write_sync (opts->wav_out_raw);
|
sf_write_sync (opts->wav_out_raw);
|
||||||
}
|
}
|
||||||
|
|
||||||
//manual gain control
|
|
||||||
analog_gain (opts, state, state->analog_out, 960);
|
|
||||||
|
|
||||||
//low pass filter
|
//low pass filter
|
||||||
// lpf(state, state->analog_out, 960);
|
// lpf(state, state->analog_out, 960);
|
||||||
|
|
||||||
@@ -290,6 +287,9 @@ getSymbol (dsd_opts * opts, dsd_state * state, int have_sync)
|
|||||||
//pass band filter
|
//pass band filter
|
||||||
pbf(state, state->analog_out, 960);
|
pbf(state, state->analog_out, 960);
|
||||||
|
|
||||||
|
//manual gain control
|
||||||
|
analog_gain (opts, state, state->analog_out, 960);
|
||||||
|
|
||||||
//Running RMS after filtering does remove the analog spike from the RMS value
|
//Running RMS after filtering does remove the analog spike from the RMS value
|
||||||
//but noise floor noise will still produce higher values
|
//but noise floor noise will still produce higher values
|
||||||
// if (opts->audio_in_type != 3 && opts->monitor_input_audio == 1)
|
// if (opts->audio_in_type != 3 && opts->monitor_input_audio == 1)
|
||||||
|
|||||||
@@ -214,12 +214,6 @@ void edacs_analog(dsd_opts * opts, dsd_state * state, int afs, unsigned char lcn
|
|||||||
if (state->dmr_payload_p > state->dmr_payload_buf + 900000)
|
if (state->dmr_payload_p > state->dmr_payload_buf + 900000)
|
||||||
state->dmr_payload_p = state->dmr_payload_buf + 200;
|
state->dmr_payload_p = state->dmr_payload_buf + 200;
|
||||||
|
|
||||||
|
|
||||||
//manual gain control
|
|
||||||
analog_gain (opts, state, analog1, 960);
|
|
||||||
analog_gain (opts, state, analog2, 960);
|
|
||||||
analog_gain (opts, state, analog3, 960);
|
|
||||||
|
|
||||||
// low pass filter
|
// low pass filter
|
||||||
// lpf (state, analog1, 960);
|
// lpf (state, analog1, 960);
|
||||||
// lpf (state, analog2, 960);
|
// lpf (state, analog2, 960);
|
||||||
@@ -235,6 +229,11 @@ void edacs_analog(dsd_opts * opts, dsd_state * state, int afs, unsigned char lcn
|
|||||||
pbf (state, analog2, 960);
|
pbf (state, analog2, 960);
|
||||||
pbf (state, analog3, 960);
|
pbf (state, analog3, 960);
|
||||||
|
|
||||||
|
//manual gain control
|
||||||
|
analog_gain (opts, state, analog1, 960);
|
||||||
|
analog_gain (opts, state, analog2, 960);
|
||||||
|
analog_gain (opts, state, analog3, 960);
|
||||||
|
|
||||||
//NOTE: Ideally, we would run raw_rms for TCP/VS here, but the analog spike on EDACS (STM)
|
//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,
|
//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
|
//it counts against the squelch hit as no audio, so we will just have to use
|
||||||
|
|||||||
Reference in New Issue
Block a user