Merge Ψ-W2-T2: a bit-identical capture collapses to one lossless mono channel
# Conflicts: # src/shell/capture/CLAUDE.md # src/shell/capture/capture.cpp # src/shell/capture/capture.h
This commit is contained in:
@@ -603,8 +603,26 @@ static void testSeamFieldsAdditiveInvariant() {
|
||||
CHECK(idx.query("id-z")->rootNote == 60); // move did not disturb seam fields
|
||||
}
|
||||
|
||||
// A collapsed capture is a 1-channel entry, and the JSON is the only thing carrying
|
||||
// that count across a project reload — the instrument's mono/stereo default reads it.
|
||||
static void testMonoChannelCountRoundTrip() {
|
||||
BankModel idx;
|
||||
Sample s = fullSample("mono");
|
||||
s.channelCount = 1;
|
||||
CHECK(idx.add(s) == AddResult::Added);
|
||||
|
||||
const std::string json = idx.serialize();
|
||||
CHECK(json.find("\"channelCount\":1") != std::string::npos);
|
||||
|
||||
auto back = BankModel::deserialize(json);
|
||||
CHECK(back.has_value());
|
||||
CHECK(back && back->query("id-mono") &&
|
||||
back->query("id-mono")->channelCount == 1);
|
||||
}
|
||||
|
||||
int main() {
|
||||
testFullFieldRoundTrip();
|
||||
testMonoChannelCountRoundTrip();
|
||||
testSerializeGoldenLiteral();
|
||||
testDedupByHash();
|
||||
testTierFilterAndMove();
|
||||
|
||||
Reference in New Issue
Block a user