mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-16 13:21:50 -05:00
Deep redesign: removed unused sample sink from AM demod
This commit is contained in:
parent
19b234c4df
commit
b36f3057ae
@ -27,8 +27,7 @@
|
|||||||
|
|
||||||
MESSAGE_CLASS_DEFINITION(AMDemod::MsgConfigureAMDemod, Message)
|
MESSAGE_CLASS_DEFINITION(AMDemod::MsgConfigureAMDemod, Message)
|
||||||
|
|
||||||
AMDemod::AMDemod(SampleSink* sampleSink) :
|
AMDemod::AMDemod() :
|
||||||
m_sampleSink(sampleSink),
|
|
||||||
m_audioFifo(4, 48000)
|
m_audioFifo(4, 48000)
|
||||||
{
|
{
|
||||||
setObjectName("AMDemod");
|
setObjectName("AMDemod");
|
||||||
@ -151,11 +150,6 @@ void AMDemod::feed(SampleVector::const_iterator begin, SampleVector::const_itera
|
|||||||
m_audioBufferFill = 0;
|
m_audioBufferFill = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_sampleSink != 0)
|
|
||||||
{
|
|
||||||
m_sampleSink->feed(m_sampleBuffer.begin(), m_sampleBuffer.end(), false);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_sampleBuffer.clear();
|
m_sampleBuffer.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,17 +205,10 @@ bool AMDemod::handleMessage(const Message& cmd)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
if(m_sampleSink != 0) // FIXME: for dependent sample sink - unused for this demod
|
|
||||||
{
|
|
||||||
return m_sampleSink->handleMessage(cmd);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void AMDemod::apply()
|
void AMDemod::apply()
|
||||||
{
|
{
|
||||||
|
@ -32,7 +32,7 @@ class AudioFifo;
|
|||||||
class AMDemod : public SampleSink {
|
class AMDemod : public SampleSink {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
AMDemod(SampleSink* sampleSink);
|
AMDemod();
|
||||||
~AMDemod();
|
~AMDemod();
|
||||||
|
|
||||||
void configure(MessageQueue* messageQueue, Real rfBandwidth, Real afBandwidth, Real volume, Real squelch);
|
void configure(MessageQueue* messageQueue, Real rfBandwidth, Real afBandwidth, Real volume, Real squelch);
|
||||||
@ -121,7 +121,6 @@ private:
|
|||||||
AudioVector m_audioBuffer;
|
AudioVector m_audioBuffer;
|
||||||
uint m_audioBufferFill;
|
uint m_audioBufferFill;
|
||||||
|
|
||||||
SampleSink* m_sampleSink;
|
|
||||||
AudioFifo m_audioFifo;
|
AudioFifo m_audioFifo;
|
||||||
SampleVector m_sampleBuffer;
|
SampleVector m_sampleBuffer;
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ AMDemodGUI::AMDemodGUI(PluginAPI* pluginAPI, QWidget* parent) :
|
|||||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||||
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
connect(this, SIGNAL(menuDoubleClickEvent()), this, SLOT(onMenuDoubleClicked()));
|
||||||
|
|
||||||
m_amDemod = new AMDemod(0);
|
m_amDemod = new AMDemod();
|
||||||
m_channelizer = new Channelizer(m_amDemod);
|
m_channelizer = new Channelizer(m_amDemod);
|
||||||
m_threadedChannelizer = new ThreadedSampleSink(m_channelizer, this);
|
m_threadedChannelizer = new ThreadedSampleSink(m_channelizer, this);
|
||||||
DSPEngine::instance()->addThreadedSink(m_threadedChannelizer);
|
DSPEngine::instance()->addThreadedSink(m_threadedChannelizer);
|
||||||
|
Loading…
Reference in New Issue
Block a user