- Processor::Blocks were assigned in/out buffers from outside
git-svn-id: http://moon:8086/svn/software/trunk/libsrc/cpp@1024 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -25,7 +25,6 @@ public:
|
||||
PolyPhase(TimingGenerator &timingGenerator)
|
||||
: Processor::Block(1, 1)
|
||||
, m_timingGenerator(timingGenerator)
|
||||
, m_buf_in(8*1024)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -45,7 +44,6 @@ public:
|
||||
m_M = M;
|
||||
m_N = N;
|
||||
m_coeff.resize(N, M);
|
||||
// m_buf_in.resize(N);
|
||||
|
||||
pCoeff = (fir_float_t*)malloc((N+1)*M*sizeof(fir_float_t));
|
||||
memset(pCoeff, 0, (N+1)*M*sizeof(fir_float_t));
|
||||
@@ -65,7 +63,8 @@ public:
|
||||
|
||||
void process()
|
||||
{
|
||||
// Get output buffer
|
||||
// Get buffers
|
||||
auto m_buf_in = dynamic_cast<Processor::Buffer<ComplexScalar>*>(buffer_in());
|
||||
auto buf_out = dynamic_cast<Processor::Buffer<ComplexScalar>*>(buffer_out());
|
||||
|
||||
// Process input
|
||||
@@ -74,14 +73,14 @@ public:
|
||||
size_t adv = m_timingGenerator.getAdv();
|
||||
radio_float_t mu = m_timingGenerator.getMu();
|
||||
|
||||
if (m_buf_in.len() < adv)
|
||||
if (m_buf_in->len() < adv)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (adv != 0)
|
||||
{
|
||||
m_fir.feed(m_buf_in, adv);
|
||||
m_fir.feed(*m_buf_in, adv);
|
||||
}
|
||||
|
||||
// Polyphase filtering
|
||||
@@ -94,14 +93,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
Processor::IBuffer* buffer_in(size_t index=0) override
|
||||
{
|
||||
return &m_buf_in;
|
||||
}
|
||||
|
||||
private:
|
||||
TimingGenerator &m_timingGenerator;
|
||||
Processor::Buffer<ComplexScalar> m_buf_in;
|
||||
FirComplex m_fir;
|
||||
uint32_t m_M;
|
||||
uint32_t m_N;
|
||||
|
||||
Reference in New Issue
Block a user