1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-02-03 09:44:01 -05:00

SDRdaemon: update device center frequency and channel sample rate in channel sink

This commit is contained in:
f4exb 2018-08-21 15:53:38 +02:00
parent 3021181564
commit 22b5f7fdde

View File

@ -28,6 +28,7 @@
#include "util/simpleserializer.h"
#include "dsp/threadedbasebandsamplesink.h"
#include "dsp/downchannelizer.h"
#include "dsp/dspcommands.h"
#include "device/devicesourceapi.h"
#include "channel/sdrdaemonchannelsinkthread.h"
#include "sdrdaemonchannelsink.h"
@ -205,7 +206,36 @@ void SDRDaemonChannelSink::stop()
bool SDRDaemonChannelSink::handleMessage(const Message& cmd __attribute__((unused)))
{
return false;
if (DownChannelizer::MsgChannelizerNotification::match(cmd))
{
DownChannelizer::MsgChannelizerNotification& notif = (DownChannelizer::MsgChannelizerNotification&) cmd;
qDebug() << "SDRDaemonChannelSink::handleMessage: MsgChannelizerNotification:"
<< " channelSampleRate: " << notif.getSampleRate()
<< " offsetFrequency: " << notif.getFrequencyOffset();
if (notif.getSampleRate() > 0) {
setSampleRate(notif.getSampleRate());
}
return true;
}
else if (DSPSignalNotification::match(cmd))
{
DSPSignalNotification& notif = (DSPSignalNotification&) cmd;
qDebug() << "SDRDaemonChannelSink::handleMessage: DSPSignalNotification:"
<< " inputSampleRate: " << notif.getSampleRate()
<< " centerFrequency: " << notif.getCenterFrequency();
setCenterFrequency(notif.getCenterFrequency());
return true;
}
else
{
return false;
}
}
QByteArray SDRDaemonChannelSink::serialize() const