diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-09-21 12:50:45 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-09-21 12:50:45 -0400 |
commit | f7586f3a0d3492a15cae901bb209f6a983e7db0a (patch) | |
tree | 5efe7873236f9c5be6c13bc65c8d8e2f5f96cdcc | |
parent | 461f94a3a177b87044b0dac7e38e21a06903813c (diff) |
likely fix for creating new sessions from templates
-rw-r--r-- | libs/ardour/session.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 4be52a7584..d45375fe0d 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -276,6 +276,21 @@ Session::Session (AudioEngine &eng, throw failed_constructor (); } + /* if a mix template was provided, then ::create() will + * have copied it into the session and we need to load it + * so that we have the state ready for ::set_state() + * after the engine is started. + * + * Note that we do NOT try to get the sample rate from + * the template at this time, though doing so would + * be easy if we decided this was an appropriate part + * of a template. + */ + + if (!mix_template.empty() && load_state (_current_snapshot_name)) { + throw failed_constructor (); + } + } else { if (load_state (_current_snapshot_name)) { |