1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 01:39:05 -05:00

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

This commit is contained in:
f4exb 2016-12-22 23:45:56 +01:00
parent 1afd8df5f9
commit f74e3b83a7
11 changed files with 11 additions and 91 deletions

View File

@ -136,19 +136,6 @@ void AMMod::pull(Sample& sample)
sample.m_imag = (FixReal) ci.imag(); 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() void AMMod::modulateSample()
{ {
Real t; Real t;

View File

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

View File

@ -151,19 +151,6 @@ void NFMMod::pull(Sample& sample)
sample.m_imag = (FixReal) ci.imag(); 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() void NFMMod::modulateSample()
{ {
Real t; Real t;

View File

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

View File

@ -182,19 +182,6 @@ void SSBMod::pull(Sample& sample)
sample.m_imag = (FixReal) ci.imag(); 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() void SSBMod::modulateSample()
{ {
pullAF(m_modSample); pullAF(m_modSample);

View File

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

View File

@ -139,19 +139,6 @@ void WFMMod::pull(Sample& sample)
sample.m_imag = (FixReal) ci.imag(); 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) void WFMMod::pullAF(Complex& sample)
{ {
int16_t audioSample[2]; int16_t audioSample[2];

View File

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

View File

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

View File

@ -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() void UpChannelizer::start()
{ {
if (m_sampleSource != 0) if (m_sampleSource != 0)

View File

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