reinstate missing latency initialization code
Removed (mistakenly) during work on transportFSM
This commit is contained in:
parent
cafd1b792c
commit
cd78a168b2
@ -1318,6 +1318,7 @@ private:
|
||||
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 ();
|
||||
|
@ -382,6 +382,7 @@ Port::set_private_latency_range (LatencyRange& range, bool playback)
|
||||
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 (
|
||||
|
@ -492,6 +492,10 @@ Session::immediately_post_engine ()
|
||||
_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 ();
|
||||
@ -6328,6 +6332,18 @@ Session::unknown_processors () const
|
||||
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 *)
|
||||
{
|
||||
|
@ -365,6 +365,10 @@ Session::post_engine_init ()
|
||||
|
||||
_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));
|
||||
|
Loading…
Reference in New Issue
Block a user