Desktop: Synchronise video to audio #85
Closed
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.
On Windows, when the game is dragged for a few seconds, the audio pauses. That's just how libGDX is, nothing to do with gdx-video specifically. But the result of that is the
System.currentTimeMillis()
calculation falls out of sync.I've tried to improve the situation here, but I'm unsure how robust it is. It will invariably get tested while I develop my game.
Note: This does not do anything to fix the fact gdx-video isn't very good at keeping up. E.g. if a 60fps video is played on a 50Hz monitor, video playback will still fall behind if the video is only updated once per frame. I think that's best tackled separately.