Make an FX reclaim step one whole track's chain: drop the resume cursor, yield only between tracks
This commit is contained in:
@@ -38,7 +38,8 @@ ParkClock g_clock;
|
||||
|
||||
// TrackFX_SetOffline is ASSUMED to pump the message loop, so a plugin load can re-enter
|
||||
// the timer and land back here mid-drain. Fail closed: a re-entered drain would walk the
|
||||
// same items the outer one is mutating and double-write from a stale resume cursor.
|
||||
// same queue the outer one holds a reference into, re-running the very item that outer
|
||||
// step is still writing.
|
||||
bool g_draining = false;
|
||||
struct DrainLatch {
|
||||
DrainLatch() { g_draining = true; }
|
||||
@@ -99,9 +100,12 @@ struct ReclaimHost {
|
||||
if (TrackFX_GetOffline(tr, fxIndex) == offline) return false; // already there
|
||||
|
||||
// DAW-VERIFIED: the same ten TrackFX_SetOffline calls mint ten undo points
|
||||
// unblocked and ZERO inside this pair. One block per write, not per tick: the
|
||||
// write itself is what pumps, so the block cannot avoid spanning a pump — it can
|
||||
// only span as little of one as possible.
|
||||
// unblocked and ZERO inside this pair. One block per WRITE even though a step is
|
||||
// now one whole track: the write itself is what pumps, so the block cannot avoid
|
||||
// spanning a pump — it can only span as little of one as possible. Widening it to
|
||||
// the track would multiply that exposure by the chain length while suppressing no
|
||||
// extra undo point (the discard form mints none either way), and a user action
|
||||
// landing inside a discarded block can lose its own Ctrl-Z.
|
||||
Undo_BeginBlock2(project);
|
||||
TrackFX_SetOffline(tr, fxIndex, offline);
|
||||
Undo_EndBlock2(project, "", 0);
|
||||
|
||||
Reference in New Issue
Block a user