-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathFT8Demodulator.h
36 lines (31 loc) · 993 Bytes
/
FT8Demodulator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once
#include <cstdio>
#include <cassert>
#include <cmath>
#include <complex>
#include <liquid/liquid.h>
#include <vector>
#include "DataBuffer.h"
#include "AudioOutput.h"
#include "Demodulator.h"
#include "FT8Processor.h"
class FT8Demodulator : public Demodulator
{
public:
static bool create_demodulator(double ifrate, DataBuffer<IQSample> *source_buffer, AudioOutput *audio_output, int mode);
static void destroy_demodulator();
static std::string getName() { return "FT8Demodulator"; }
static void setLowPassAudioFilterCutOffFrequency(int bandwidth);
FT8Demodulator(double ifrate, DataBuffer<IQSample> *source_buffer, AudioOutput *audio_output, int mode);
~FT8Demodulator();
void process(IQSampleVector &samples_in, SampleVector &audio) ;
void operator()();
atomic<bool> stop_flag{false};
std::thread amdemod_thread;
private:
ampmodem m_demod{nullptr};
float m_bandwidth;
float ft8_rate{12000.0};
std::shared_ptr<FT8Processor> ft8processor;
int wsjtxmode;
};