Γ-W1-T2 review: one restart funnel, tighter ceiling proof, effective-gain meter

Fold setLimiterEnabled's restart request into setInstrumentParams so every writer
keeps the host's latency report in sync. Pin the window-sizing identity, drop the
per-sample modulo, tighten the ceiling tolerance, publish the blended gain.
This commit is contained in:
2026-08-01 19:34:08 -04:00
parent 3baf4ee50b
commit 0612abbddb
5 changed files with 77 additions and 26 deletions
+4 -3
View File
@@ -232,9 +232,10 @@ public:
void setMasterGainLinear(double linear); // clamped to [0, masterGainMaxLinear()]
// The master-bus limiter's single enable (persisted in the parameter set). UI thread only:
// the setter requests the host's kLatencyChanged restart, which the SDK requires be issued
// from the UI thread and which process() must therefore never trigger. Setting the value it
// already holds is a no-op, so repeated clicks on one segment cost no restart.
// a thin wrapper over setInstrumentParams, the one funnel that both mirrors the flag and
// requests the host's kLatencyChanged restart, which the SDK requires be issued from the UI
// thread and which process() must therefore never trigger. Setting the value it already
// holds is a no-op, so repeated clicks on one segment cost no restart.
bool limiterEnabled() const {
return limiterEnabled_.load(std::memory_order_relaxed);
}