1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-10 06:36:24 +01:00

Do orphan block checking differently... (#655)

... Don't have special knowledge of "blockid" in ProjectSerializer, which should
be very low-level.

Instead, we can deserialize the project first, and use the block ids collected
by the sample block factory since f137a1e.
This commit is contained in:
Paul Licameli
2020-09-01 11:54:36 -04:00
committed by GitHub
parent 1e3885730f
commit 92d7ee38e5
5 changed files with 39 additions and 30 deletions

View File

@@ -13,6 +13,7 @@ SampleBlock.h
#include <functional>
#include <memory>
#include <unordered_set>
class AudacityProject;
class ProjectFileIO;
@@ -133,6 +134,10 @@ public:
sampleFormat srcformat,
const wxChar **attrs);
using SampleBlockIDs = std::unordered_set<SampleBlockID>;
/*! @return ids of all sample blocks created by this factory and still extant */
virtual SampleBlockIDs GetActiveBlockIDs() = 0;
protected:
// The override should throw more informative exceptions on error than the
// default InconsistencyException thrown by Create