bbt duration clock - revert 3d38b4f58e and a32aea4201. use an alternate fix.

This commit is contained in:
nick_m 2016-10-20 03:40:06 +11:00
parent 3d38b4f58e
commit 3fa9dd51b2

View file

@ -670,7 +670,7 @@ AudioClock::end_edit (bool modify)
case BBT:
if (is_duration) {
pos = frame_duration_from_bbt_string (current_time(), edit_string);
pos = frame_duration_from_bbt_string (bbt_reference_time, edit_string);
} else {
pos = frames_from_bbt_string (0, edit_string);
}
@ -1246,6 +1246,10 @@ AudioClock::set_bbt (framepos_t when, framecnt_t offset, bool /*force*/)
negative = true;
}
if (offset == 0) {
offset = bbt_reference_time;
}
/* handle a common case */
if (is_duration) {
if (when == 0) {
@ -1255,9 +1259,6 @@ AudioClock::set_bbt (framepos_t when, framecnt_t offset, bool /*force*/)
} else {
TempoMap& tmap (_session->tempo_map());
/* if offset is before beat 0, it is meaningless */
offset = max (offset, tmap.frame_at_beat (0.0));
const double divisions = tmap.meter_section_at_frame (offset).divisions_per_bar();
Timecode::BBT_Time sub_bbt;