void update_latency (bool playback);
bool update_route_latency (bool reverse, bool apply_to_delayline);
+ void initialize_latencies ();
void set_worst_io_latencies ();
void set_worst_output_latency ();
void set_worst_input_latency ();
name(),
_private_playback_latency.min,
_private_playback_latency.max));
+ PBD::stacktrace (std::cerr, 20);
} else {
_private_capture_latency = range;
DEBUG_TRACE (DEBUG::Latency, string_compose (
_process_graph.reset (new Graph (*this));
}
+ /* every time we reconnect, recompute worst case output latencies */
+
+ _engine.Running.connect_same_thread (*this, boost::bind (&Session::initialize_latencies, this));
+
/* Restart transport FSM */
_transport_fsm->start ();
return p;
}
+void
+Session::initialize_latencies ()
+{
+ {
+ Glib::Threads::Mutex::Lock lm (_engine.process_lock());
+ update_latency (false);
+ update_latency (true);
+ }
+
+ set_worst_io_latencies ();
+}
+
void
Session::set_worst_io_latencies_x (IOChange, void *)
{
_state_of_the_state = StateOfTheState (_state_of_the_state & ~(CannotSave | Dirty));
+ /* update latencies */
+
+ initialize_latencies ();
+
_locations->added.connect_same_thread (*this, boost::bind (&Session::location_added, this, _1));
_locations->removed.connect_same_thread (*this, boost::bind (&Session::location_removed, this, _1));
_locations->changed.connect_same_thread (*this, boost::bind (&Session::locations_changed, this));