diff options
Diffstat (limited to 'gtk2_ardour/engine_dialog.cc')
-rw-r--r-- | gtk2_ardour/engine_dialog.cc | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc index 615e79e184..f0121f5f42 100644 --- a/gtk2_ardour/engine_dialog.cc +++ b/gtk2_ardour/engine_dialog.cc @@ -44,6 +44,8 @@ #include <gtkmm/stock.h> #include <gtkmm2ext/utils.h> +#include "ardour/rc_configuration.h" + #include "pbd/convert.h" #include "pbd/error.h" #include "pbd/pathscanner.h" @@ -364,6 +366,14 @@ EngineControl::EngineControl () set_border_width (12); pack_start (notebook); + + /* Pick up any existing audio setup configuration, if appropriate */ + + XMLNode* audio_setup = ARDOUR::Config->extra_xml ("AudioSetup"); + + if (audio_setup) { + set_state (*audio_setup); + } } EngineControl::~EngineControl () @@ -580,12 +590,20 @@ EngineControl::build_command_line (vector<string>& cmd) } bool +EngineControl::need_setup () +{ + return !engine_running(); +} + +bool EngineControl::engine_running () { EnvironmentalProtectionAgency* global_epa = EnvironmentalProtectionAgency::get_global_epa (); boost::scoped_ptr<EnvironmentalProtectionAgency> current_epa; - /* revert all environment settings back to whatever they were when ardour started + /* revert all environment settings back to whatever they were when + * ardour started, because ardour's startup script may have reset + * something in ways that interfere with finding/starting JACK. */ if (global_epa) { |