diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-06-18 09:00:15 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-06-29 14:18:15 -0400 |
commit | bace0e85dcc1d6d06ded3d6174fbdc803d180744 (patch) | |
tree | 319d56f7f2ae873a3522f4d90a64223bf3388ef6 /libs/canvas | |
parent | 2e29e7ee620379e1f824ef84fa778b0fd032f5a7 (diff) |
attempt to correctly respond to changes in _amplitude_above_axis in ArdourCanvas::WaveView
Diffstat (limited to 'libs/canvas')
-rw-r--r-- | libs/canvas/wave_view.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libs/canvas/wave_view.cc b/libs/canvas/wave_view.cc index 4b9ff2dd9d..f4e56cb1d5 100644 --- a/libs/canvas/wave_view.cc +++ b/libs/canvas/wave_view.cc @@ -399,7 +399,7 @@ WaveView::draw_image (Cairo::RefPtr<Cairo::ImageSurface>& image, PeakData* _peak has been scaled by scale_amplitude() already. */ - const double clip_level = _clip_level * _region_amplitude; + const double clip_level = _clip_level * req->amplitude; if (_shape == WaveView::Rectified) { @@ -737,6 +737,7 @@ WaveView::draw_image (Cairo::RefPtr<Cairo::ImageSurface>& image, PeakData* _peak boost::shared_ptr<WaveViewCache::Entry> WaveView::cache_request_result (boost::shared_ptr<WaveViewThreadRequest> req) const { + boost::shared_ptr<WaveViewCache::Entry> ret (new WaveViewCache::Entry (req->channel, req->height, req->amplitude, @@ -983,6 +984,12 @@ WaveView::generate_image (boost::shared_ptr<WaveViewThreadRequest> req, bool in_ if (peaks_read > 0) { + /* region amplitude will have been used to generate the + * peak values already, but not the visual-only + * amplitude_above_axis. So apply that here before + * rendering. + */ + if (_amplitude_above_axis != 1.0) { for (framecnt_t i = 0; i < n_peaks; ++i) { peaks[i].max *= _amplitude_above_axis; |