diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index 7ffe972540..8e7922b19c 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -2228,7 +2228,7 @@ Editor::motion_handler (ArdourCanvas::Item* /*item*/, GdkEvent* event, bool from } else { bool ignored; bool peaks_visible = false; - sanplepos_t where; + samplepos_t where; if (mouse_sample (where, ignored)) { /* display peaks */ @@ -2243,7 +2243,7 @@ Editor::motion_handler (ArdourCanvas::Item* /*item*/, GdkEvent* event, bool from /* the snapped_cursor shows where an operation (like Split) is going to occur */ timepos_t t (where); snap_to_with_modifier (t, event); - set_snapped_cursor_position (t.sample); + set_snapped_cursor_position (t); } if (!peaks_visible) { diff --git a/gtk2_ardour/region_peak_cursor.cc b/gtk2_ardour/region_peak_cursor.cc index 2061f78099..49e65d5762 100644 --- a/gtk2_ardour/region_peak_cursor.cc +++ b/gtk2_ardour/region_peak_cursor.cc @@ -87,8 +87,8 @@ RegionPeakCursor::set (AudioRegionView* arv, samplepos_t when, samplecnt_t sampl assert (ar); assert (ar->n_channels () > 0); - sampleoffset_t s = when - ar->position (); - if (s < 0 || s > ar->length ()) { + sampleoffset_t s = when - ar->position_sample (); + if (s < 0 || s > ar->length_samples ()) { hide (); return; } @@ -120,7 +120,7 @@ RegionPeakCursor::set (AudioRegionView* arv, samplepos_t when, samplecnt_t sampl /* position relative to editor origin */ ArdourCanvas::Duple pos = arv->get_canvas_group ()->item_to_window (_canvas_text->parent ()->position ()); - double xpos = pos.x + floor ((double)(when - ar->position ()) / samples_per_pixel); + double xpos = pos.x + floor ((double)(when - ar->position_sample ()) / samples_per_pixel); _canvas_text->set_x_position (xpos + 3); _canvas_text->set_y_position (pos.y + 3);