#pragma once #include #include #include #include #include #include #include #include #include #include #include class SignalPath { public: SignalPath(); void init(uint64_t sampleRate, int fftRate, int fftSize, dsp::stream* input, dsp::complex_t* fftBuffer, void fftHandler(dsp::complex_t*)); void start(); void setSampleRate(double sampleRate); void setDCBiasCorrection(bool enabled); void setFFTRate(double rate); double getSampleRate(); dsp::VFO* addVFO(std::string name, double outSampleRate, double bandwidth, double offset); void removeVFO(std::string name); void setInput(dsp::stream* input); void bindIQStream(dsp::stream* stream); void unbindIQStream(dsp::stream* stream); private: struct VFO_t { dsp::stream* inputStream; dsp::VFO* vfo; }; dsp::DCBiasRemover dcBiasRemover; dsp::Splitter split; // FFT dsp::BlockDecimator fftBlockDec; dsp::HandlerSink fftHandlerSink; // VFO dsp::DynamicSplitter dynSplit; std::map vfos; double sampleRate; double fftRate; int fftSize; int inputBlockSize; };