Fix incorrect start_pulse in MidiRegion copy-with-offset ctor.
authornick_m <mainsbridge@gmail.com>
Tue, 30 Aug 2016 19:05:30 +0000 (05:05 +1000)
committernick_m <mainsbridge@gmail.com>
Wed, 31 Aug 2016 13:12:11 +0000 (23:12 +1000)
libs/ardour/midi_region.cc

index eb06a6eee3ed961dbdf511e136ad5cad82625e26..57c78e312fffbf0b668477e51b22bcd45a2b52f6 100644 (file)
@@ -121,8 +121,8 @@ MidiRegion::MidiRegion (boost::shared_ptr<const MidiRegion> other, frameoffset_t
        , _start_pulse (Properties::start_pulse, 0)
        , _length_pulse (Properties::length_pulse, other->_length_pulse)
 {
-       _start_beats = Evoral::Beats (_session.tempo_map().exact_beat_at_frame ((other->_position + offset), sub_num) - other->beat()) + other->_start_beats;
-       _start_pulse = (_session.tempo_map().exact_qn_at_frame (other->_position + offset, sub_num) / 4.0) - (other->pulse() + other->_start_pulse);
+       _start_beats = Evoral::Beats (_session.tempo_map().exact_beat_at_frame (other->_position + offset, sub_num) - other->beat()) + other->_start_beats;
+       _start_pulse = ((_session.tempo_map().exact_qn_at_frame (other->_position + offset, sub_num) / 4.0) - other->_pulse) + other->_start_pulse;
 
        update_length_beats (sub_num);
        register_properties ();