diff data/model/Dense3DModelPeakCache.h @ 546:95391b480e17

* Make use of peak cache in spectrogram
author Chris Cannam
date Wed, 04 Feb 2009 15:03:42 +0000
parents c603d9439b37
children 59e7fe1b1003
line wrap: on
line diff
--- a/data/model/Dense3DModelPeakCache.h	Wed Feb 04 13:33:50 2009 +0000
+++ b/data/model/Dense3DModelPeakCache.h	Wed Feb 04 15:03:42 2009 +0000
@@ -22,11 +22,33 @@
 
 class Dense3DModelPeakCache : public DenseThreeDimensionalModel
 {
+    Q_OBJECT
+
 public:
     Dense3DModelPeakCache(DenseThreeDimensionalModel *source,
                           size_t columnsPerPeak);
     ~Dense3DModelPeakCache();
 
+    virtual bool isOK() const {
+        return m_source && m_source->isOK(); 
+    }
+
+    virtual size_t getSampleRate() const {
+        return m_source->getSampleRate();
+    }
+
+    virtual size_t getStartFrame() const {
+        return m_source->getStartFrame();
+    }
+
+    virtual size_t getEndFrame() const {
+        return m_source->getEndFrame();
+    }
+
+    virtual Model *clone() const {
+        return new Dense3DModelPeakCache(m_source, m_resolution);
+    }
+    
     virtual size_t getResolution() const {
         return m_source->getResolution() * m_resolution;
     }