2017-01-02 21:07:43 -05:00
|
|
|
// Copyright (c) Charles J. Cliffe
|
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
|
|
|
|
2015-11-16 23:49:54 -05:00
|
|
|
#pragma once
|
|
|
|
#include "Modem.h"
|
|
|
|
|
|
|
|
class ModemKitAnalog : public ModemKit {
|
|
|
|
public:
|
|
|
|
ModemKitAnalog() : ModemKit(), audioResampler(nullptr), audioResampleRatio(0) {
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
msresamp_rrrf audioResampler;
|
|
|
|
double audioResampleRatio;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class ModemAnalog : public Modem {
|
|
|
|
public:
|
|
|
|
ModemAnalog();
|
2015-11-18 23:40:30 -05:00
|
|
|
std::string getType();
|
2015-11-22 19:56:25 -05:00
|
|
|
virtual int checkSampleRate(long long sampleRate, int audioSampleRate);
|
|
|
|
virtual ModemKit *buildKit(long long sampleRate, int audioSampleRate);
|
|
|
|
virtual void disposeKit(ModemKit *kit);
|
|
|
|
virtual void initOutputBuffers(ModemKitAnalog *akit, ModemIQData *input);
|
|
|
|
virtual void buildAudioOutput(ModemKitAnalog *akit, AudioThreadInput *audioOut, bool autoGain);
|
|
|
|
virtual std::vector<float> *getDemodOutputData();
|
|
|
|
virtual std::vector<float> *getResampledOutputData();
|
2015-11-16 23:49:54 -05:00
|
|
|
protected:
|
2016-02-04 18:05:33 -05:00
|
|
|
size_t bufSize;
|
2015-11-16 23:49:54 -05:00
|
|
|
std::vector<float> demodOutputData;
|
|
|
|
std::vector<float> resampledOutputData;
|
|
|
|
|
|
|
|
float aOutputCeil;
|
|
|
|
float aOutputCeilMA;
|
|
|
|
float aOutputCeilMAA;
|
2016-02-04 18:05:33 -05:00
|
|
|
};
|