summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CicEqualizer.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/CicEqualizer.cpp b/src/CicEqualizer.cpp
index d8eb2ee..a9c0dd6 100644
--- a/src/CicEqualizer.cpp
+++ b/src/CicEqualizer.cpp
@@ -46,11 +46,12 @@ CicEqualizer::CicEqualizer(size_t nbCarriers, size_t spacing, int R) :
float angle = pi * k / spacing;
if (k == 0) {
myFilter[i] = 1.0f;
- } else {
- myFilter[i] = sinf(angle / R) / sinf(angle * M);
- myFilter[i] = fabsf(myFilter[i]) * R * M;
- myFilter[i] = powf(myFilter[i], N);
- }
+ }
+ else {
+ myFilter[i] = sinf(angle / R) / sinf(angle * M);
+ myFilter[i] = fabsf(myFilter[i]) * R * M;
+ myFilter[i] = powf(myFilter[i], N);
+ }
PDEBUG("HCic[%zu -> %i] = %f (%f dB) -> angle: %f\n",
i, k,myFilter[i], 20.0 * log10(myFilter[i]), angle);
}
@@ -93,3 +94,4 @@ int CicEqualizer::process(Buffer* const dataIn, Buffer* dataOut)
return sizeOut;
}
+