diff --git a/plugins/channeltx/modam/ammod.cpp b/plugins/channeltx/modam/ammod.cpp index 371bb1b3c..de57a690f 100644 --- a/plugins/channeltx/modam/ammod.cpp +++ b/plugins/channeltx/modam/ammod.cpp @@ -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; diff --git a/plugins/channeltx/modam/ammod.h b/plugins/channeltx/modam/ammod.h index 5a1b36d6f..0e16320f2 100644 --- a/plugins/channeltx/modam/ammod.h +++ b/plugins/channeltx/modam/ammod.h @@ -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); diff --git a/plugins/channeltx/modnfm/nfmmod.cpp b/plugins/channeltx/modnfm/nfmmod.cpp index 3ff87ff3a..64fda354e 100644 --- a/plugins/channeltx/modnfm/nfmmod.cpp +++ b/plugins/channeltx/modnfm/nfmmod.cpp @@ -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; diff --git a/plugins/channeltx/modnfm/nfmmod.h b/plugins/channeltx/modnfm/nfmmod.h index 7916cc29a..eb6e2978d 100644 --- a/plugins/channeltx/modnfm/nfmmod.h +++ b/plugins/channeltx/modnfm/nfmmod.h @@ -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); diff --git a/plugins/channeltx/modssb/ssbmod.cpp b/plugins/channeltx/modssb/ssbmod.cpp index f6db984ba..98ff21b6c 100644 --- a/plugins/channeltx/modssb/ssbmod.cpp +++ b/plugins/channeltx/modssb/ssbmod.cpp @@ -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); diff --git a/plugins/channeltx/modssb/ssbmod.h b/plugins/channeltx/modssb/ssbmod.h index f4d41f92f..c420fceaa 100644 --- a/plugins/channeltx/modssb/ssbmod.h +++ b/plugins/channeltx/modssb/ssbmod.h @@ -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); diff --git a/plugins/channeltx/modwfm/wfmmod.cpp b/plugins/channeltx/modwfm/wfmmod.cpp index 8129e3d36..2c296713c 100644 --- a/plugins/channeltx/modwfm/wfmmod.cpp +++ b/plugins/channeltx/modwfm/wfmmod.cpp @@ -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]; diff --git a/plugins/channeltx/modwfm/wfmmod.h b/plugins/channeltx/modwfm/wfmmod.h index 83cd5491f..0d7e2eb2c 100644 --- a/plugins/channeltx/modwfm/wfmmod.h +++ b/plugins/channeltx/modwfm/wfmmod.h @@ -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); diff --git a/sdrbase/dsp/basebandsamplesource.h b/sdrbase/dsp/basebandsamplesource.h index e78bd9890..83e29e2e2 100644 --- a/sdrbase/dsp/basebandsamplesource.h +++ b/sdrbase/dsp/basebandsamplesource.h @@ -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 diff --git a/sdrbase/dsp/upchannelizer.cpp b/sdrbase/dsp/upchannelizer.cpp index d15785943..e31d55487 100644 --- a/sdrbase/dsp/upchannelizer.cpp +++ b/sdrbase/dsp/upchannelizer.cpp @@ -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) diff --git a/sdrbase/dsp/upchannelizer.h b/sdrbase/dsp/upchannelizer.h index 8c801df1b..5037e6e74 100644 --- a/sdrbase/dsp/upchannelizer.h +++ b/sdrbase/dsp/upchannelizer.h @@ -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: