comparison layer/SpectrumLayer.h @ 805:1d526ba11a24 warnfix_no_size_t

Remove size_t's and fix warnings in layer/
author Chris Cannam
date Tue, 17 Jun 2014 15:18:06 +0100
parents 5b72899d692b
children b66fb15de477
comparison
equal deleted inserted replaced
782:ddae586bc47b 805:1d526ba11a24
79 virtual bool isLayerScrollable(const View *) const { return false; } 79 virtual bool isLayerScrollable(const View *) const { return false; }
80 80
81 void setChannel(int); 81 void setChannel(int);
82 int getChannel() const { return m_channel; } 82 int getChannel() const { return m_channel; }
83 83
84 void setWindowSize(size_t); 84 void setWindowSize(int);
85 size_t getWindowSize() const { return m_windowSize; } 85 int getWindowSize() const { return m_windowSize; }
86 86
87 void setWindowHopLevel(size_t level); 87 void setWindowHopLevel(int level);
88 size_t getWindowHopLevel() const { return m_windowHopLevel; } 88 int getWindowHopLevel() const { return m_windowHopLevel; }
89 89
90 void setWindowType(WindowType type); 90 void setWindowType(WindowType type);
91 WindowType getWindowType() const { return m_windowType; } 91 WindowType getWindowType() const { return m_windowType; }
92 92
93 void setShowPeaks(bool); 93 void setShowPeaks(bool);
108 // } 108 // }
109 109
110 DenseTimeValueModel *m_originModel; 110 DenseTimeValueModel *m_originModel;
111 int m_channel; 111 int m_channel;
112 bool m_channelSet; 112 bool m_channelSet;
113 size_t m_windowSize; 113 int m_windowSize;
114 WindowType m_windowType; 114 WindowType m_windowType;
115 size_t m_windowHopLevel; 115 int m_windowHopLevel;
116 bool m_showPeaks; 116 bool m_showPeaks;
117 mutable bool m_newFFTNeeded; 117 mutable bool m_newFFTNeeded;
118 118
119 mutable QMutex m_fftMutex; 119 mutable QMutex m_fftMutex;
120 120
127 virtual int getBinForX(float x, int totalBins, float w) const; 127 virtual int getBinForX(float x, int totalBins, float w) const;
128 128
129 float getFrequencyForX(float x, float w) const; 129 float getFrequencyForX(float x, float w) const;
130 float getXForFrequency(float freq, float w) const; 130 float getXForFrequency(float freq, float w) const;
131 131
132 size_t getWindowIncrement() const { 132 int getWindowIncrement() const {
133 if (m_windowHopLevel == 0) return m_windowSize; 133 if (m_windowHopLevel == 0) return m_windowSize;
134 else if (m_windowHopLevel == 1) return (m_windowSize * 3) / 4; 134 else if (m_windowHopLevel == 1) return (m_windowSize * 3) / 4;
135 else return m_windowSize / (1 << (m_windowHopLevel - 1)); 135 else return m_windowSize / (1 << (m_windowHopLevel - 1));
136 } 136 }
137 }; 137 };