From 172bcc816504a08eb1bccbb72f58d7db7a8cb7e4 Mon Sep 17 00:00:00 2001 From: nick_m Date: Sat, 13 Aug 2016 04:02:46 +1000 Subject: Audio-locked midi region fixes. - don't alter region frame length on tempo change or position change. - set region _start correctly (see comments) on tempo map change. - ensure audio-locked region's beat is set on tempo map change --- libs/ardour/region.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'libs/ardour/region.cc') diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc index f7874664a5..141deac7d5 100644 --- a/libs/ardour/region.cc +++ b/libs/ardour/region.cc @@ -558,7 +558,13 @@ Region::update_after_tempo_map_change (bool send) { boost::shared_ptr pl (playlist()); - if (!pl || _position_lock_style != MusicTime) { + if (!pl) { + return; + } + + if (_position_lock_style == AudioTime) { + /* don't signal as the actual position has not chnged */ + recompute_position_from_lock_style (0); return; } @@ -601,9 +607,7 @@ Region::set_position (framepos_t pos, int32_t sub_num) Notify a length change regardless (its more efficient for MidiRegions), and when Region has a _length_beats we will need it here anyway). */ - if (position_lock_style() == MusicTime) { - p_and_l.add (Properties::length); - } + p_and_l.add (Properties::length); send_change (p_and_l); -- cgit v1.2.3