1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-09 09:25:07 -04:00

WDSP: more rework

This commit is contained in:
f4exb
2024-08-05 20:05:59 +02:00
parent de756413e8
commit 34917a0b21
32 changed files with 1483 additions and 1360 deletions
+9 -7
View File
@@ -38,9 +38,12 @@ namespace WDSP {
void BQLP::calc()
{
double w0, cs, c, den;
double w0;
double cs;
double c;
double den;
w0 = TWOPI * fc / (double)rate;
w0 = TWOPI * fc / rate;
cs = cos(w0);
c = sin(w0) / (2.0 * Q);
den = 1.0 + c;
@@ -95,15 +98,14 @@ void BQLP::execute()
{
if (run)
{
int i, j, n;
for (i = 0; i < size; i++)
for (int i = 0; i < size; i++)
{
for (j = 0; j < 2; j++)
for (int j = 0; j < 2; j++)
{
x0[j] = gain * in[2 * i + j];
for (n = 0; n < nstages; n++)
for (int n = 0; n < nstages; n++)
{
if (n > 0)
x0[2 * n + j] = y0[2 * (n - 1) + j];
@@ -118,7 +120,7 @@ void BQLP::execute()
x1[2 * n + j] = x0[2 * n + j];
}
out[2 * i + j] = y0[2 * (nstages - 1) + j];
out[2 * i + j] = (float) y0[2 * (nstages - 1) + j];
}
}
}