Allow to call set_state() on existing routes
authorRobin Gareus <robin@gareus.org>
Tue, 5 Mar 2019 23:57:49 +0000 (00:57 +0100)
committerRobin Gareus <robin@gareus.org>
Tue, 5 Mar 2019 23:57:49 +0000 (00:57 +0100)
Delaylines are not saved in the XML and internal-return is an
invisible processor not explicitly re-added when the state is restored.

They are [re]inserted during Route::setup_invisible_processors().
So this method need to be called after restoring processor state
(indirectly via configure_processors_unlocked as needed).

PS. During route creation this call happens explicitly and on session load
hookup_io() -> Route::output_change_handler() implicitly sets this up.

libs/ardour/route.cc

index 89ab442e18ab20bbba99cdc3fee808d107c53fca..50e06720524f294d83ba67049ad17b819df262fb 100644 (file)
@@ -2969,6 +2969,13 @@ Route::set_processor_state (const XMLNode& node)
                 */
                _processors = new_order;
 
+               if (_delayline) {
+                       must_configure |= find (_processors.begin(), _processors.end(), _delayline) == _processors.end ();
+               }
+               if (_intreturn) {
+                       must_configure |= find (_processors.begin(), _processors.end(), _intreturn) == _processors.end ();
+               }
+
                if (must_configure) {
                        configure_processors_unlocked (0, &lm);
                }