mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-07-10 19:15:31 +02:00
More DSP cleanup + Remove FastFFT option because it should never be used
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
#include "../processor.h"
|
||||
#include "../math/fast_atan2.h"
|
||||
#include "../math/freq_to_omega.h"
|
||||
#include "../math/norm_phase_diff.h"
|
||||
#include "../math/hz_to_rads.h"
|
||||
#include "../math/normalize_phase.h"
|
||||
|
||||
namespace dsp::demod {
|
||||
class Quadrature : public Processor<complex_t, float> {
|
||||
@ -21,7 +21,7 @@ namespace dsp::demod {
|
||||
}
|
||||
|
||||
virtual void init(stream<complex_t>* in, double deviation, double samplerate) {
|
||||
init(in, math::freqToOmega(deviation, samplerate));
|
||||
init(in, math::hzToRads(deviation, samplerate));
|
||||
}
|
||||
|
||||
void setDeviation(double deviation) {
|
||||
@ -33,13 +33,13 @@ namespace dsp::demod {
|
||||
void setDeviation(double deviation, double samplerate) {
|
||||
assert(base_type::_block_init);
|
||||
std::lock_guard<std::recursive_mutex> lck(base_type::ctrlMtx);
|
||||
_invDeviation = 1.0 / math::freqToOmega(deviation, samplerate);
|
||||
_invDeviation = 1.0 / math::hzToRads(deviation, samplerate);
|
||||
}
|
||||
|
||||
inline int process(int count, complex_t* in, float* out) {
|
||||
for (int i = 0; i < count; i++) {
|
||||
float cphase = in[i].phase();
|
||||
out[i] = math::normPhaseDiff(cphase - phase) * _invDeviation;
|
||||
out[i] = math::normalizePhase(cphase - phase) * _invDeviation;
|
||||
phase = cphase;
|
||||
}
|
||||
return count;
|
||||
|
Reference in New Issue
Block a user