diff layer/WaveformLayer.h @ 944:78c152e4db95

Merge from branch tonioni
author Chris Cannam
date Mon, 20 Apr 2015 09:12:17 +0100
parents 4a578a360011
children 94e4952a6774 e53a87a5efb2
line wrap: on
line diff
--- a/layer/WaveformLayer.h	Thu Jan 15 10:42:00 2015 +0000
+++ b/layer/WaveformLayer.h	Mon Apr 20 09:12:17 2015 +0100
@@ -156,8 +156,8 @@
      * bottom; the default value of 0.5 indicates that it occupies the
      * whole layer, centred at the middle.
      */
-    void setMiddleLineHeight(float height);
-    float getMiddleLineHeight() const { return m_middleLineHeight; }
+    void setMiddleLineHeight(double);
+    double getMiddleLineHeight() const { return m_middleLineHeight; }
 
     /**
      * Enable or disable aggressive pixmap cacheing.  If enabled,
@@ -184,14 +184,14 @@
 
     virtual int getCompletion(View *) const;
 
-    virtual bool getValueExtents(float &min, float &max,
+    virtual bool getValueExtents(double &min, double &max,
                                  bool &log, QString &unit) const;
 
     virtual bool getYScaleValue(const View *v, int y,
-                                float &value, QString &unit) const;
+                                double &value, QString &unit) const;
     
     virtual bool getYScaleDifference(const View *v, int y0, int y1,
-                                     float &diff, QString &unit) const;
+                                     double &diff, QString &unit) const;
 
     virtual void toXml(QTextStream &stream, QString indent = "",
                        QString extraAttributes = "") const;
@@ -203,7 +203,7 @@
     virtual void setVerticalZoomStep(int);
 
 protected:
-    int dBscale(float sample, int m) const;
+    int dBscale(double sample, int m) const;
 
     const RangeSummarisableTimeValueModel *m_model; // I do not own this
 
@@ -211,12 +211,12 @@
     int getChannelArrangement(int &min, int &max,
                                  bool &merging, bool &mixing) const;
 
-    int getYForValue(const View *v, float value, int channel) const;
+    int getYForValue(const View *v, double value, int channel) const;
 
-    float getValueForY(const View *v, int y, int &channel) const;
+    double getValueForY(const View *v, int y, int &channel) const;
 
     bool getSourceFramesForX(View *v, int x, int modelZoomLevel,
-                             int &f0, int &f1) const;
+                             sv_frame_t &f0, sv_frame_t &f1) const;
 
     float getNormalizeGain(View *v, int channel) const;
 
@@ -229,7 +229,7 @@
     ChannelMode  m_channelMode;
     int          m_channel;
     Scale        m_scale;
-    float        m_middleLineHeight;
+    double       m_middleLineHeight;
     bool         m_aggressive;
 
     mutable std::vector<float> m_effectiveGains;