Marsyas
0.6.0-alpha
|
Downsample the input signal by dropping samples. More...
#include <DownSampler.h>
Inherits MarSystem.
Public Member Functions | |
MarSystem * | clone () const |
DownSampler clone method. | |
DownSampler (std::string name) | |
DownSampler constructor. | |
DownSampler (const DownSampler &a) | |
DownSampler copy constructor. | |
void | myProcess (realvec &in, realvec &out) |
Processes data. | |
~DownSampler () | |
DownSampler destructor. |
Downsample the input signal by dropping samples.
Downsample the signal by an integer factor N. The output of the DownSampler will only reproduce the input samples at multiples of N.
Note that the DownSampler does not take care of any low pass filtering to avoid frequency aliasing.
Note that the DownSampler restarts counting and dropping samples for every given slice. Consequently, if the number of input samples is not divisible by the downsample factor, the sampling will be not uniform around the slice borders.
Controls:
Definition at line 47 of file DownSampler.h.
DownSampler | ( | std::string | name | ) |
DownSampler constructor.
Definition at line 27 of file DownSampler.cpp.
DownSampler | ( | const DownSampler & | a | ) |
DownSampler copy constructor.
All member MarControlPtr have to be explicitly reassigned in the copy constructor.
Definition at line 36 of file DownSampler.cpp.
~DownSampler | ( | ) |
DownSampler destructor.
Definition at line 32 of file DownSampler.cpp.
Processes data.
in | Input data to read. |
out | Output data to write. |
Implement this method in subclass to define specific data processing.
Implements MarSystem.
Definition at line 78 of file DownSampler.cpp.