Mercurial > hg > decimation
diff garage-resampler/Resampler.h @ 1:af48ddb3542a
Add one-shot resample function
author | Chris Cannam |
---|---|
date | Sun, 13 Oct 2013 12:47:50 +0100 |
parents | 8dd4134043a1 |
children | bda8d2e803ee |
line wrap: on
line diff
--- a/garage-resampler/Resampler.h Fri Oct 11 18:00:51 2013 +0100 +++ b/garage-resampler/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;