Modulators: changed single Tx channel samples feed handling. Pure virtual function is useless

pull/27/head
f4exb 2016-12-22 23:45:56 +01:00
rodzic 1afd8df5f9
commit f74e3b83a7
11 zmienionych plików z 11 dodań i 91 usunięć

Wyświetl plik

@ -136,19 +136,6 @@ void AMMod::pull(Sample& sample)
sample.m_imag = (FixReal) ci.imag();
}
void AMMod::feed(SampleSourceFifo* sampleFifo,
int nbSamples)
{
SampleVector::iterator writeAt;
sampleFifo->getWriteIterator(writeAt);
for (int i = 0; i < nbSamples; i++)
{
pull((*writeAt));
sampleFifo->bumpIndex(writeAt);
}
}
void AMMod::modulateSample()
{
Real t;

Wyświetl plik

@ -185,11 +185,6 @@ public:
bool playLoop);
virtual void pull(Sample& sample);
/** direct feeding of sample source FIFO */
virtual void feed(SampleSourceFifo* sampleFifo,
int nbSamples);
virtual void start();
virtual void stop();
virtual bool handleMessage(const Message& cmd);

Wyświetl plik

@ -151,19 +151,6 @@ void NFMMod::pull(Sample& sample)
sample.m_imag = (FixReal) ci.imag();
}
void NFMMod::feed(SampleSourceFifo* sampleFifo,
int nbSamples)
{
SampleVector::iterator writeAt;
sampleFifo->getWriteIterator(writeAt);
for (int i = 0; i < nbSamples; i++)
{
pull((*writeAt));
sampleFifo->bumpIndex(writeAt);
}
}
void NFMMod::modulateSample()
{
Real t;

Wyświetl plik

@ -190,11 +190,6 @@ public:
float ctcssFrequency);
virtual void pull(Sample& sample);
/** direct feeding of sample source FIFO */
virtual void feed(SampleSourceFifo* sampleFifo,
int nbSamples);
virtual void start();
virtual void stop();
virtual bool handleMessage(const Message& cmd);

Wyświetl plik

@ -182,19 +182,6 @@ void SSBMod::pull(Sample& sample)
sample.m_imag = (FixReal) ci.imag();
}
void SSBMod::feed(SampleSourceFifo* sampleFifo,
int nbSamples)
{
SampleVector::iterator writeAt;
sampleFifo->getWriteIterator(writeAt);
for (int i = 0; i < nbSamples; i++)
{
pull((*writeAt));
sampleFifo->bumpIndex(writeAt);
}
}
void SSBMod::modulateSample()
{
pullAF(m_modSample);

Wyświetl plik

@ -190,11 +190,6 @@ public:
bool playLoop);
virtual void pull(Sample& sample);
/** direct feeding of sample source FIFO */
virtual void feed(SampleSourceFifo* sampleFifo,
int nbSamples);
virtual void start();
virtual void stop();
virtual bool handleMessage(const Message& cmd);

Wyświetl plik

@ -139,19 +139,6 @@ void WFMMod::pull(Sample& sample)
sample.m_imag = (FixReal) ci.imag();
}
void WFMMod::feed(SampleSourceFifo* sampleFifo,
int nbSamples)
{
SampleVector::iterator writeAt;
sampleFifo->getWriteIterator(writeAt);
for (int i = 0; i < nbSamples; i++)
{
pull((*writeAt));
sampleFifo->bumpIndex(writeAt);
}
}
void WFMMod::pullAF(Complex& sample)
{
int16_t audioSample[2];

Wyświetl plik

@ -187,11 +187,6 @@ public:
bool playLoop);
virtual void pull(Sample& sample);
/** direct feeding of sample source FIFO */
virtual void feed(SampleSourceFifo* sampleFifo,
int nbSamples);
virtual void start();
virtual void stop();
virtual bool handleMessage(const Message& cmd);

Wyświetl plik

@ -37,8 +37,17 @@ public:
virtual void pull(Sample& sample) = 0;
/** direct feeding of sample source FIFO */
virtual void feed(SampleSourceFifo* sampleFifo,
int nbSamples) = 0;
void feed(SampleSourceFifo* sampleFifo, int nbSamples)
{
SampleVector::iterator writeAt;
sampleFifo->getWriteIterator(writeAt);
for (int i = 0; i < nbSamples; i++)
{
pull((*writeAt));
sampleFifo->bumpIndex(writeAt);
}
}
virtual bool handleMessage(const Message& cmd) = 0; //!< Processing of a message. Returns true if message has actually been processed

Wyświetl plik

@ -102,19 +102,6 @@ void UpChannelizer::pull(Sample& sample)
}
}
void UpChannelizer::feed(SampleSourceFifo* sampleFifo,
int nbSamples)
{
SampleVector::iterator writeAt;
sampleFifo->getWriteIterator(writeAt);
for (int i = 0; i < nbSamples; i++)
{
pull((*writeAt));
sampleFifo->bumpIndex(writeAt);
}
}
void UpChannelizer::start()
{
if (m_sampleSource != 0)

Wyświetl plik

@ -64,10 +64,6 @@ public:
virtual void stop();
virtual void pull(Sample& sample);
/** direct feeding of sample source FIFO */
virtual void feed(SampleSourceFifo* sampleFifo,
int nbSamples);
virtual bool handleMessage(const Message& cmd);
protected: