diff layer/SpectrogramLayer.h @ 1450:6cf3cb6641e1 single-point

Tweak peak-cache allocations etc in the hope of making long spectrograms a little faster to re-render
author Chris Cannam
date Wed, 01 May 2019 14:41:28 +0100
parents a18e78b9c78b
children 696e569ff21b
line wrap: on
line diff
--- a/layer/SpectrogramLayer.h	Wed May 01 14:40:51 2019 +0100
+++ b/layer/SpectrogramLayer.h	Wed May 01 14:41:28 2019 +0100
@@ -311,8 +311,9 @@
     Dense3DModelPeakCache *m_wholeCache;
     Dense3DModelPeakCache *m_peakCache;
     Dense3DModelPeakCache *getPeakCache() const { return m_peakCache; }
-    const int m_peakCacheDivisor;
-    bool canStoreWholeCache() const;
+    int m_peakCacheDivisor;
+    void checkCacheSpace(int *suggestedPeakDivisor,
+                         bool *createWholeCache) const;
     void recreateFFTModel();
 
     typedef std::map<int, MagnitudeRange> ViewMagMap; // key is view id