Gamma-W1-T7: gate PSOLA's two untested wires, fix the cadence test's contradictory rationale, add a vacuity guard
This commit is contained in:
@@ -19,7 +19,10 @@ using audio::AudioSample;
|
||||
// authored and never persisted — this is a cache, not state.
|
||||
struct PeriodEstimate {
|
||||
double frames = 0.0; // 0 = no single period (inharmonic, polyphonic, percussive, noise)
|
||||
double confidence = 0.0; // 1 - the accepted dissimilarity, [0,1]; 0 when frames == 0
|
||||
// 1 - the accepted dissimilarity, [0,1]; 0 when frames == 0. Diagnostic only today: the
|
||||
// accept decision is `valid()` alone, and the loader takes `.frames` without reading this —
|
||||
// do not assume it is load-bearing without checking who reads it.
|
||||
double confidence = 0.0;
|
||||
|
||||
bool valid() const { return frames > 0.0; }
|
||||
};
|
||||
|
||||
@@ -50,7 +50,11 @@ namespace reasampler::instrument::engine {
|
||||
// The fix is not a wider window: it is a nominal jump that is a whole number of the source's
|
||||
// own periods, so an aligned landing point exists by construction (pitch_shift.h's
|
||||
// periodAlignedJump, fed by period_detect at load). The same measurements then read 0.00% and
|
||||
// 0.00%, and 29 Hz renders at +0.0 cents. What survives: a period longer than the reachable
|
||||
// 0.00%, and 29 Hz renders at +0.0 cents — all from `preserve_low_frequency_tests` (Release,
|
||||
// hand-run; it is not in the gated ctest set), the same harness/config as the 3.6%/15.5%/-133
|
||||
// cents readings above. The gated suite's own number for this is the floor-relative excess in
|
||||
// pitch_shift_tests' testThirtyHertzSplicesAlignOnceTheSourcePeriodIsKnown, a different
|
||||
// quantity from the raw percentages here. What survives: a period longer than the reachable
|
||||
// jump (~1.25 windows, so below ~16 Hz at 50 ms) still cannot align, and a source with no
|
||||
// single period falls back to this fixed-window geometry by design.
|
||||
inline constexpr double kStretchRateMin = 0.5;
|
||||
|
||||
Reference in New Issue
Block a user