diff --git a/src/rtlsource.hh b/src/rtlsource.hh index 4c78e39..92e270a 100644 --- a/src/rtlsource.hh +++ b/src/rtlsource.hh @@ -55,7 +55,9 @@ public: /** Stops the reception. */ void stop(); + /** Returns the number of compatible devices found. */ static size_t numDevices(); + /** Returns the name of the specified device. */ static std::string deviceName(size_t idx); protected: diff --git a/src/subsample.hh b/src/subsample.hh index 0b2f919..78cece3 100644 --- a/src/subsample.hh +++ b/src/subsample.hh @@ -185,11 +185,17 @@ protected: }; - +/** An interpolating sub-sampler. This node uses an 8-tap FIR filter to interpolate between + * two values (given 8). Please do not use this node to subsample by a factor grater than 8, + * as this may result into artifacts unless the signal was filtered accordingly before + * subsampling it. */ template class InpolSubSampler: public Sink, public Source { public: + /** Constructor. + * @param frac Specifies the sub-sampling fraction. I.e. frac=2 will result into half the input + * sample-rate. */ InpolSubSampler(float frac) : Sink(), Source(), _frac(frac), _mu(0) { @@ -201,10 +207,12 @@ public: } } + /** Destructor. */ virtual ~InpolSubSampler() { // pass... } + /** Configures the sub-sampling node. */ virtual void config(const Config &src_cfg) { // Requires type and buffer size if (!src_cfg.hasType() || !src_cfg.hasBufferSize()) { return; } @@ -230,7 +238,7 @@ public: this->setConfig(Config(Traits::scalarId, src_cfg.sampleRate()/_frac, bufSize, 1)); } - + /** Performs the sub-sampling. */ virtual void process(const Buffer &buffer, bool allow_overwrite) { size_t i=0, o=0; while (i _dl; + /** Index of the delay-line. */ size_t _dl_idx; + /** The output buffer. */ Buffer _buffer; };