Settle the render window on the time selection and delete the experiment that proved it

The millisecond floor lives in the custom-bounds field, not the engine, so
RENDER_BOUNDSFLAG=2 is now the only bounds mode: the two-position type, the
console verdict and the STARTPOS/ENDPOS drift probe all go. capture.cpp 697 -> 622.
This commit is contained in:
2026-08-02 16:55:12 -04:00
parent d85e50c143
commit 8331df2e91
14 changed files with 205 additions and 862 deletions
+3 -36
View File
@@ -14,36 +14,7 @@ double autoTrimEndRatio() {
return std::pow(10.0, kAutoTrimThresholdDb / 20.0);
}
int renderBoundsFlagFor(RenderBoundsChannel channel) {
switch (channel) {
case RenderBoundsChannel::CustomTimeBounds: return 0;
case RenderBoundsChannel::TimeSelection: return 2;
}
// Unreachable for a valid enum; fail closed to the channel every shipped capture
// rendered on, never to a mode that bounds itself off something else entirely.
return 0;
}
int tailFlagBitFor(RenderBoundsChannel channel) {
switch (channel) {
case RenderBoundsChannel::CustomTimeBounds: return kTailFlagCustomBounds;
case RenderBoundsChannel::TimeSelection: return kTailFlagTimeSelection;
}
return kTailFlagCustomBounds; // paired with renderBoundsFlagFor's fallback
}
const char* renderBoundsChannelLabel(RenderBoundsChannel channel) {
switch (channel) {
case RenderBoundsChannel::CustomTimeBounds:
return "custom time bounds (RENDER_BOUNDSFLAG=0, RENDER_STARTPOS/RENDER_ENDPOS)";
case RenderBoundsChannel::TimeSelection:
return "time selection (RENDER_BOUNDSFLAG=2, GetSet_LoopTimeRange)";
}
return "unnamed bounds channel";
}
TailRenderSettings tailRenderSettingsFor(TailMode mode, double manualTailMs,
RenderBoundsChannel channel) {
TailRenderSettings tailRenderSettingsFor(TailMode mode, double manualTailMs) {
TailRenderSettings t;
switch (mode) {
case TailMode::None:
@@ -59,7 +30,7 @@ TailRenderSettings tailRenderSettingsFor(TailMode mode, double manualTailMs,
// postprocessing bit clear. A fixed-threshold trim scales/limits/fades
// nothing, so identical requests trim at the identical sample -> holds
// the bit-identical-repeats invariant.
t.tailFlag = tailFlagBitFor(channel);
t.tailFlag = kTailFlagTimeSelection;
t.tailMs = kMaxTailMs;
t.normalize = kNormalizeTrimEnd;
t.trimEnd = autoTrimEndRatio();
@@ -67,7 +38,7 @@ TailRenderSettings tailRenderSettingsFor(TailMode mode, double manualTailMs,
case TailMode::Manual:
// Clamped to the cap regardless of source; negative floors to 0.
t.tailFlag = tailFlagBitFor(channel);
t.tailFlag = kTailFlagTimeSelection;
t.tailMs = std::clamp(manualTailMs, 0.0, kMaxTailMs);
t.normalize = kNormalizeDisableAll;
t.trimEnd = 0.0;
@@ -143,10 +114,6 @@ const char* renderSourceLabel(SourceMode mode) {
return "unknown"; // unreachable for a valid enum; never claim a source
}
bool sourceBypassesBoundsChannel(SourceMode mode) {
return mode == SourceMode::SelectedItems || mode == SourceMode::RazorArea;
}
SourceMode sourceModeForScope(CaptureScope scope, bool itemExtentIsWindow) {
switch (scope) {
case CaptureScope::Item: