18 #ifndef INCLUDE_FREEDVDEMOD_H 19 #define INCLUDE_FREEDVDEMOD_H 24 #include <QNetworkRequest> 39 #define ssbFftLen 1024 40 #define agcTarget 3276.8 // -10 dB amplitude => -20 dB power: center of normal signal 42 class QNetworkAccessManager;
107 m_sampleRate(sampleRate),
108 m_centerFrequency(centerFrequency)
123 bool audioFlipChannels,
129 int agcPowerThreshold,
130 int agcThresholdGate);
132 virtual void feed(
const SampleVector::const_iterator& begin,
const SampleVector::const_iterator& end,
bool positiveOnly);
133 virtual void start();
150 (void) sinkElseSource;
177 void getSNRLevels(
double& avg,
double& peak,
int& nbSamples);
184 QString& errorMessage);
188 const QStringList& channelSettingsKeys,
190 QString& errorMessage);
194 QString& errorMessage);
206 void levelInChanged(qreal rmsLevel, qreal peakLevel,
int numSamples);
223 void collect(
struct freedv *freedv);
241 void accumulate(
float snrdB);
252 void accumulate(
float fsample);
283 bool audioFlipChannels,
289 int agcPowerThreshold,
290 int agcThresholdGate)
328 bool audioFlipChannels,
334 int agcPowerThreshold,
335 int agcThresholdGate) :
337 m_Bandwidth(Bandwidth),
338 m_LowCutoff(LowCutoff),
340 m_spanLog2(spanLog2),
341 m_audioBinaural(audioBinaural),
342 m_audioFlipChannels(audioFlipChannels),
344 m_audioMute(audioMute),
346 m_agcClamping(agcClamping),
347 m_agcTimeLog2(agcTimeLog2),
348 m_agcPowerThreshold(agcPowerThreshold),
349 m_agcThresholdGate(agcThresholdGate)
427 #endif // INCLUDE_FREEDVDEMOD_H
MagSqLevelsStore m_magSqLevelStore
virtual void getTitle(QString &title)
virtual void getIdentifier(QString &id)
static MsgResyncFreeDVDemod * create()
Interpolator m_interpolator
std::vector< Sample > SampleVector
void getSNRLevels(double &avg, double &peak, int &nbSamples)
std::vector< AudioSample > AudioVector
float getFrequencyOffset() const
void configure(MessageQueue *messageQueue, Real Bandwidth, Real LowCutoff, Real volume, int spanLog2, bool audioBinaural, bool audioFlipChannels, bool dsb, bool audioMute, bool agc, bool agcClamping, int agcTimeLog2, int agcPowerThreshold, int agcThresholdGate)
virtual bool deserialize(const QByteArray &data)
virtual qint64 getCenterFrequency() const
Applies to a default stream.
void pushSampleToAudio(int16_t sample)
void levelInChanged(qreal rmsLevel, qreal peakLevel, int numSamples)
bool getAudioActive() const
void applyChannelSettings(int inputSampleRate, int inputFrequencyOffset, bool force=false)
AudioResampler m_audioResampler
FreeDVStats m_freeDVStats
virtual int getNbSinkStreams() const
void pushSampleToDV(int16_t sample)
virtual int webapiReportGet(SWGSDRangel::SWGChannelReport &response, QString &errorMessage)
void applyAudioSampleRate(int sampleRate)
void applySettings(const FreeDVDemodSettings &settings, bool force=false)
static const QString m_channelId
int m_ber
estimated BER (b/s)
BasebandSampleSink * m_sampleSink
AudioVector m_audioBuffer
uint32_t m_modemSampleRate
FreeDVDemod(DeviceAPI *deviceAPI)
static const QString m_channelIdURI
QNetworkAccessManager * m_networkManager
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
DoubleBufferFIFO< fftfilt::cmplx > m_squelchDelayLine
std::complex< float > cmplx
void getMagSqLevels(double &avg, double &peak, int &nbSamples)
void webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings &response, const FreeDVDemodSettings &settings)
FreeDVDemodSettings m_settings
uint32_t m_audioSampleRate
ThreadedBasebandSampleSink * m_threadedChannelizer
Real m_interpolatorDistanceRemain
void applyFreeDVMode(FreeDVDemodSettings::FreeDVMode mode)
uint32_t getModemSampleRate() const
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport &response)
#define MESSAGE_CLASS_DECLARATION
bool m_audioActive
True if an audio signal is produced (no AGC or AGC and above threshold)
Real m_interpolatorDistance
uint32_t m_berFrameCount
count of frames for BER estimation
int m_inputFrequencyOffset
void setSampleSink(BasebandSampleSink *sampleSink)
QNetworkRequest m_networkRequest
uint32_t m_speechSampleRate
uint32_t getAudioSampleRate() const
virtual QByteArray serialize() const
virtual int getNbSourceStreams() const
uint32_t m_fps
frames per second
virtual int webapiSettingsGet(SWGSDRangel::SWGChannelSettings &response, QString &errorMessage)
virtual int webapiSettingsPutPatch(bool force, const QStringList &channelSettingsKeys, SWGSDRangel::SWGChannelSettings &response, QString &errorMessage)
qint32 m_inputFrequencyOffset
SimpleAGC< 4800 > m_simpleAGC
std::complex< Real > Complex
SampleVector m_sampleBuffer
void processOneSample(Complex &ci)
virtual void feed(const SampleVector::const_iterator &begin, const SampleVector::const_iterator &end, bool positiveOnly)
void networkManagerFinished(QNetworkReply *reply)
virtual bool handleMessage(const Message &cmd)
Processing of a message. Returns true if message has actually been processed.
void webapiReverseSendSettings(QList< QString > &channelSettingsKeys, const FreeDVDemodSettings &settings, bool force)
DownChannelizer * m_channelizer