}
return true;
}
+
+void
+AudioEngine::update_latencies ()
+{
+ if (jack_recompute_total_latencies) {
+ GET_PRIVATE_JACK_POINTER (_jack);
+ jack_recompute_total_latencies (_priv_jack);
+ }
+}
void
Session::update_latency (bool playback)
{
+ // cerr << "::update latency (playback = " << playback << ")\n";
+
if (_state_of_the_state & (InitialConnecting|Deletion)) {
return;
}
_worst_output_latency = max (_worst_output_latency, (*i)->output_latency());
}
- cerr << "Session: worst output latency = " << _worst_output_latency << endl;
+ // cerr << "Session: worst output latency = " << _worst_output_latency << endl;
}
void
_worst_input_latency = max (_worst_input_latency, (*i)->input_latency());
}
- cerr << "Session: worst input latency = " << _worst_input_latency << endl;
+ // cerr << "Session: worst input latency = " << _worst_input_latency << endl;
}
void
_worst_track_latency = max (tl, _worst_track_latency);
}
}
+
+ if (some_track_latency_changed || force_whole_graph) {
+ _engine.update_latencies ();
+ }
+
+ set_worst_io_latencies ();
+
+ /* reflect any changes in latencies into capture offsets
+ */
+
+ boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader();
+
+ for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
+ (*i)->set_capture_offset ();
+ }
}