diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-10-04 14:17:52 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-10-04 14:18:04 -0400 |
commit | 297e80e020da94a56984b20782584bb1dd96ea34 (patch) | |
tree | 202396656012b4960206be95c4541b8e8d08e1dc /libs/ardour/session_state.cc | |
parent | e63de172d5bb08ed4c40311fb5b4d65c60325150 (diff) |
attempt to stop transport, finish butler work, and close all files as part of Session > Cleanup
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r-- | libs/ardour/session_state.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index a0651ecbda..6cc2fb49c8 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -2935,6 +2935,17 @@ Session::cleanup_sources (CleanupReport& rep) _state_of_the_state = (StateOfTheState) (_state_of_the_state | InCleanup); + /* this is mostly for windows which doesn't allow file + * renaming if the file is in use. But we don't special + * case it because we need to know if this causes + * problems, and the easiest way to notice that is to + * keep it in place for all platforms. + */ + + request_stop (false); + _butler->summon (); + _butler->wait_until_finished (); + /* consider deleting all unused playlists */ if (playlists->maybe_delete_unused (boost::bind (Session::ask_about_playlist_deletion, _1))) { @@ -3008,6 +3019,15 @@ Session::cleanup_sources (CleanupReport& rep) if ((fs = boost::dynamic_pointer_cast<FileSource> (i->second)) != 0) { + /* this is mostly for windows which doesn't allow file + * renaming if the file is in use. But we don't special + * case it because we need to know if this causes + * problems, and the easiest way to notice that is to + * keep it in place for all platforms. + */ + + fs->close (); + if (!fs->is_stub()) { if (playlists->source_use_count (fs) != 0) { |