19 #ifndef INCLUDE_SSBDEMOD_H 20 #define INCLUDE_SSBDEMOD_H 25 #include <QNetworkRequest> 39 #define ssbFftLen 1024 40 #define agcTarget 3276.8 // -10 dB amplitude => -20 dB power: center of normal signal 42 class QNetworkAccessManager;
92 m_sampleRate(sampleRate),
93 m_centerFrequency(centerFrequency)
108 bool audioFlipChannels,
114 int agcPowerThreshold,
115 int agcThresholdGate);
117 virtual void feed(
const SampleVector::const_iterator& begin,
const SampleVector::const_iterator& end,
bool positiveOnly);
118 virtual void start();
135 (void) sinkElseSource;
164 QString& errorMessage);
168 const QStringList& channelSettingsKeys,
170 QString& errorMessage);
174 QString& errorMessage);
213 bool audioFlipChannels,
219 int agcPowerThreshold,
220 int agcThresholdGate)
258 bool audioFlipChannels,
264 int agcPowerThreshold,
265 int agcThresholdGate) :
267 m_Bandwidth(Bandwidth),
268 m_LowCutoff(LowCutoff),
270 m_spanLog2(spanLog2),
271 m_audioBinaural(audioBinaural),
272 m_audioFlipChannels(audioFlipChannels),
274 m_audioMute(audioMute),
276 m_agcClamping(agcClamping),
277 m_agcTimeLog2(agcTimeLog2),
278 m_agcPowerThreshold(agcPowerThreshold),
279 m_agcThresholdGate(agcThresholdGate)
348 #endif // INCLUDE_SSBDEMOD_H
void webapiReverseSendSettings(QList< QString > &channelSettingsKeys, const SSBDemodSettings &settings, bool force)
static const QString m_channelId
std::vector< Sample > SampleVector
virtual qint64 getCenterFrequency() const
Applies to a default stream.
int m_agcThresholdGate
Gate length in number of samples befor threshold triggers.
std::vector< AudioSample > AudioVector
void applyChannelSettings(int inputSampleRate, int inputFrequencyOffset, bool force=false)
virtual void getIdentifier(QString &id)
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport &response)
Real m_interpolatorDistance
virtual int getNbSinkStreams() const
static const QString m_channelIdURI
void getMagSqLevels(double &avg, double &peak, int &nbSamples)
virtual int webapiSettingsGet(SWGSDRangel::SWGChannelSettings &response, QString &errorMessage)
std::complex< float > cmplx
virtual int webapiSettingsPutPatch(bool force, const QStringList &channelSettingsKeys, SWGSDRangel::SWGChannelSettings &response, QString &errorMessage)
void networkManagerFinished(QNetworkReply *reply)
void webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings &response, const SSBDemodSettings &settings)
BasebandSampleSink * m_sampleSink
void applyAudioSampleRate(int sampleRate)
void setSampleSink(BasebandSampleSink *sampleSink)
#define MESSAGE_CLASS_DECLARATION
SSBDemod(DeviceAPI *deviceAPI)
int m_agcNbSamples
number of audio (48 kHz) samples for AGC averaging
int m_inputFrequencyOffset
bool m_audioActive
True if an audio signal is produced (no AGC or AGC and above threshold)
DoubleBufferFIFO< fftfilt::cmplx > m_squelchDelayLine
virtual void feed(const SampleVector::const_iterator &begin, const SampleVector::const_iterator &end, bool positiveOnly)
virtual bool deserialize(const QByteArray &data)
SSBDemodSettings m_settings
uint32_t getAudioSampleRate() const
AudioVector m_audioBuffer
DownChannelizer * m_channelizer
qint32 m_inputFrequencyOffset
virtual int webapiReportGet(SWGSDRangel::SWGChannelReport &response, QString &errorMessage)
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
uint32_t getInputSampleRate() const
void applySettings(const SSBDemodSettings &settings, bool force=false)
ThreadedBasebandSampleSink * m_threadedChannelizer
virtual void getTitle(QString &title)
bool getAudioActive() const
double m_agcPowerThreshold
AGC power threshold (linear)
SampleVector m_sampleBuffer
QNetworkAccessManager * m_networkManager
MagSqLevelsStore m_magSqLevelStore
quint32 m_audioSampleRate
void processOneSample(Complex &ci)
std::complex< Real > Complex
virtual bool handleMessage(const Message &cmd)
Processing of a message. Returns true if message has actually been processed.
Real m_interpolatorDistanceRemain
virtual int getNbSourceStreams() const
Interpolator m_interpolator
QNetworkRequest m_networkRequest
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 QByteArray serialize() const