55 lines
1.9 KiB
C
Raw Normal View History

2021-12-03 19:46:09 +01:00
#pragma once
#include <dsp/stream.h>
#include <dsp/types.h>
#include <gui/widgets/waterfall.h>
#include <config.h>
2021-12-04 04:49:51 +01:00
#include <utils/event.h>
enum DeemphasisMode {
DEEMP_MODE_50US,
DEEMP_MODE_75US,
DEEMP_MODE_NONE,
_DEEMP_MODE_COUNT
};
2021-12-03 19:46:09 +01:00
namespace demod {
class Demodulator {
public:
virtual ~Demodulator() {}
2021-12-04 17:46:48 +01:00
virtual void init(std::string name, ConfigManager* config, dsp::stream<dsp::complex_t>* input, double bandwidth, EventHandler<dsp::stream<dsp::stereo_t>*> outputChangeHandler, double audioSR) = 0;
2021-12-03 19:46:09 +01:00
virtual void start() = 0;
virtual void stop() = 0;
virtual void showMenu() = 0;
virtual void setBandwidth(double bandwidth) = 0;
virtual void setInput(dsp::stream<dsp::complex_t>* input) = 0;
2021-12-04 17:46:48 +01:00
virtual void AFSampRateChanged(double newSR) = 0;
2021-12-03 19:46:09 +01:00
virtual const char* getName() = 0;
virtual double getIFSampleRate() = 0;
virtual double getAFSampleRate() = 0;
virtual double getDefaultBandwidth() = 0;
virtual double getMinBandwidth() = 0;
virtual double getMaxBandwidth() = 0;
2021-12-04 04:49:51 +01:00
virtual bool getBandwidthLocked() = 0;
2021-12-03 19:46:09 +01:00
virtual double getMaxAFBandwidth() = 0;
virtual double getDefaultSnapInterval() = 0;
virtual int getVFOReference() = 0;
2021-12-04 04:49:51 +01:00
virtual bool getDeempAllowed() = 0;
2021-12-04 17:46:48 +01:00
virtual bool getPostProcEnabled() = 0;
2021-12-04 04:49:51 +01:00
virtual int getDefaultDeemphasisMode() = 0;
virtual double getAFBandwidth(double bandwidth) = 0;
2021-12-08 02:10:41 +01:00
virtual bool getFMIFNRAllowed() = 0;
2021-12-10 22:25:22 +01:00
virtual bool getNBAllowed() = 0;
2021-12-04 17:46:48 +01:00
2021-12-04 04:49:51 +01:00
virtual bool getDynamicAFBandwidth() = 0;
2021-12-03 19:46:09 +01:00
virtual dsp::stream<dsp::stereo_t>* getOutput() = 0;
};
}
2021-12-04 04:49:51 +01:00
#include "demodulators/wfm.h"
#include "demodulators/nfm.h"
#include "demodulators/am.h"
#include "demodulators/usb.h"
#include "demodulators/lsb.h"
#include "demodulators/dsb.h"
2021-12-04 17:46:48 +01:00
#include "demodulators/cw.h"
#include "demodulators/raw.h"