Period detection: silence is not dissent but an absent period is — the agreement denominator is the probes that carried signal
This commit is contained in:
@@ -957,12 +957,14 @@ static void testBuildSampleDataDetectsOverTheSustainLoopNotTheWholeSource() {
|
||||
CHECK(std::fabs(sd.sourcePeriodFrames - loopPeriod) < 2.0);
|
||||
|
||||
// A loop too short to host the full search band falls back to the whole source rather than
|
||||
// to none — here that whole source has no one period, so the answer is the bare one above.
|
||||
// to none — here that whole source has no one period, so the answer is none. Asserted
|
||||
// against the literal, not against `bare`: the two agreeing would also hold if both
|
||||
// regressed together, which is no evidence that the fallback ran.
|
||||
InstrumentParams shortLoop;
|
||||
shortLoop.loopOverride = SampleLoop{true, 118000, static_cast<std::int64_t>(frames)};
|
||||
const SampleData shortSd = buildSampleData(resolveCapture(ref("b/a.wav", 60), shortLoop),
|
||||
DecodedPcm{pcm, rate, {}});
|
||||
CHECK(shortSd.sourcePeriodFrames == bare.sourcePeriodFrames);
|
||||
CHECK(shortSd.sourcePeriodFrames == 0.0);
|
||||
}
|
||||
|
||||
static void testBuildSampleDataCarriesTheVelocityCurve() {
|
||||
|
||||
Reference in New Issue
Block a user