summaryrefslogtreecommitdiff
path: root/gtk2_ardour/midi_region_view.h
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/midi_region_view.h')
-rw-r--r--gtk2_ardour/midi_region_view.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/gtk2_ardour/midi_region_view.h b/gtk2_ardour/midi_region_view.h
index 7329c6facc..37a66aa398 100644
--- a/gtk2_ardour/midi_region_view.h
+++ b/gtk2_ardour/midi_region_view.h
@@ -250,27 +250,17 @@ public:
/** Snap a region relative pixel coordinate to pixel units.
* @param x a pixel coordinate relative to region start
+ * @param explicitly do not use magnetic snap (required for snap delta calculation)
* @return the snapped pixel coordinate relative to region start
*/
- double snap_to_pixel(double x);
-
- /** Snap a region relative pixel coordinate to pixel units explicitly (no magnetic snap).
- * @param x a pixel coordinate relative to region start
- * @return the explicitly snapped pixel coordinate relative to region start
- */
- double snap_to_pixel_no_magnets (double x);
+ double snap_to_pixel(double x, bool explicitly = false);
/** Snap a region relative pixel coordinate to frame units.
* @param x a pixel coordinate relative to region start
+ * @param explicitly do not use magnetic snap (required for snap delta calculation)
* @return the snapped framepos_t coordinate relative to region start
*/
- framepos_t snap_pixel_to_sample(double x);
-
- /** Explicitly snap a region relative pixel coordinate to frame units (no magnetic snap).
- * @param x a pixel coordinate relative to region start
- * @return the explicitly snapped framepos_t coordinate relative to region start
- */
- framepos_t snap_pixel_to_sample_no_magnets (double x);
+ framepos_t snap_pixel_to_sample(double x, bool explicitly = false);
/** Convert a timestamp in beats into frames (both relative to region position) */
framepos_t region_beats_to_region_frames(Evoral::Beats beats) const;