From 94e0a15325278ec26dbeba4990a0e883db859338 Mon Sep 17 00:00:00 2001 From: nick_m Date: Thu, 16 Jun 2016 00:18:27 +1000 Subject: Exact beat - provide audio->music mapping for region split. - for those not in the know, this series provides a way to remove the temporal distortion introduced when using an audio frame-based gui for music-locked objects. In short, the gui uses an audio frame representation to move objects. It displays the object using frame_at_beat(), quantizing the time value to audio frames. This is fine until the user selects that frame but expects it to be interpreted as a beat. Thus beat_at_frame() would not produce the user-expected beat (temporal quantization error of up to 0.5 audio samples). This is one method of mapping audio time to music time accurately. --- libs/ardour/ardour/playlist.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libs/ardour/ardour/playlist.h') diff --git a/libs/ardour/ardour/playlist.h b/libs/ardour/ardour/playlist.h index 7b19a08f6a..0a5f5e4ddc 100644 --- a/libs/ardour/ardour/playlist.h +++ b/libs/ardour/ardour/playlist.h @@ -134,8 +134,8 @@ public: void get_region_list_equivalent_regions (boost::shared_ptr, std::vector >&); void get_source_equivalent_regions (boost::shared_ptr, std::vector >&); void replace_region (boost::shared_ptr old, boost::shared_ptr newr, framepos_t pos); - void split_region (boost::shared_ptr, framepos_t position); - void split (framepos_t at); + void split_region (boost::shared_ptr, framepos_t position, const int32_t& sub_num); + void split (framepos_t at, const int32_t& sub_num); void shift (framepos_t at, frameoffset_t distance, bool move_intersected, bool ignore_music_glue); void partition (framepos_t start, framepos_t end, bool cut = false); void duplicate (boost::shared_ptr, framepos_t position, float times); @@ -380,7 +380,7 @@ public: void begin_undo (); void end_undo (); - void _split_region (boost::shared_ptr, framepos_t position); + void _split_region (boost::shared_ptr, framepos_t position, const int32_t& sub_num); typedef std::pair, boost::shared_ptr > TwoRegions; -- cgit v1.2.3