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);
return prep;
}
// The lossless mono collapse, taken BEFORE the hash and before every measurement below,
// so the entry's channel count, its content hash, and the bytes commitLanding writes are
// all read off one buffer. A dead-center render is exactly the dual-mono shape the shared
// predicate folds; anything else comes back byte-for-byte as it was staged.
// Before the hash, so nothing measures a buffer it won't write.
// `staged.collapsed` goes unread: a rebuild that fails to reparse reverts to the
// staged bytes inside applyMonoCollapse itself, so there is nothing left here to react to.
CollapsedWav staged = applyMonoCollapse(std::move(prep.bytes));
prep.bytes = std::move(staged.bytes);
const WavLayout layout = staged.layout;
+3 -3
View File
@@ -1,9 +1,9 @@
#pragma once
// 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,
// write the file, index it, seed its lineage. The scan
// pass that finds requests across the open tabs and answers them is `bake_land`; this is
// what it calls per request, and it neither reads nor writes an ext-state key.
// write the file, index it, seed its lineage. The scan pass that finds requests across the
// open tabs and answers them is `bake_land`; this is what it calls per request, and it
// neither reads nor writes an ext-state key.
#include <cstdint>
#include <string>