diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc index 434408d563..b7828de9b3 100644 --- a/gtk2_ardour/region_view.cc +++ b/gtk2_ardour/region_view.cc @@ -501,7 +501,7 @@ RegionView::reset_width_dependent_items (double pixel_width) _pixel_width = pixel_width; if (_xrun_markers_visible) { - const samplepos_t start = _region->start(); + const samplepos_t start = _region->start_sample(); for (list >::iterator i = _xrun_markers.begin(); i != _xrun_markers.end(); ++i) { float x_pos = trackview.editor().sample_to_pixel (i->first - start); i->second->set_x (x_pos); @@ -517,8 +517,8 @@ RegionView::update_xrun_markers () return; } - const samplepos_t start = _region->start(); - const samplepos_t length = _region->length(); + const samplepos_t start = _region->start_sample(); + const samplepos_t length = _region->length_samples(); for (list >::iterator i = _xrun_markers.begin(); i != _xrun_markers.end(); ++i) { float x_pos = trackview.editor().sample_to_pixel (i->first - start); i->second->set_x (x_pos); diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc index d8a32f8013..93d410f002 100644 --- a/libs/ardour/region.cc +++ b/libs/ardour/region.cc @@ -1826,11 +1826,13 @@ Region::captured_xruns (XrunPositions& xruns, bool abs) const bool was_empty = xruns.empty (); for (SourceList::const_iterator i = _sources.begin (); i != _sources.end(); ++i) { XrunPositions const& x = (*i)->captured_xruns (); + const samplepos_t ss = start_sample(); + const samplecnt_t ll = length_samples(); for (XrunPositions::const_iterator p = x.begin (); p != x.end (); ++p) { if (abs) { xruns.push_back (*p); - } else if (*p >= _start && *p < _start + _length) { - xruns.push_back (*p - _start); + } else if (*p >= ss && *p < ss + ll) { + xruns.push_back (*p - ss); } } }