Synchronize realtime data with display frames
This commit is contained in:
@@ -19,9 +19,15 @@ assert(/renderRequestGeneration\s*===\s*renderGeneration\)\s*renderDirty\s*=\s*f
|
||||
'an in-flight render must not clear a newer render request');
|
||||
assert(/const frameDue\s*=\s*audioOk\s*\|\|\s*elapsed\s*>=\s*target/.test(main),
|
||||
'live displays must use requestAnimationFrame directly instead of a second 60 Hz gate');
|
||||
assert(/await flushPendingPhoenixData\(env, CONFIG\);[^]*?const currentMetricsSeq/.test(main),
|
||||
'the render loop must publish buffered Phoenix data before reading frame sequences');
|
||||
assert(/await updateActiveMeters\(env, d, CONFIG\);\s*[^]*?env\.requestRender\?\.\('audio'\)/.test(audio),
|
||||
'audio rendering must be requested after active meters finish updating');
|
||||
assert(!/phoenixPacketRaf\s*=\s*requestAnimationFrame/.test(audio),
|
||||
'metrics packets must not wait for a competing requestAnimationFrame pump');
|
||||
assert(/export async function flushPendingPhoenixData\(env, CONFIG\)/.test(audio),
|
||||
'Phoenix data paths must expose one display-synchronized presentation pump');
|
||||
assert(!/requestAnimationFrame/.test(audio),
|
||||
'audio transport must not create requestAnimationFrame loops that compete with the canvas loop');
|
||||
assert(!/while\s*\(pendingPhoenixFrame\)/.test(audio),
|
||||
'metrics transport must coalesce bursts instead of draining every queued state');
|
||||
|
||||
console.log('GUI contract regression tests passed');
|
||||
|
||||
Reference in New Issue
Block a user