summaryrefslogtreecommitdiff
path: root/gtk2_ardour/audio_clock.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2016-10-20 03:40:06 +1100
committernick_m <mainsbridge@gmail.com>2016-10-20 03:40:06 +1100
commit3fa9dd51b2c4b5de39c73e1882d9b072338d8aaf (patch)
tree1be1eff1624320aa482e570f985b7428f0f52ffc /gtk2_ardour/audio_clock.cc
parent3d38b4f58ec0b1ebab9101863ed93a698f4b4c94 (diff)
bbt duration clock - revert 3d38b4f58ec0 and a32aea4201. use an alternate fix.
Diffstat (limited to 'gtk2_ardour/audio_clock.cc')
-rw-r--r--gtk2_ardour/audio_clock.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc
index 4a1275192d..9870aec04f 100644
--- a/gtk2_ardour/audio_clock.cc
+++ b/gtk2_ardour/audio_clock.cc
@@ -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;