fix(comments): correct stale v3 "CURRENT" payload prose to v5 in sample_map
This commit is contained in:
@@ -353,11 +353,13 @@ struct ByteReader {
|
||||
}
|
||||
};
|
||||
|
||||
// Append the zones payload — the shared body of the v2 performance blob and the v3 component
|
||||
// blob, so both write zones identically. Always emits PAYLOAD v2 (the S11 self-describing
|
||||
// marker + version + EXTENDED records): the marker precedes the zone count so any reader can
|
||||
// detect the record shape independently of the envelope version (see sample_map.h). The S11
|
||||
// loop/start overrides therefore round-trip through EITHER envelope with no envelope bump.
|
||||
// Append the zones payload — the shared body of the performance blob and the component blob,
|
||||
// so both write zones identically. Always emits the CURRENT PAYLOAD version (kZonesPayloadVersion
|
||||
// == v5: the S11 self-describing marker + version + EXTENDED records carrying the loop/start tail
|
||||
// AND the full play-params tail with wall-clock times stored as SECONDS): the marker precedes
|
||||
// the zone count so any reader can detect the record shape independently of the envelope version
|
||||
// (see sample_map.h). The S11 loop/start overrides and the play params therefore round-trip
|
||||
// through EITHER envelope with no envelope bump.
|
||||
void putZonesPayload(std::vector<std::uint8_t>& out, const PerformanceMap& map) {
|
||||
putU32le(out, kZonesFormatMarker);
|
||||
putU32le(out, kZonesPayloadVersion);
|
||||
|
||||
@@ -355,13 +355,14 @@ DecodedZonePcm decodeChannels(const std::vector<AudioSample>& interleaved,
|
||||
|
||||
inline constexpr std::uint32_t kPerformanceStateVersion = 2;
|
||||
|
||||
// The zones-payload format version and its detection marker (S11/S15/S16). serializePerformance
|
||||
// and serializeComponentState both emit the CURRENT payload version (v3 — marker + version +
|
||||
// records with the S11 loop/start tail AND the S15/S16 play-params tail) so the overrides
|
||||
// round-trip through EITHER envelope. Readers accept a v1 payload (no marker) and a v2 payload
|
||||
// (marker + version 2, no play tail) for back-compat, lifting the missing fields to defaults.
|
||||
// The marker is a high sentinel that a legitimate zone count (bounded by 128 MIDI zones in
|
||||
// practice, always tiny) can never collide with.
|
||||
// The zones-payload format version and its detection marker (S11/S15/S16/S12). serializePerformance
|
||||
// and serializeComponentState both emit the CURRENT payload version (v5 — marker + version +
|
||||
// records with the S11 loop/start tail AND the full play-params tail with wall-clock times in
|
||||
// SECONDS) so the overrides round-trip through EITHER envelope. Readers accept a v1 payload (no
|
||||
// marker), a v2 payload (marker + version 2, no play tail), and a v3 payload (legacy S15/S16
|
||||
// play tail with wall-clock frame counts) for back-compat, lifting missing fields to defaults.
|
||||
// v4 was never shipped and is not read. The marker is a high sentinel that a legitimate zone
|
||||
// count (bounded by 128 MIDI zones in practice, always tiny) can never collide with.
|
||||
inline constexpr std::uint32_t kZonesPayloadVersion = 5; // S12: full per-zone play params, SECONDS
|
||||
inline constexpr std::uint32_t kZonesFormatMarker = 0xFFFFFF00u;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user