Ψ-W2-T2: collapse a capture whose channels are bit-identical to one lossless mono channel, index value measured off the landed file

This commit is contained in:
2026-08-01 21:46:55 -04:00
parent 09d64c9f46
commit 4fa3c1dd15
12 changed files with 312 additions and 11 deletions
@@ -184,6 +184,10 @@ CaptureResult finalizeRecording(ReaProject* proj, MediaTrack* temp,
request.endSeconds);
}
// Channel-domain rewrite, after the frame-domain trim so it acts on the final
// frame set; it preserves the frame count, so the trimmed length above still holds.
collapseCapturedFileToMono(destPath);
// Pure recorded-capture -> Sample mapping (identity, bounds echo, tier).
RecordedCapture cap;
cap.relativePath = paths.relativePath;
@@ -194,7 +198,9 @@ CaptureResult finalizeRecording(ReaProject* proj, MediaTrack* temp,
cap.wetDry = request.wetDry;
cap.displayName = request.baseName;
cap.trackGuids = request.trackGuids;
cap.channelCount = request.channelCount;
// channelCount deliberately left unset here: stampCaptureSample measures it from
// the file below. Echoing the request was this path's own defect — it parsed the
// recorded layout for the trim and still reported the requested 2.
result.status = CaptureStatus::Ok;
result.sample = sampleFromRecordedCapture(cap);