qm-dsp
1.8
|
Resampler.cpp
Go to the documentation of this file.
271 cerr << "initial phase " << m_phase << " (as " << (m_filterLength/2) << " % " << inputSpacing << ")"
311 cerr << "process: buf siz " << m_buffer.size() << " filt siz for phase " << m_phase << " " << m_phaseData[m_phase].filter.size() << endl;
371 cerr << "n = " << n << ", sourceRate = " << sourceRate << ", targetRate = " << targetRate << ", m = " << m << ", latency = " << latency << ", inputPad = " << inputPad << ", m1 = " << m1 << ", n1 = " << n1 << ", n1 - n = " << n1 - n << endl;
382 cerr << "resample: " << n << " in, " << pad.size() << " padding, " << got << " out (" << gotData << " data, " << gotPad << " padding, latency = " << latency << ")" << endl;
401 cerr << "first " << printN << " out (after latency compensation), length " << sliced.size() << ":";
Kaiser window: A windower whose bandwidth and sidelobe height (signal-noise ratio) can be specified...
Definition: KaiserWindow.h:25
Resampler resamples a stream from one integer sample rate to another (arbitrary) rate, using a kaiser-windowed sinc filter.
Definition: Resampler.h:30
int getLatency() const
Return the number of samples of latency at the output due by the filter.
Definition: Resampler.h:68
Definition: Resampler.h:85
static Parameters parametersForBandwidth(double attenuation, double bandwidth, double samplerate)
Obtain the parameters necessary for a Kaiser window of the given attenuation in dB and transition ban...
Definition: KaiserWindow.h:72
Definition: KaiserWindow.h:28
int process(const double *src, double *dst, int n)
Read n input samples from src and write resampled data to dst.
Definition: Resampler.cpp:303
Resampler(int sourceRate, int targetRate)
Construct a Resampler to resample from sourceRate to targetRate.
Definition: Resampler.cpp:36
static int gcd(int a, int b)
Return the greatest common divisor of natural numbers a and b.
Definition: MathUtilities.cpp:406
static std::vector< double > resample(int sourceRate, int targetRate, const double *data, int n)
Carry out a one-off resample of a single block of n samples.
Definition: Resampler.cpp:346
Generated by 1.8.11