self-contained playback — ComponentState v10 SampleRefs (path+intrinsics owned by the instance), reloadInstrument decodes bank-free, heal timer + poll-to-play removed; bank is a browser source
This commit is contained in:
+2
-2
@@ -432,7 +432,7 @@ ImportResult importFileIntoActiveBank(const std::string& absoluteSourcePath) {
|
||||
//
|
||||
// LOAD-BEARING (CLAUDE.md): this adds ONE FX instance to the user's existing selected track.
|
||||
// It NEVER inserts a timeline item and NEVER creates a track. Persist ordering is critical —
|
||||
// the fresh instance's setState -> reloadFromBank reads the bank from project ext-state, so
|
||||
// the fresh instance's setState -> reloadInstrument reads the bank from project ext-state, so
|
||||
// the sample MUST be persisted (generation bumped when something new landed) BEFORE
|
||||
// loadInstrumentOntoTrack adds the FX, or the instance cannot resolve the sampleId.
|
||||
// Undo-wrapped: persist + FX-add + inject = one Ctrl-Z.
|
||||
@@ -500,7 +500,7 @@ void doImportFromMediaExplorer() {
|
||||
const std::vector<std::uint8_t> preset = buildInstrumentDropPreset(r.sampleId);
|
||||
|
||||
// One undo point for the whole gesture. Persist happens INSIDE the block and BEFORE the
|
||||
// FX add so the new instance's setState -> reloadFromBank sees the just-persisted sample.
|
||||
// FX add so the new instance's setState -> reloadInstrument sees the just-persisted sample.
|
||||
// The generation is bumped only when something NEW landed (a dedup collapse mutated nothing,
|
||||
// so it needs neither a bump nor a persist to resolve — the sample is already in ext-state).
|
||||
// If saveToActiveProject() no-ops (unsaved project), close with an empty label + zero flag so
|
||||
|
||||
Reference in New Issue
Block a user