capture: name the render source in the exact-bounds refusal, and put its one-frame tolerance under test
The tolerance is unchanged and now derived, not assumed: frameCountFor lands in {floor(L), ceil(L)}, so a non-frame-aligned window can never miss by more than a frame. Naming the source is what tells a self-bounding render from a short one.
This commit is contained in:
@@ -18,6 +18,18 @@ namespace reasampler::capture {
|
||||
// whether the equality is exact or off by a frame.
|
||||
long long frameCountFor(double startSeconds, double endSeconds, int sampleRate);
|
||||
|
||||
// True when a landed render's frame count is consistent with `frameCountFor`'s
|
||||
// answer for the same window. Tolerates a one-frame difference, and exactly one:
|
||||
// frameCountFor rounds EACH edge, so it sits within a frame of the window's
|
||||
// real-valued length (end-start)*rate — and a renderer that floors, ceils or
|
||||
// rounds that same length sits within a frame of it too, so two integers derived
|
||||
// that way can never be more than one apart. A window whose edges do not land on
|
||||
// frame boundaries therefore cannot produce a larger difference; anything larger
|
||||
// is a render that printed something other than the window asked for, whatever
|
||||
// the alignment. Widening this past one frame retires the exact-bounds invariant
|
||||
// rather than relaxing it — do not.
|
||||
bool renderHonoredBounds(long long expectedFrames, long long actualFrames);
|
||||
|
||||
// True when a render bounded by the selected items' own extent
|
||||
// [itemStart, itemEnd) already prints exactly the requested
|
||||
// [reqStart, reqEnd) window — the one case where REAPER's selected-items render
|
||||
|
||||
Reference in New Issue
Block a user