diff data/model/SparseModel.h @ 1040:a1cd5abcb38b cxx11

Introduce and use a samplerate type
author Chris Cannam
date Wed, 04 Mar 2015 12:01:04 +0000
parents cc27f35aa75c
children 57633d605547
line wrap: on
line diff
--- a/data/model/SparseModel.h	Tue Mar 03 17:09:19 2015 +0000
+++ b/data/model/SparseModel.h	Wed Mar 04 12:01:04 2015 +0000
@@ -43,14 +43,14 @@
                     public TabularModel
 {
 public:
-    SparseModel(int sampleRate, int resolution,
+    SparseModel(sv_samplerate_t sampleRate, int resolution,
 		bool notifyOnAdd = true);
     virtual ~SparseModel() { }
     
     virtual bool isOK() const { return true; }
     virtual sv_frame_t getStartFrame() const;
     virtual sv_frame_t getEndFrame() const;
-    virtual int getSampleRate() const { return m_sampleRate; }
+    virtual sv_samplerate_t getSampleRate() const { return m_sampleRate; }
 
     virtual Model *clone() const;
 
@@ -366,7 +366,7 @@
     }
             
 protected:
-    int m_sampleRate;
+    sv_samplerate_t m_sampleRate;
     int m_resolution;
     bool m_notifyOnAdd;
     sv_frame_t m_sinceLastNotifyMin;
@@ -460,7 +460,7 @@
 
 
 template <typename PointType>
-SparseModel<PointType>::SparseModel(int sampleRate,
+SparseModel<PointType>::SparseModel(sv_samplerate_t sampleRate,
                                     int resolution,
                                     bool notifyOnAdd) :
     m_sampleRate(sampleRate),