fix(processor): close S-VIEW-4 previewVelocity persistence loop

Add previewVelocity_ member to ReaSamplerProcessor; populate it in
getState and restore it in setState so the field round-trips in the
plugin, not just in the pure unit test. Clamp 1..127 at the
deserialize read boundary in sample_map.cpp.
This commit is contained in:
2026-07-27 13:34:39 -04:00
parent b0b24c3e31
commit 5db620be78
3 changed files with 15 additions and 1 deletions
+6
View File
@@ -250,6 +250,12 @@ private:
// NOT read on the audio thread.
std::int64_t lastSeenBankGeneration_ = -1;
// S-VIEW-4 preview-trigger velocity (MIDI 1..127). Persisted in component state (v6) so the
// user's chosen strike velocity survives a project save/reload. No concurrent writer before
// Wave 2 (no editor knob yet) — setState and getState are the sole accessors, both on the
// load/save thread (host-serialized). Default kPreviewVelocityDefault (64).
std::uint8_t previewVelocity_ = kPreviewVelocityDefault;
// Latched from setupProcessing so setActive/reload can size against it. Read
// off-thread only. 0.0 is explicitly invalid — setupProcessing sets the real host rate
// before any audio, and reloadFromBank guards on it before use.