-}
-
-void
-Session::update_latency_compensation (bool with_stop, bool abort)
-{
- bool update_jack = false;
- PostTransportWork ptw;
-
- if (_state_of_the_state & Deletion) {
- return;
- }
-
- _worst_track_latency = 0;
- ptw = post_transport_work();
-
-#undef DEBUG_LATENCY
-#ifdef DEBUG_LATENCY
- cerr << "\n---------------------------------\nUPDATE LATENCY\n";
-#endif
-
- boost::shared_ptr<RouteList> r = routes.reader ();
-
- for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
-
- if (with_stop) {
- (*i)->handle_transport_stopped (abort, (ptw & PostTransportLocate), (!(ptw & PostTransportLocate) || pending_locate_flush));
- }
-
- nframes_t old_latency = (*i)->output()->signal_latency ();
- nframes_t track_latency = (*i)->update_total_latency ();
-
- if (old_latency != track_latency) {
- (*i)->input()->update_port_total_latencies ();
- (*i)->output()->update_port_total_latencies ();
- update_jack = true;
- }