Fix half-speed playback and audio echo on slower machines#130
Merged
dazzatronus merged 1 commit intoJun 26, 2026
Merged
Conversation
|
🎉 This PR is included in version 2.11.7 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Preview playback now follows real wall-clock time. The playhead previously advanced by accumulating per-frame deltas that were capped to a 60fps budget, so on any machine that could not sustain 60fps it advanced slower than real time: video ran at roughly half speed, and audio (which plays at real time on its own hardware clock) was repeatedly re-synced backwards onto the lagging playhead, producing an echo. One cause, both symptoms.
Behaviour change
How
play()anchorsperformance.now()and the current playback time; each tick setsplaybackTime = anchor + (now - anchorWall). The per-frame audio/video re-sync logic becomes a rare safety net rather than a continuous correction loop. Removed the PixiJSticker.minFPS = 60line that was capping the frame-time delta.Verify
DevTools → Performance → CPU throttle (6× or 20×), then play a timeline with audio: a 10s clip takes 10s of real time and audio stays in sync; only the visual frame rate drops.
jestis green (1802 tests).Note for reviewers: a pre-existing typecheck failure unrelated to this change (asset
srcoptionality) is addressed separately; this PR touches only the playback clock.