fix: close round-3 review findings — smallest-target-first, residue test fix, extraction
Waveform overlay now resolves node/tab/marker click collisions by target area instead of check order; residue test now uses a distinguishing fixture; Gate-unavailable-while-drawn logic extracted to one pure helper shared by resolvePlay and applyControl.
This commit is contained in:
@@ -262,10 +262,10 @@ PlayParams resolvePlay(const PlaySeconds& stored, int sampleRate) {
|
||||
out.ampSpline = stored.ampSpline;
|
||||
out.pitchSpline = stored.pitchSpline;
|
||||
out.filterSpline = stored.filterSpline;
|
||||
// Gate is unavailable while any EG is drawn — see splineActive (play_params.h) for why.
|
||||
// The editor refuses the Gate segment for the same reason; enforcing it HERE as well is
|
||||
// what keeps a hand-edited or downgraded blob from reaching the engine as Gate + spline.
|
||||
if (splineActive(stored)) out.playMode = PlayMode::Trigger;
|
||||
// Every field splineActive reads on `out` is already copied from `stored` above, so this
|
||||
// enforces the same rule enforceGateUnavailableWhileDrawn's doc comment (play_params.h)
|
||||
// describes — the editor's applyControl is the other caller, so the two cannot drift.
|
||||
enforceGateUnavailableWhileDrawn(out);
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user