Mercurial > hg > svcore
diff base/FFTCache.h @ 129:4e38a29c13fc
* Split large FFT caches up into several files. Ongoing.
author | Chris Cannam |
---|---|
date | Wed, 28 Jun 2006 13:41:12 +0000 |
parents | f47f4c7c158c |
children | 69d50575c52a |
line wrap: on
line diff
--- a/base/FFTCache.h Mon Jun 26 16:12:11 2006 +0000 +++ b/base/FFTCache.h Wed Jun 28 13:41:12 2006 +0000 @@ -21,10 +21,10 @@ #include <stdint.h> -class FFTCacheBase +class FFTCache { public: - virtual ~FFTCacheBase() { } + virtual ~FFTCache() { } virtual size_t getWidth() const = 0; virtual size_t getHeight() const = 0; @@ -46,6 +46,8 @@ // may modify argument arrays virtual void setColumnAt(size_t x, float *reals, float *imags) = 0; + virtual void suspend() { } + bool isLocalPeak(size_t x, size_t y) const { float mag = getMagnitudeAt(x, y); if (y > 0 && mag < getMagnitudeAt(x, y - 1)) return false; @@ -57,7 +59,7 @@ } protected: - FFTCacheBase() { } + FFTCache() { } }; @@ -80,7 +82,7 @@ * set appropriately. */ -class FFTMemoryCache : public FFTCacheBase +class FFTMemoryCache : public FFTCache { public: FFTMemoryCache(); // of size zero, call resize() before using