Q-W1 pt2: core/shell/app relocation + sub-namespaces; one concrete ui::Rect (LTRB fork retired); slot_map split from bank_book; BankIndex→BankModel; 59/59 green
This commit is contained in:
+11
-10
@@ -1,4 +1,5 @@
|
||||
// persist.cpp — REAPER-facing implementation of the BankIndex <-> project
|
||||
#include "core/namespaces.h"
|
||||
// persist.cpp — REAPER-facing implementation of the BankModel <-> project
|
||||
// ext-state bridge (M4). See persist.h for the contract.
|
||||
//
|
||||
// Compiled into the reaper_reasampler MODULE. Includes reaper_plugin_functions.h
|
||||
@@ -93,11 +94,11 @@
|
||||
#include <shellapi.h>
|
||||
#endif
|
||||
|
||||
#include "app_version.h"
|
||||
#include "capture_paths.h"
|
||||
#include "prune_reconcile.h"
|
||||
#include "usage_scan.h" // liveInstanceHeldPaths (pS-usage: instance holds join `referenced`)
|
||||
#include "vst/bank_sync.h" // parseBankGeneration / formatBankGeneration (SHARED with the instrument reader)
|
||||
#include "core/version/app_version.h"
|
||||
#include "core/capture/capture_paths.h"
|
||||
#include "core/reclaim/prune_reconcile.h"
|
||||
#include "shell/persist/usage_scan.h" // liveInstanceHeldPaths (pS-usage: instance holds join `referenced`)
|
||||
#include "core/instrument/map/bank_sync.h" // parseBankGeneration / formatBankGeneration (SHARED with the instrument reader)
|
||||
|
||||
#define REAPERAPI_MINIMAL
|
||||
#define REAPERAPI_WANT_EnumProjects
|
||||
@@ -258,11 +259,11 @@ bool ReaSamplerSession::saveToActiveProject() {
|
||||
// seam so the counter and MarkProjectDirty stay paired. The value is whatever
|
||||
// bumpBankGeneration() advanced it to since the last save (0 if never bumped / pre-S9), so
|
||||
// every content mutation's own save carries the fresh generation the instrument reads. The
|
||||
// format is the SHARED pure encoder (vst::formatBankGeneration) so writer and reader agree
|
||||
// format is the SHARED pure encoder (instrument::map::formatBankGeneration) so writer and reader agree
|
||||
// byte-for-byte — a decimal integer. Additive: does not disturb the blobs above.
|
||||
SetProjExtState(static_cast<ReaProject*>(proj), projExtNamespace(),
|
||||
kProjExtBankGenKey,
|
||||
vst::formatBankGeneration(bankGeneration_).c_str());
|
||||
instrument::map::formatBankGeneration(bankGeneration_).c_str());
|
||||
|
||||
MarkProjectDirty(static_cast<ReaProject*>(proj));
|
||||
return true;
|
||||
@@ -636,7 +637,7 @@ void ReaSamplerSession::loadFromProject(void* proj, const std::string& projectDi
|
||||
// rather than resetting to 0 on reopen — a next bump then reads > the stored value. A
|
||||
// project switch reads THAT project's counter, not the previous one's; an absent/malformed
|
||||
// stamp (pre-S9 or corrupt) parses to 0 via the SHARED decoder. proj == nullptr -> 0.
|
||||
bankGeneration_ = vst::parseBankGeneration(
|
||||
bankGeneration_ = instrument::map::parseBankGeneration(
|
||||
proj ? getProjExtStateString(static_cast<ReaProject*>(proj), projExtNamespace(),
|
||||
kProjExtBankGenKey)
|
||||
: std::string{});
|
||||
@@ -683,7 +684,7 @@ void ReaSamplerSession::loadFromProject(void* proj, const std::string& projectDi
|
||||
// Idempotent, so a fresh empty book is a cheap no-op.
|
||||
book_.reconcileSlots();
|
||||
|
||||
// Project-relative resolution is a READ-time concern: every BankIndex in the book
|
||||
// Project-relative resolution is a READ-time concern: every BankModel in the book
|
||||
// stores only relative paths (invariant, enforced per-bank at add()), and consumers
|
||||
// (M5 panel, M6 insert) resolve each entry against the CURRENT project dir via
|
||||
// resolveBankFile(projectDir, relativePath). We do NOT rewrite stored paths to
|
||||
|
||||
Reference in New Issue
Block a user