Commit graph

12 commits

Author SHA1 Message Date
SteadyW
667b412994
Revert "Fix #7: startup freeze (audio master clock jumps backward on cold start)" 2026-06-14 13:30:14 +03:00
SteadyW
bb0c096ffd
Merge pull request #11 from 1Aa1k/fix-startup-freeze
Fix #7: startup freeze (audio master clock jumps backward on cold start)
2026-06-14 13:05:19 +03:00
YusufB5
7071f2b422 feat: apply security, audio session, and ffmpeg zombie fixes 2026-06-14 12:44:19 +03:00
Nate
58626d7602 fix(#7): anchor the audio master clock so it never jumps backward (startup freeze)
Cold-start root cause: on a slow first load the <audio> element starts late, so
the audio-ready gate's wall-clock fallback has already advanced playback a second
or two by the time audio finally begins at currentTime≈0. The master clock then
snapped back toward 0, every buffered frame read as "in the future", and
renderFrame() deadlocked until audio caught up — the freeze. A refresh warms the
cache, audio starts immediately, the gap (and the freeze) vanish — which is why
reloading "fixes" it.

Fix: the first time audio is genuinely playing, capture the offset between the
wall clock and the audio clock and add it back, so the master clock follows
audio's *rate* without ever moving backward. When audio starts promptly the
offset is ~0, so normal playback is unchanged.

experiments/freeze_repro.js models a 2s-late audio start with a realistic jitter
buffer + 60fps render loop: the original code and a naive `currentTime > 0` guard
render 0-1 of ~96 frames after audio starts (frozen ~4s); the anchored clock
renders 96/96 smooth. Real-browser regression (muted Chrome): normal playback
unaffected at ~29 fps.
2026-06-14 01:24:05 -04:00
YusufB5
444334cfba feat: added pause mechanism and updated user interface 2026-06-13 19:50:32 +03:00
YusufB5
ad7895b054 feat: activate adaptive codec in app.js and add debug flags 2026-06-13 12:08:29 +03:00
YusufB5
e758423338 feat: Core engine V2 (A/V Sync, Zero-Copy Pixel, FPS Decimation) & CLI shortcuts 2026-06-07 23:16:25 +03:00
YusufB5
8b31a7450a feat: Add auto-scaling rows, pixel mode flag, and command loop 2026-06-05 23:20:25 +03:00
YusufB5
5fad7c5aa9 feat: server-side volume control feature added, playlist & folder video management 2026-06-04 16:14:23 +03:00
YusufB5
2043a7bb37 feat: add invisible selection layer, audio streaming, and updated manifesto for pure performance mode 2026-05-05 13:51:27 +03:00
YusufB5
e7002173c2 Improve error handling and translate messages to English 2026-05-03 21:36:14 +03:00
YusufB5
7cd84b657b Initial commit: ASCILINE Engine - Modular & Optimized 2026-05-02 14:36:22 +03:00