2017-01-02 21:07:43 -05:00
|
|
|
// Copyright (c) Charles J. Cliffe
|
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
|
|
|
|
2015-09-07 20:46:03 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "VisualProcessor.h"
|
|
|
|
#include "DemodDefs.h"
|
|
|
|
#include <cmath>
|
2015-09-30 23:45:06 -04:00
|
|
|
#include <cstring>
|
2015-09-07 20:46:03 -04:00
|
|
|
|
|
|
|
class FFTDataDistributor : public VisualProcessor<DemodulatorThreadIQData, DemodulatorThreadIQData> {
|
|
|
|
public:
|
|
|
|
FFTDataDistributor();
|
2016-02-04 18:05:33 -05:00
|
|
|
void setFFTSize(unsigned int fftSize);
|
|
|
|
void setLinesPerSecond(unsigned int lines);
|
|
|
|
unsigned int getLinesPerSecond();
|
2015-09-07 20:46:03 -04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void process();
|
|
|
|
|
|
|
|
DemodulatorThreadIQData inputBuffer, tempBuffer;
|
|
|
|
ReBuffer<DemodulatorThreadIQData> outputBuffers;
|
2016-02-04 18:05:33 -05:00
|
|
|
unsigned int fftSize;
|
|
|
|
unsigned int linesPerSecond;
|
2015-09-07 20:46:03 -04:00
|
|
|
double lineRateAccum;
|
2016-02-04 18:05:33 -05:00
|
|
|
size_t bufferMax, bufferOffset, bufferedItems;
|
2015-09-07 20:46:03 -04:00
|
|
|
};
|