summaryrefslogtreecommitdiff
path: root/gtk2_ardour/engine_dialog.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-01-07 16:25:57 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-01-07 16:25:57 +0000
commit603d07a80bb293cb7819e50397111674a96b142c (patch)
tree187719cf2027a205c6d7d7977839b18341c03471 /gtk2_ardour/engine_dialog.cc
parent5bff882ce1f324dc54e7ec71a33923439f50f865 (diff)
forward port EPA changes from 2.X
git-svn-id: svn://localhost/ardour2/branches/3.0@8473 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/engine_dialog.cc')
-rw-r--r--gtk2_ardour/engine_dialog.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc
index a3c3edd1cc..d54f6100a9 100644
--- a/gtk2_ardour/engine_dialog.cc
+++ b/gtk2_ardour/engine_dialog.cc
@@ -22,8 +22,12 @@
#include <fstream>
#include <map>
+#include <boost/scoped_ptr.hpp>
+
#include <glibmm.h>
#include <gtkmm/messagedialog.h>
+
+#include "pbd/epa.h"
#include "pbd/xml++.h"
#ifdef __APPLE__
@@ -619,6 +623,17 @@ EngineControl::build_command_line (vector<string>& cmd)
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
+ */
+
+ if (global_epa) {
+ current_epa.reset (new EnvironmentalProtectionAgency(true)); /* will restore settings when we leave scope */
+ global_epa->restore ();
+ }
+
jack_status_t status;
jack_client_t* c = jack_client_open ("ardourprobe", JackNoStartServer, &status);