Mercurial > hg > qm-dsp
diff dsp/rateconversion/Resampler.h @ 138:e89d489af128
Add one-shot resample function
author | Chris Cannam |
---|---|
date | Sun, 13 Oct 2013 12:47:50 +0100 |
parents | dce8337a83c8 |
children | 7fe0da91e9c3 |
line wrap: on
line diff
--- a/dsp/rateconversion/Resampler.h Fri Oct 11 18:00:51 2013 +0100 +++ b/dsp/rateconversion/Resampler.h Sun Oct 13 12:47:50 2013 +0100 @@ -31,6 +31,13 @@ */ int getLatency() const { return m_latency; } + /** + * Carry out a one-off resample of a single block of n + * samples. The output is latency-compensated. + */ + static std::vector<double> resample + (int sourceRate, int targetRate, const double *data, int n); + private: int m_sourceRate; int m_targetRate;