Trim bake_landing comments: one-home the collapse rationale, fix a ragged header wrap

Also notes why staged.collapsed goes unread at its read site, so a future
reader won't file it as a bug.
This commit is contained in:
2026-08-02 18:51:38 -04:00
parent 425b9f708c
commit 90b9d4527c
2 changed files with 6 additions and 7 deletions
+3 -4
View File
@@ -85,10 +85,9 @@ PreparedLanding prepareLanding(ReaSamplerSession& session, const std::string& pr
"the staged render was unreadable", request.generation); "the staged render was unreadable", request.generation);
return prep; return prep;
} }
// The lossless mono collapse, taken BEFORE the hash and before every measurement below, // Before the hash, so nothing measures a buffer it won't write.
// so the entry's channel count, its content hash, and the bytes commitLanding writes are // `staged.collapsed` goes unread: a rebuild that fails to reparse reverts to the
// all read off one buffer. A dead-center render is exactly the dual-mono shape the shared // staged bytes inside applyMonoCollapse itself, so there is nothing left here to react to.
// predicate folds; anything else comes back byte-for-byte as it was staged.
CollapsedWav staged = applyMonoCollapse(std::move(prep.bytes)); CollapsedWav staged = applyMonoCollapse(std::move(prep.bytes));
prep.bytes = std::move(staged.bytes); prep.bytes = std::move(staged.bytes);
const WavLayout layout = staged.layout; const WavLayout layout = staged.layout;
+3 -3
View File
@@ -1,9 +1,9 @@
#pragma once #pragma once
// bake_landing — landing ONE bake request into the loaded project's bank: read the staged // bake_landing — landing ONE bake request into the loaded project's bank: read the staged
// WAV, collapse it losslessly to mono when it is dual-mono, hash it, resolve replace-vs-add, // WAV, collapse it losslessly to mono when it is dual-mono, hash it, resolve replace-vs-add,
// write the file, index it, seed its lineage. The scan // write the file, index it, seed its lineage. The scan pass that finds requests across the
// pass that finds requests across the open tabs and answers them is `bake_land`; this is // open tabs and answers them is `bake_land`; this is what it calls per request, and it
// what it calls per request, and it neither reads nor writes an ext-state key. // neither reads nor writes an ext-state key.
#include <cstdint> #include <cstdint>
#include <string> #include <string>