mirror of https://github.com/f4exb/sdrangel.git
Tx ph.2: change UpChannelizer filter chain from std::list to std::vector
This commit is contained in:
parent
31add4919d
commit
91315913b4
|
@ -64,15 +64,13 @@ void UpChannelizer::pull(Sample& sample)
|
||||||
m_mutex.lock();
|
m_mutex.lock();
|
||||||
|
|
||||||
FilterStages::iterator stage = m_filterStages.begin();
|
FilterStages::iterator stage = m_filterStages.begin();
|
||||||
FilterStages::iterator last = m_filterStages.end();
|
|
||||||
last--;
|
|
||||||
|
|
||||||
// m_sampleIn
|
// m_sampleIn
|
||||||
|
|
||||||
for (; stage != m_filterStages.end(); ++stage)
|
for (; stage != m_filterStages.end(); ++stage)
|
||||||
{
|
{
|
||||||
// let's make it work for one stage only (96 kS/s < SR < 192 kS/s)
|
// let's make it work for one stage only (96 kS/s < SR < 192 kS/s)
|
||||||
if(stage == last)
|
if(stage == m_filterStages.end() - 1)
|
||||||
{
|
{
|
||||||
if ((*stage)->work(&m_sampleIn, &sample))
|
if ((*stage)->work(&m_sampleIn, &sample))
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#define SDRBASE_DSP_UPCHANNELIZER_H_
|
#define SDRBASE_DSP_UPCHANNELIZER_H_
|
||||||
|
|
||||||
#include <dsp/basebandsamplesource.h>
|
#include <dsp/basebandsamplesource.h>
|
||||||
#include <list>
|
#include <vector>
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include "util/export.h"
|
#include "util/export.h"
|
||||||
#include "util/message.h"
|
#include "util/message.h"
|
||||||
|
@ -81,7 +81,7 @@ protected:
|
||||||
return (m_filter->*m_workFunction)(sampleIn, sampleOut);
|
return (m_filter->*m_workFunction)(sampleIn, sampleOut);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
typedef std::list<FilterStage*> FilterStages;
|
typedef std::vector<FilterStage*> FilterStages;
|
||||||
FilterStages m_filterStages;
|
FilterStages m_filterStages;
|
||||||
BasebandSampleSource* m_sampleSource; //!< Modulator
|
BasebandSampleSource* m_sampleSource; //!< Modulator
|
||||||
int m_outputSampleRate;
|
int m_outputSampleRate;
|
||||||
|
|
Loading…
Reference in New Issue