From 2abf28095ce48bfa525e5e6ee8cccfe1acac00f1 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Wed, 26 Mar 2008 12:53:36 -0500 Subject: [PATCH] Don't read more peaks than needed for waveform. --- Engine/Peaks.C | 2 ++ Timeline/Region.C | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Engine/Peaks.C b/Engine/Peaks.C index 183e5d4..d7c06d3 100644 --- a/Engine/Peaks.C +++ b/Engine/Peaks.C @@ -48,6 +48,8 @@ Peaks::fill_buffer ( float fpp, int s, int e ) const { _fpp = fpp; + printf( "fill_buffer\n" ); + /* FIXME: repair this */ // if ( fpp < _peaks->chunksize ) { diff --git a/Timeline/Region.C b/Timeline/Region.C index c393a34..6adcf40 100644 --- a/Timeline/Region.C +++ b/Timeline/Region.C @@ -460,7 +460,8 @@ Region::draw ( int X, int Y, int W, int H ) Peak *pbuf; _clip->read_peaks( timeline->fpp(), - _start + offset, min( (_end - _start) - offset, _end), +// _start + offset, min( (_end - _start) - offset, _end), + _start + offset, _start + offset + timeline->x_to_ts( W ), &peaks, &pbuf, &channels ); assert( pbuf );