Close pass four: undetented host curve read, LiveValues guard, ordering assert, static-lane fix, docs

Points toPlain's exponent arm at the undetented curve map so host reads
match the editor; adds a sizeof guard plus field-poison test for
LiveValues::operator==; skips the model write when an automation value
hasn't moved; corrects five stale doc citations.
This commit is contained in:
2026-08-02 18:22:21 -04:00
parent 1fd38bbd57
commit 9b5393098b
14 changed files with 163 additions and 59 deletions
+4 -4
View File
@@ -190,7 +190,7 @@ public:
// never read on the audio thread — reloadInstrument bakes it into the SampleData
// off-thread.
InstrumentParams instrumentParams();
void setInstrumentParams(const InstrumentParams& params);
std::uint32_t setInstrumentParams(const InstrumentParams& params); // adopt THIS generation, never a second instrumentParamsGeneration() call
// The model's edit counter, bumped by every setInstrumentParams. A holder of a COPY (the
// editor's snapshot) re-seeds when this moves under it; the overload answers both under one
@@ -392,9 +392,9 @@ private:
// and republishes ONLY when the RESULT moved — so neither an unchanged model nor a lane
// resending the value it already sent reaches the per-voice fan-out. A block carrying no
// automation and no model change costs one relaxed load plus, when the host passed a non-null
// IParameterChanges (REAPER's normal case), one cross-module getParameterCount(). Two blocks
// because the seqlock's single-writer contract is load-bearing and the two writers differ in
// thread; this directory's CLAUDE.md owns the argument.
// IParameterChanges (`[verify — DAW]` REAPER's normal case), one cross-module
// getParameterCount(). Two blocks because the seqlock's single-writer contract is load-bearing
// and the two writers differ in thread; this directory's CLAUDE.md owns the argument.
instrument::engine::LiveParams automationLive_;
// Audio thread only. The last liveParams_ generation merged, the last block published (the
// republish gate compares against it), and the automation slots themselves.