1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

AUP3: Reworked CopyTo() yet again

This time it has the potential to produce much smaller
output files since it ONLY copies the active blocks and
not all of the blocks related to undo history.  This is
done for "Save As" and "Backup Project".  Normal save
can't take advantage of this, but then it really doesn't
need it as it has to depend on vacuuming.

The vacuuming at close has been adjusted to utilize CopyTo()
so it should produce similarly small files as long as the
vacuuming happens when the project is definitely closing.
This commit is contained in:
Leland Lucius
2020-07-13 00:04:54 -05:00
parent a0008831e0
commit 0815344e5d
3 changed files with 171 additions and 31 deletions

View File

@@ -671,6 +671,14 @@ void ProjectManager::OnCloseWindow(wxCloseEvent & event)
}
}
// Cleanup the project file
//
// Might be that we want to UndoManager::ClearStates() before this???
if (!projectFileIO.IsTemporary())
{
projectFileIO.Vacuum();
}
// See ProjectFileIO::Bypass() for a description
projectFileIO.Bypass(true);