Provide dialogs to edit pan values numerically, at least for
[ardour.git] / libs / ardour / session_time.cc
index cf8ef084b2bd9ebb2d39a9185267e2d186f26c78..42ae3155978db9f559ccccac45c39131bb070d1d 100644 (file)
@@ -32,9 +32,6 @@
 #include "pbd/enumwriter.h"
 #include "pbd/stacktrace.h"
 
-#include "ardour/ardour.h"
-#include "ardour/configuration.h"
-#include "ardour/audioengine.h"
 #include "ardour/session.h"
 #include "ardour/tempo.h"
 
@@ -484,20 +481,26 @@ Session::jack_timebase_callback (jack_transport_state_t /*state*/,
        if (_tempo_map) {
 
                TempoMetric metric (_tempo_map->metric_at (_transport_frame));
-               _tempo_map->bbt_time_with_metric (_transport_frame, bbt, metric);
 
-               pos->bar = bbt.bars;
-               pos->beat = bbt.beats;
-               pos->tick = bbt.ticks;
-
-               // XXX still need to set bar_start_tick
-
-               pos->beats_per_bar = metric.meter().divisions_per_bar();
-               pos->beat_type = metric.meter().note_divisor();
-               pos->ticks_per_beat = Timecode::BBT_Time::ticks_per_bar_division;
-               pos->beats_per_minute = metric.tempo().beats_per_minute();
-
-               pos->valid = jack_position_bits_t (pos->valid | JackPositionBBT);
+               try {
+                       _tempo_map->bbt_time_rt (_transport_frame, bbt);
+
+                       pos->bar = bbt.bars;
+                       pos->beat = bbt.beats;
+                       pos->tick = bbt.ticks;
+                       
+                       // XXX still need to set bar_start_tick
+                       
+                       pos->beats_per_bar = metric.meter().divisions_per_bar();
+                       pos->beat_type = metric.meter().note_divisor();
+                       pos->ticks_per_beat = Timecode::BBT_Time::ticks_per_beat;
+                       pos->beats_per_minute = metric.tempo().beats_per_minute();
+                       
+                       pos->valid = jack_position_bits_t (pos->valid | JackPositionBBT);
+
+               } catch (...) {
+                       /* no message */
+               }
        }
 
 #ifdef HAVE_JACK_VIDEO_SUPPORT