diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-06-20 14:37:31 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-06-20 14:37:31 -0400 |
commit | 27c943f1ddca0890ac2e5547b249334e0266c0a5 (patch) | |
tree | fd3c1c6b4421cfbf720d3a91ab58141461446017 /libs/ardour/audiosource.cc | |
parent | 3604bf12a2806b2a21b4ac6a1776fa55ed7963b4 (diff) |
new image cache design for waveviews, with various fixes.
Rather than maintain a set of images in a cache, when we no longer have the required waveform data, create a new image that is appropriately centered and extends to roughly twice the screen width (or the limits of the region's source file(s), as necessary)
Diffstat (limited to 'libs/ardour/audiosource.cc')
-rw-r--r-- | libs/ardour/audiosource.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/ardour/audiosource.cc b/libs/ardour/audiosource.cc index 74dd52d504..767ea1f9a8 100644 --- a/libs/ardour/audiosource.cc +++ b/libs/ardour/audiosource.cc @@ -342,14 +342,14 @@ AudioSource::read_peaks_with_fpp (PeakData *peaks, framecnt_t npeaks, framepos_t /* fix for near-end-of-file conditions */ if (cnt > _length - start) { - // cerr << "too close to end @ " << _length << " given " << start << " + " << cnt << endl; + cerr << "too close to end @ " << _length << " given " << start << " + " << cnt << " (" << _length - start << ")" << endl; cnt = _length - start; framecnt_t old = npeaks; npeaks = min ((framecnt_t) floor (cnt / samples_per_visual_peak), npeaks); zero_fill = old - npeaks; } - // cerr << "actual npeaks = " << npeaks << " zf = " << zero_fill << endl; + cerr << "actual npeaks = " << npeaks << " zf = " << zero_fill << endl; if (npeaks == cnt) { @@ -527,6 +527,7 @@ AudioSource::read_peaks_with_fpp (PeakData *peaks, framecnt_t npeaks, framepos_t } if (zero_fill) { + cerr << "Zero fill end of peaks (@ " << npeaks << " with " << zero_fill << endl; memset (&peaks[npeaks], 0, sizeof (PeakData) * zero_fill); } |