mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-01-02 22:37:11 +01:00
20 lines
754 B
C++
20 lines
754 B
C++
|
#include <signal_path.h>
|
||
|
|
||
|
SignalPath::SignalPath(cdsp::stream<cdsp::complex_t>* source, float sampleRate, float fftRate, int fftSize, cdsp::complex_t* fftBuffer, void fftHandler(cdsp::complex_t*)) :
|
||
|
dcBiasRemover(source, 64000),
|
||
|
fftBlockDec(&dcBiasRemover.output, (sampleRate / fftRate) - fftSize, fftSize),
|
||
|
fftSineSource(sampleRate / 2.0f, sampleRate, fftSize),
|
||
|
fftMul(&fftBlockDec.output, &fftSineSource.output, fftSize),
|
||
|
fftHandler(&fftMul.output, fftBuffer, fftSize, fftHandler) {
|
||
|
this->sampleRate = sampleRate;
|
||
|
this->fftRate = fftRate;
|
||
|
this->fftSize = fftSize;
|
||
|
}
|
||
|
|
||
|
void SignalPath::start() {
|
||
|
dcBiasRemover.start();
|
||
|
fftBlockDec.start();
|
||
|
fftSineSource.start();
|
||
|
fftMul.start();
|
||
|
fftHandler.start();
|
||
|
}
|