Commit the limiter's audible state on the click and defer only the host's latency restart

setInstrumentParams now arms a sticky pending restart that flushLatencyRestart drains from the sync tick; setState and the bake's adopt flush at their own tails.
This commit is contained in:
2026-08-02 11:45:47 -04:00
parent 41876674e4
commit b956fe0d5a
7 changed files with 76 additions and 44 deletions
@@ -246,6 +246,10 @@ void ReaSamplerProcessor::adoptBakedCapture(const SampleRefEntry& entry,
// ONE reload for the re-point and the reset together: it decodes the new file and
// publishes the neutral parameters in the same swap.
reloadInstrument();
// The bake's reset may have flipped the limiter; deliver the host's latency restart here
// rather than leaving it to the editor's tick, so an adopt is correct with no editor open.
// At the tail for the same reason setState's is (see there).
flushLatencyRestart();
}
void ReaSamplerProcessor::publishUsage(const SampleRefs& refs,