19 #ifndef INCLUDE_BFMDEMOD_H 20 #define INCLUDE_BFMDEMOD_H 25 #include <QNetworkRequest> 45 class QNetworkAccessManager;
99 m_sampleRate(sampleRate),
100 m_centerFrequency(centerFrequency)
120 m_sampleRate(sampleRate)
130 virtual void feed(
const SampleVector::const_iterator& begin,
const SampleVector::const_iterator& end,
bool po);
131 virtual void start();
133 virtual bool handleMessage(
const Message& cmd);
136 virtual void getTitle(QString& title) { title = m_settings.m_title; }
139 virtual QByteArray serialize()
const;
140 virtual bool deserialize(
const QByteArray& data);
148 (void) sinkElseSource;
149 return m_settings.m_inputFrequencyOffset;
165 if (m_magsqCount > 0)
167 m_magsq = m_magsqSum / m_magsqCount;
168 m_magSqLevelStore.m_magsq = m_magsq;
169 m_magSqLevelStore.m_magsqPeak = m_magsqPeak;
172 avg = m_magSqLevelStore.m_magsq;
173 peak = m_magSqLevelStore.m_magsqPeak;
174 nbSamples = m_magsqCount == 0 ? 1 : m_magsqCount;
183 virtual int webapiSettingsGet(
185 QString& errorMessage);
187 virtual int webapiSettingsPutPatch(
189 const QStringList& channelSettingsKeys,
191 QString& errorMessage);
193 virtual int webapiReportGet(
195 QString& errorMessage);
249 static const int filtFftLen = 1024;
282 static const int default_excursion = 750000;
291 void applyAudioSampleRate(
int sampleRate);
292 void applyChannelSettings(
int inputSampleRate,
int inputFrequencyOffset,
bool force =
false);
298 void webapiReverseSendSettings(QList<QString>& channelSettingsKeys,
const BFMDemodSettings& settings,
bool force);
301 void networkManagerFinished(QNetworkReply *reply);
304 #endif // INCLUDE_BFMDEMOD_H
virtual void getTitle(QString &title)
std::vector< Sample > SampleVector
std::vector< AudioSample > AudioVector
bool getDecoderSynced() const
Real m_interpolatorRDSDistanceRemain
MagSqLevelsStore m_magSqLevelStore
Interpolator m_interpolator
Interpolator between fixed demod bandwidth and audio bandwidth (rational)
static const QString m_channelIdURI
quint32 m_audioSampleRate
AudioVector m_audioBuffer
virtual qint64 getStreamCenterFrequency(int streamIndex, bool sinkElseSource) const
static MsgReportChannelSampleRateChanged * create(int sampleRate)
static const Real default_deemphasis
static const QString m_channelId
virtual qint64 getCenterFrequency() const
Applies to a default stream.
LowPassFilterRC m_deemphasisFilterY
virtual int getNbSinkStreams() const
Real m_interpolatorDistanceRemain
static int requiredBW(int rfBW)
void setSampleSink(BasebandSampleSink *sampleSink)
MsgReportChannelSampleRateChanged(int sampleRate)
ThreadedBasebandSampleSink * m_threadedChannelizer
SampleVector m_sampleBuffer
LowPassFilterRC m_deemphasisFilterX
#define MESSAGE_CLASS_DECLARATION
DownChannelizer * m_channelizer
Interpolator m_interpolatorStereo
Twin Interpolator for stereo subcarrier.
int m_inputFrequencyOffset
static const int m_udpBlockSize
int getSampleRate() const
virtual int getNbSourceStreams() const
BFMDemodSettings m_settings
Real m_interpolatorRDSDistance
Real m_interpolatorStereoDistanceRemain
Real getDecoderQua() const
Real getDemodFclk() const
Real getPilotLevel() const
void getMagSqLevels(double &avg, double &peak, int &nbSamples)
Lowpass< Real > m_lowpass
Interpolator m_interpolatorRDS
Twin Interpolator for stereo subcarrier.
PhaseDiscriminators m_phaseDiscri
double m_magsq
x^-1 real sample
QNetworkAccessManager * m_networkManager
Real m_interpolatorDistance
RDSParser & getRDSParser()
virtual void getIdentifier(QString &id)
Real m_interpolatorStereoDistance
QNetworkRequest m_networkRequest
int getSampleRate() const
bool getPilotLock() const
BasebandSampleSink * m_sampleSink