Fix eight review findings on the render-bounds diagnostics
Corrects a false comment example, fixes two tests that couldn't detect their own regressions, adds two more read-back checkpoints around Main_OnCommand so a drift report self-locates, guards a spurious zero-vs-zero coincidence match, and softens two sentences that overclaimed cause or defect.
This commit is contained in:
@@ -70,7 +70,11 @@ std::string describeBoundsDrift(double reqStart, double reqEnd,
|
||||
// straight back, so anything but the same bits is a value REAPER changed.
|
||||
if (storedStart == reqStart && storedEnd == reqEnd) return {};
|
||||
|
||||
std::string s = "REAPER did not keep the render bounds it was handed -- asked for [" +
|
||||
// Says only that the two differ, not why -- a legitimate clamp (negative start,
|
||||
// end past project end) reads back differently for the same reason a precision
|
||||
// defect would, and this sentence cannot tell those apart.
|
||||
std::string s = "REAPER read back different render bounds than it was handed -- "
|
||||
"asked for [" +
|
||||
exactly(reqStart) + "s, " + exactly(reqEnd) + "s), read back [" +
|
||||
exactly(storedStart) + "s, " + exactly(storedEnd) + "s).";
|
||||
if (sampleRate > 0) {
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
// render_window — pure frame arithmetic for a capture's requested window: the
|
||||
// frame count a project-time range occupies, whether a render whose bounds come
|
||||
// from the selected items' own extent already prints that window, and the two
|
||||
// diagnostics that say where a short render lost its frames.
|
||||
// diagnostics that bound a short render without locating it: whether the stored
|
||||
// RENDER_* bounds round-tripped, and whether the shortfall matches a millisecond-
|
||||
// floor coincidence.
|
||||
// NO REAPER types; unit-tested by tests/test_render_window.cpp.
|
||||
|
||||
#include <string>
|
||||
@@ -54,7 +56,7 @@ bool itemExtentPrintsWindow(double reqStart, double reqEnd,
|
||||
// A COINCIDENCE OF COUNTS, not a claim about how anything resolved the end: nothing
|
||||
// renders from this number and no capture path asks for it. Whole-millisecond values
|
||||
// are recognized within a nanosecond, because a decimal millisecond is not always one
|
||||
// in binary (0.029 * 1000 lands just below 29) and a bare floor would drop a
|
||||
// in binary (1.007 * 1000 lands just below 1007) and a bare floor would drop a
|
||||
// millisecond from a window already on the grid. A nanosecond is far under one frame
|
||||
// at any rate we render, so a real sub-millisecond remainder still floors.
|
||||
long long msFlooredEndFrameCount(double startSeconds, double endSeconds,
|
||||
|
||||
Reference in New Issue
Block a user