Mercurial > hg > svgui
comparison layer/WaveformLayer.h @ 1336:43296804c473 zoom
Toward oversampling rendering
author | Chris Cannam |
---|---|
date | Mon, 24 Sep 2018 14:40:48 +0100 |
parents | bc44b520405f |
children | 6d091348e4e9 |
comparison
equal
deleted
inserted
replaced
1335:bc44b520405f | 1336:43296804c473 |
---|---|
23 #include "data/model/RangeSummarisableTimeValueModel.h" | 23 #include "data/model/RangeSummarisableTimeValueModel.h" |
24 | 24 |
25 class View; | 25 class View; |
26 class QPainter; | 26 class QPainter; |
27 class QPixmap; | 27 class QPixmap; |
28 | |
29 namespace breakfastquay { class Resampler; } | |
28 | 30 |
29 class WaveformLayer : public SingleColourLayer | 31 class WaveformLayer : public SingleColourLayer |
30 { | 32 { |
31 Q_OBJECT | 33 Q_OBJECT |
32 | 34 |
211 | 213 |
212 /// Return value is number of channels displayed | 214 /// Return value is number of channels displayed |
213 int getChannelArrangement(int &min, int &max, | 215 int getChannelArrangement(int &min, int &max, |
214 bool &merging, bool &mixing) const; | 216 bool &merging, bool &mixing) const; |
215 | 217 |
216 void paintChannel(LayerGeometryProvider *, QPainter *paint, QRect rect, | 218 void paintChannelSummarised |
217 int channel, | 219 (LayerGeometryProvider *, QPainter *paint, QRect rect, int channel, |
218 const std::vector<RangeSummarisableTimeValueModel::RangeBlock> &ranges, | 220 const std::vector<RangeSummarisableTimeValueModel::RangeBlock> &ranges, |
219 int blockSize, sv_frame_t frame0, sv_frame_t frame1) | 221 int blockSize, sv_frame_t frame0, sv_frame_t frame1) const; |
220 const; | 222 |
221 | 223 void paintChannelOversampled |
224 (LayerGeometryProvider *, QPainter *paint, QRect rect, int channel, | |
225 sv_frame_t frame0, sv_frame_t frame1) const; | |
226 | |
222 void paintChannelScaleGuides(LayerGeometryProvider *, QPainter *paint, | 227 void paintChannelScaleGuides(LayerGeometryProvider *, QPainter *paint, |
223 QRect rect, int channel) const; | 228 QRect rect, int channel) const; |
224 | 229 |
225 int getYForValue(const LayerGeometryProvider *v, double value, int channel) const; | 230 int getYForValue(const LayerGeometryProvider *v, double value, int channel) const; |
226 | 231 |
240 ChannelMode m_channelMode; | 245 ChannelMode m_channelMode; |
241 int m_channel; | 246 int m_channel; |
242 Scale m_scale; | 247 Scale m_scale; |
243 double m_middleLineHeight; | 248 double m_middleLineHeight; |
244 bool m_aggressive; | 249 bool m_aggressive; |
250 int m_oversampleRate; | |
251 int m_oversampleTail; | |
245 | 252 |
246 mutable std::vector<float> m_effectiveGains; | 253 mutable std::vector<float> m_effectiveGains; |
254 | |
255 mutable breakfastquay::Resampler *m_oversampler; | |
247 | 256 |
248 mutable QPixmap *m_cache; | 257 mutable QPixmap *m_cache; |
249 mutable bool m_cacheValid; | 258 mutable bool m_cacheValid; |
250 mutable ZoomLevel m_cacheZoomLevel; | 259 mutable ZoomLevel m_cacheZoomLevel; |
251 }; | 260 }; |