1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-09-02 21:27:48 -04:00

Use namepsace instead empty class

This commit is contained in:
Kacper Michajłow 2020-11-01 00:45:19 +01:00 committed by f4exb
parent fff4b7e465
commit eeb243ea7e
3 changed files with 9 additions and 4 deletions

View File

@ -270,6 +270,7 @@ set(sdrbase_HEADERS
dsp/inthalfbandfiltersti.h dsp/inthalfbandfiltersti.h
dsp/kissfft.h dsp/kissfft.h
dsp/kissengine.h dsp/kissengine.h
dsp/firfilter.h
dsp/mimochannel.h dsp/mimochannel.h
dsp/misc.h dsp/misc.h
dsp/movingaverage.h dsp/movingaverage.h

View File

@ -18,7 +18,10 @@
#include "firfilter.h" #include "firfilter.h"
void FirFilterGenerators::generateLowPassFilter(int nTaps, double sampleRate, double cutoff, std::vector<Real> &taps) namespace FirFilterGenerators
{
void generateLowPassFilter(int nTaps, double sampleRate, double cutoff, std::vector<Real> &taps)
{ {
if (!(nTaps & 1)) if (!(nTaps & 1))
{ {
@ -50,3 +53,5 @@ void FirFilterGenerators::generateLowPassFilter(int nTaps, double sampleRate, do
taps[i] *= 0.42 + 0.5 * cos((2.0 * M_PI * n) / nTaps) + 0.08 * cos((4.0 * M_PI * n) / nTaps); taps[i] *= 0.42 + 0.5 * cos((2.0 * M_PI * n) / nTaps) + 0.08 * cos((4.0 * M_PI * n) / nTaps);
} }
} }
}

View File

@ -23,10 +23,9 @@
#include "dsp/dsptypes.h" #include "dsp/dsptypes.h"
#include "export.h" #include "export.h"
class SDRBASE_API FirFilterGenerators namespace FirFilterGenerators
{ {
public: SDRBASE_API void generateLowPassFilter(int nTaps, double sampleRate, double cutoff, std::vector<Real> &taps);
static void generateLowPassFilter(int nTaps, double sampleRate, double cutoff, std::vector<Real> &taps);
}; };
template <class Type> template <class Type>