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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user