Mercurial > hg > svgui
diff 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 |
line wrap: on
line diff
--- a/layer/WaveformLayer.h Fri Sep 21 14:46:53 2018 +0100 +++ b/layer/WaveformLayer.h Mon Sep 24 14:40:48 2018 +0100 @@ -26,6 +26,8 @@ class QPainter; class QPixmap; +namespace breakfastquay { class Resampler; } + class WaveformLayer : public SingleColourLayer { Q_OBJECT @@ -213,12 +215,15 @@ int getChannelArrangement(int &min, int &max, bool &merging, bool &mixing) const; - void paintChannel(LayerGeometryProvider *, QPainter *paint, QRect rect, - int channel, - const std::vector<RangeSummarisableTimeValueModel::RangeBlock> &ranges, - int blockSize, sv_frame_t frame0, sv_frame_t frame1) - const; + void paintChannelSummarised + (LayerGeometryProvider *, QPainter *paint, QRect rect, int channel, + const std::vector<RangeSummarisableTimeValueModel::RangeBlock> &ranges, + int blockSize, sv_frame_t frame0, sv_frame_t frame1) const; + void paintChannelOversampled + (LayerGeometryProvider *, QPainter *paint, QRect rect, int channel, + sv_frame_t frame0, sv_frame_t frame1) const; + void paintChannelScaleGuides(LayerGeometryProvider *, QPainter *paint, QRect rect, int channel) const; @@ -242,9 +247,13 @@ Scale m_scale; double m_middleLineHeight; bool m_aggressive; + int m_oversampleRate; + int m_oversampleTail; mutable std::vector<float> m_effectiveGains; + mutable breakfastquay::Resampler *m_oversampler; + mutable QPixmap *m_cache; mutable bool m_cacheValid; mutable ZoomLevel m_cacheZoomLevel;