1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-10 18:43:28 -05:00

WDSP: fixed FM squelch

This commit is contained in:
f4exb 2024-07-06 22:41:33 +02:00
parent ed3a57c92c
commit 44fb308c4a
2 changed files with 6 additions and 4 deletions

View File

@ -313,7 +313,7 @@ RXA* RXA::create_rxa (
0.750, // noise level to initiate tail
0.562, // noise level to initiate unmute
0.000, // minimum tail time
1.200, // maximum tail time
0.100, // maximum tail time
std::max(2048, rxa->dsp_size), // number of coefficients for noise filter
0); // minimum phase flag

View File

@ -35,7 +35,7 @@ namespace WDSP {
void FMSQ::calc_fmsq (FMSQ *a)
{
double delta, theta;
float delta, theta;
float* impulse;
int i;
// noise filter
@ -168,11 +168,13 @@ void FMSQ::xfmsq (FMSQ *a)
if (a->run)
{
int i;
float noise, lnlimit;
double noise, lnlimit;
FIRCORE::xfircore (a->p);
for (i = 0; i < a->size; i++)
{
noise = sqrt(a->noise[2 * i + 0] * a->noise[2 * i + 0] + a->noise[2 * i + 1] * a->noise[2 * i + 1]);
double noise0 = a->noise[2 * i + 0];
double noise1 = a->noise[2 * i + 1];
noise = sqrt(noise0 * noise0 + noise1 * noise1);
a->avnoise = a->avm * a->avnoise + a->onem_avm * noise;
a->longnoise = a->longavm * a->longnoise + a->onem_longavm * noise;
if (!a->ready) a->ramp += a->rstep;