diff --git a/gtk2_ardour/region_peak_cursor.cc b/gtk2_ardour/region_peak_cursor.cc index 4dcd7cfafc..2061f78099 100644 --- a/gtk2_ardour/region_peak_cursor.cc +++ b/gtk2_ardour/region_peak_cursor.cc @@ -87,12 +87,15 @@ RegionPeakCursor::set (AudioRegionView* arv, samplepos_t when, samplecnt_t sampl assert (ar); assert (ar->n_channels () > 0); - sampleoffset_t s = when + ar->start () - ar->position (); + sampleoffset_t s = when - ar->position (); if (s < 0 || s > ar->length ()) { hide (); return; } + /* read_peaks() offset is relative to the region's source */ + s += ar->start (); + PeakData p; for (uint32_t chn = 0; chn < ar->n_channels (); ++chn) { PeakData pc;