diff options
author | Robin Gareus <robin@gareus.org> | 2014-06-28 21:27:36 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-06-28 22:02:20 +0200 |
commit | ecd11253c1b4a06e9fd77a9ccc126850abf7a72f (patch) | |
tree | 1b752c4a82ef1e4627360e8116da3f787ee76676 /libs/ardour/session_state.cc | |
parent | c0c68dbf4dbe59f68bae94fa393f3f8e4e1a3196 (diff) |
add Session::StateProtector
temp. disable save during batch updates, save once at
the end.
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r-- | libs/ardour/session_state.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index c9267b058f..6979f88dcb 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -669,6 +669,12 @@ Session::save_state (string snapshot_name, bool pending, bool switch_to_snapshot return 1; } + if (g_atomic_int_get(&_suspend_save)) { + _save_queued = true; + return 1; + } + _save_queued = false; + if (!_engine.connected ()) { error << string_compose (_("the %1 audio engine is not connected and state saving would lose all I/O connections. Session not saved"), PROGRAM_NAME) |