summaryrefslogtreecommitdiff
path: root/libs/ardour/audioengine.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 /libs/ardour/audioengine.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 'libs/ardour/audioengine.cc')
-rw-r--r--libs/ardour/audioengine.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc
index b2241f5c2f..ef94d0d740 100644
--- a/libs/ardour/audioengine.cc
+++ b/libs/ardour/audioengine.cc
@@ -1278,19 +1278,17 @@ AudioEngine::remove_all_ports ()
int
AudioEngine::connect_to_jack (string client_name, string session_uuid)
{
+ EnvironmentalProtectionAgency* global_epa = EnvironmentalProtectionAgency::get_global_epa ();
+ boost::scoped_ptr<EnvironmentalProtectionAgency> current_epa;
jack_options_t options = JackNullOption;
jack_status_t status;
const char *server_name = NULL;
- EnvironmentalProtectionAgency* global_epa = EnvironmentalProtectionAgency::get_global_epa ();
- EnvironmentalProtectionAgency current_epa (false);
-
/* revert all environment settings back to whatever they were when ardour started
*/
if (global_epa) {
- current_epa.arm ();
- current_epa.save ();
+ current_epa.reset (new EnvironmentalProtectionAgency(true)); /* will restore settings when we leave scope */
global_epa->restore ();
}