Q-W1 code-review follow-ups: restore 104 trailing newlines, relocate reasampler_uid.h to core/wire, drop ext_keys namespaces shim, add slot_map_tests, golden serialize literals for 4 modules, namespaces.h/pragma-once ordering sweep. 60/60 green.
This commit is contained in:
@@ -40,4 +40,4 @@ std::optional<AssignmentRequest> decodeAssignmentRequest(const std::string& wire
|
||||
return req;
|
||||
}
|
||||
|
||||
} // namespace reasampler::wire
|
||||
} // namespace reasampler::wire
|
||||
|
||||
@@ -86,4 +86,4 @@ std::string encodeAssignmentRequest(const AssignmentRequest& req);
|
||||
// silently, never crashing or selecting a nonexistent entry.
|
||||
std::optional<AssignmentRequest> decodeAssignmentRequest(const std::string& wire);
|
||||
|
||||
} // namespace reasampler::wire
|
||||
} // namespace reasampler::wire
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// instrument_drop — pure implementation. See instrument_drop.h.
|
||||
// NO REAPER / SWELL / VST3 SDK / vendor. Reuses sample_map's ComponentState serializer and
|
||||
// the SDK-free UID macros (vst/reasampler_uid.h).
|
||||
// the SDK-free UID macros (core/wire/reasampler_uid.h).
|
||||
|
||||
#include "core/wire/instrument_drop.h"
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include "shell/instrument/reasampler_uid.h" // REASAMPLER_ACTIVE_UID_* — the FROZEN, channel-selected class UID
|
||||
#include "core/wire/reasampler_uid.h" // REASAMPLER_ACTIVE_UID_* — the FROZEN, channel-selected class UID
|
||||
#include "core/instrument/map/sample_map.h" // ComponentState + serializeComponentState (the SHARED writer)
|
||||
|
||||
namespace reasampler::wire {
|
||||
@@ -106,4 +106,4 @@ bool infoNamesFxHotspot(const std::string& info) {
|
||||
return startsWith("fx_") || startsWith("tcp.fx") || startsWith("mcp.fx");
|
||||
}
|
||||
|
||||
} // namespace reasampler::wire
|
||||
} // namespace reasampler::wire
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//
|
||||
// PURE MODULE (CLAUDE.md §load-bearing split): NO REAPER types, NO SWELL, NO VST3 SDK,
|
||||
// NO vendor/ includes. Standard library only (+ the pure sample_map it reuses and the
|
||||
// SDK-free UID macros in vst/reasampler_uid.h). Unit-tested outside the DAW — the same
|
||||
// SDK-free UID macros in core/wire/reasampler_uid.h). Unit-tested outside the DAW — the same
|
||||
// "small pure builder + round-trip proof" pattern as assignment_request / provenance.
|
||||
//
|
||||
// -- What it is (the S17 seam, extension side) --------------------------------
|
||||
@@ -43,7 +43,7 @@ namespace reasampler::wire {
|
||||
// header carries (public.sdk vstpresetfile: "ASCII-encoded FUID"). On both COM-compatible
|
||||
// (Windows GUID byte order) and plain layouts, FUID::toString reduces to the four
|
||||
// INLINE_UID uint32 words printed "%08X" in order, so this derivation is platform-stable.
|
||||
// Sourced from the FROZEN macros in vst/reasampler_uid.h (the same constants the factory
|
||||
// Sourced from the FROZEN macros in core/wire/reasampler_uid.h (the same constants the factory
|
||||
// registers), channel-selected by the one REASAMPLER_CHANNEL_IS_BETA bit — a beta extension
|
||||
// writes presets only the beta VST class accepts, preserving the S18 pairing invariant.
|
||||
std::string vstClassIdHex();
|
||||
@@ -111,4 +111,4 @@ bool infoNamesFxHotspot(const std::string& info);
|
||||
// its setState expects. Not called by the shell (which uses the .vstpreset image).
|
||||
std::vector<std::uint8_t> instrumentDropStateBytes(const std::string& sampleId);
|
||||
|
||||
} // namespace reasampler::wire
|
||||
} // namespace reasampler::wire
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
// reasampler_uid.h — the FOREVER-FROZEN VST3 class-UID constants, SDK-FREE.
|
||||
//
|
||||
// Split out of reasampler_vst.h (S-GA-DropFX) so the PURE extension side can derive the
|
||||
// class-ID string a .vstpreset file carries (instrument_drop::vstClassIdHex) WITHOUT
|
||||
// including the VST3 SDK: reasampler_vst.h needs Steinberg::FUID (SDK), but the UID VALUES
|
||||
// are plain integer macros. This header owns the values + the channel selection; nothing
|
||||
// else. reasampler_vst.h includes it to build the runtime FUID; instrument_drop includes it
|
||||
// to render the 32-char hex string. ONE source of truth — the frozen constants are written
|
||||
// exactly once, here.
|
||||
//
|
||||
// A class UID is FOREVER-STABLE once shipped: a REAPER project that instantiates the
|
||||
// instrument records the UID, so changing it orphans every saved instance. Minted once;
|
||||
// do not regenerate. See reasampler_vst.h for the full channel-isolation story (S18).
|
||||
|
||||
#include "version_generated.h" // REASAMPLER_CHANNEL_IS_BETA — the one channel bit
|
||||
|
||||
// STABLE class UID (S-NAME-1). Minted at the S1 spike (2026-07-26), locked. FROZEN FOREVER.
|
||||
#define REASAMPLER_PROC_UID_1 0x5E45A11E
|
||||
#define REASAMPLER_PROC_UID_2 0x9C7B4D6A
|
||||
#define REASAMPLER_PROC_UID_3 0xB1E3F208
|
||||
#define REASAMPLER_PROC_UID_4 0x4A6C1D9F
|
||||
|
||||
// BETA class UID (S18). Minted once (2026-07-26), locked FROM THIS WAVE per Daniel's
|
||||
// fast-track (fork S18-F1: mint now, not at first beta release). FROZEN FOREVER — the same
|
||||
// permanent lock as the stable UID; do not regenerate even though no beta VST has shipped.
|
||||
#define REASAMPLER_PROC_UID_BETA_1 0xCCFFEB3A
|
||||
#define REASAMPLER_PROC_UID_BETA_2 0x4FF532A6
|
||||
#define REASAMPLER_PROC_UID_BETA_3 0x9E181798
|
||||
#define REASAMPLER_PROC_UID_BETA_4 0x4256955F
|
||||
|
||||
// The channel-selected UID macros — exactly one class UID per binary. The factory's
|
||||
// INLINE_UID (compile-time brace init) and the runtime FUID in reasampler_vst.h both source
|
||||
// these, as does the extension's vstClassIdHex (the .vstpreset class-ID string), so the
|
||||
// binary identity and the preset-file identity cannot diverge.
|
||||
#if REASAMPLER_CHANNEL_IS_BETA
|
||||
#define REASAMPLER_ACTIVE_UID_1 REASAMPLER_PROC_UID_BETA_1
|
||||
#define REASAMPLER_ACTIVE_UID_2 REASAMPLER_PROC_UID_BETA_2
|
||||
#define REASAMPLER_ACTIVE_UID_3 REASAMPLER_PROC_UID_BETA_3
|
||||
#define REASAMPLER_ACTIVE_UID_4 REASAMPLER_PROC_UID_BETA_4
|
||||
#else
|
||||
#define REASAMPLER_ACTIVE_UID_1 REASAMPLER_PROC_UID_1
|
||||
#define REASAMPLER_ACTIVE_UID_2 REASAMPLER_PROC_UID_2
|
||||
#define REASAMPLER_ACTIVE_UID_3 REASAMPLER_PROC_UID_3
|
||||
#define REASAMPLER_ACTIVE_UID_4 REASAMPLER_PROC_UID_4
|
||||
#endif
|
||||
@@ -230,4 +230,4 @@ bool identityMatches(const std::string& identity, const std::string& uidHexUpper
|
||||
return !nameUpper.empty() && up.find(nameUpper) != std::string::npos;
|
||||
}
|
||||
|
||||
} // namespace reasampler::wire
|
||||
} // namespace reasampler::wire
|
||||
|
||||
@@ -250,4 +250,4 @@ bool identityMatches(const std::string& identity, const std::string& uidHexUpper
|
||||
// ASCII-only uppercase (shared by the matcher and the shell's needle preparation).
|
||||
std::string toUpperAscii(const std::string& s);
|
||||
|
||||
} // namespace reasampler::wire
|
||||
} // namespace reasampler::wire
|
||||
|
||||
Reference in New Issue
Block a user