Fix five Wave-1 pure-layer FX/park review findings: resume-point stall, stale doc comments, implicit mode read, keying reset
This commit is contained in:
@@ -32,14 +32,28 @@ struct FxTrackWork {
|
||||
// read it, so resolveFxWork synthesises the targets from what it is handed.
|
||||
std::vector<FxOfflineOp> targets;
|
||||
|
||||
// Identity of the last FX this item's drain completed; empty ⇒ none yet. An
|
||||
// optimisation only: every write is compare-before-write, so an identity that
|
||||
// has since left the chain safely restarts the item rather than stranding it.
|
||||
// Identity of the last FX this item's drain completed; empty means EITHER
|
||||
// nothing has completed yet OR the completed FX itself carried no identity
|
||||
// (REAPER reports no GUID for it, or it came from a Slot-keyed record) — see
|
||||
// resumeAfterSlot below, which disambiguates the two. This is load-bearing
|
||||
// for forward progress, not an optimisation: without the disambiguation, an
|
||||
// unidentified FX would look like "none yet" and the drain would restart at
|
||||
// the top of the list every tick, forever. Compare-before-write makes every
|
||||
// write idempotent, so an identity that has since left the chain safely
|
||||
// restarts the item rather than stranding it.
|
||||
std::string resumeAfterFxGuid;
|
||||
|
||||
// Position of the last completed op, consulted only when resumeAfterFxGuid
|
||||
// is empty, to tell "resumed past an unidentified FX at this slot" apart
|
||||
// from "nothing done yet" (-1). Every FxOfflineOp carries its slot
|
||||
// regardless of keying, so this is available for both Online and Offline
|
||||
// work.
|
||||
int resumeAfterSlot = -1;
|
||||
|
||||
bool operator==(const FxTrackWork& o) const {
|
||||
return trackGuid == o.trackGuid && kind == o.kind && targets == o.targets &&
|
||||
resumeAfterFxGuid == o.resumeAfterFxGuid;
|
||||
resumeAfterFxGuid == o.resumeAfterFxGuid &&
|
||||
resumeAfterSlot == o.resumeAfterSlot;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -51,7 +65,13 @@ struct FxTrackWork {
|
||||
// opportunistic reclaim that may be deferred indefinitely without losing
|
||||
// anything. Within a kind, GUID order — deterministic, so a drain's position in
|
||||
// the list survives a re-derivation.
|
||||
//
|
||||
// `targetMode` is explicit, mirroring planToggle, rather than read from
|
||||
// `model.activeModeId()`: applyMode sets the active mode LAST, after its park
|
||||
// and restore loops, so a caller reading it from inside or before that block
|
||||
// would classify every track against the OUTGOING mode instead.
|
||||
std::vector<FxTrackWork> desiredFxState(const ViewModeModel& model,
|
||||
const std::string& targetMode,
|
||||
const std::set<std::string>& liveTrackGuids);
|
||||
|
||||
// One track's Online targets from its park record's FX half; empty when the
|
||||
|
||||
Reference in New Issue
Block a user