mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-02 06:04:39 -04:00
Worker thread demod spawn, abstract Modem
This commit is contained in:
@@ -10,18 +10,10 @@ ModemFactoryList Modem::getFactories() {
|
||||
return modemFactories;
|
||||
}
|
||||
|
||||
Modem *Modem::factory() {
|
||||
Modem *Modem::makeModem(std::string modemType) {
|
||||
if (modemFactories.find(modemType) != modemFactories.end()) {
|
||||
return modemFactories[modemType]->factory();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ModemKit *Modem::buildKit(long long sampleRate, int audioSampleRate) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void Modem::disposeKit(ModemKit *kit) {
|
||||
return;
|
||||
}
|
||||
|
||||
void Modem::demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -36,12 +36,13 @@ class Modem {
|
||||
public:
|
||||
static void addModemFactory(std::string modemName, Modem *factorySingle);
|
||||
static ModemFactoryList getFactories();
|
||||
static Modem *makeModem(std::string modemType);
|
||||
|
||||
virtual Modem *factory();
|
||||
virtual Modem *factory() = 0;
|
||||
|
||||
virtual ModemKit *buildKit(long long sampleRate, int audioSampleRate);
|
||||
virtual void disposeKit(ModemKit *kit);
|
||||
virtual void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut);
|
||||
virtual ModemKit *buildKit(long long sampleRate, int audioSampleRate) = 0;
|
||||
virtual void disposeKit(ModemKit *kit) = 0;
|
||||
virtual void demodulate(ModemKit *kit, ModemIQData *input, AudioThreadInput *audioOut) = 0;
|
||||
private:
|
||||
static ModemFactoryList modemFactories;
|
||||
};
|
||||
Reference in New Issue
Block a user