Test phase alignment after device silence and keep diagnostics current
This commit is contained in:
1 parent
6896038f30
commit
26c91e6295
2 files changed
+18
-1
No files matched your search
@@ -127,9 +127,25 @@ static void tail_and_reset() {
|
||||
DEBUG_INFO(DEBUG_CATEGORY_CALL, "PASS delay final tail preserved without flush, reset clears phase/history");
|
||||
}
|
||||
|
||||
static void phase_after_silence() {
|
||||
for (unsigned block : {240, 480, 777, 960}) for (unsigned silence : {1, 239, 480, 777, 959}) {
|
||||
Trial t;
|
||||
t.timeline.silence(silence); t.delay.silence(silence); t.device += silence;
|
||||
t.available = 5 * 960; // Прямой режим без SoundTouch; стартовая фаза произвольна.
|
||||
uint64_t next = 960;
|
||||
for (uint64_t time = 0; time < 20 * 48000; time += block) {
|
||||
while (next <= time) { t.available += 960; next += 960; }
|
||||
t.pull(block);
|
||||
}
|
||||
auto s = t.delay.stats();
|
||||
CHECK(!s.entered && !s.exited && s.cuts > 0 && !s.phase && s.tempo == 1);
|
||||
}
|
||||
DEBUG_INFO(DEBUG_CATEGORY_CALL, "PASS delay phase: 20 arbitrary initial silence/block combinations converge using cuts only");
|
||||
}
|
||||
|
||||
int main() {
|
||||
debug_config_init(); debug_set_level(DEBUG_LEVEL_INFO);
|
||||
for (unsigned block : {240, 480, 777, 960}) for (unsigned phase : {0, 239, 479, 719, 959}) steady(block, phase);
|
||||
switching(); tail_and_reset();
|
||||
switching(); tail_and_reset(); phase_after_silence();
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user