summaryrefslogtreecommitdiff
path: root/gtk2_ardour/audio_clock.cc
diff options
context:
space:
mode:
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;