Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop: Synchronise video to audio #85

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Frosty-J
Copy link
Contributor

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.

It doesn't seem to matter that audio.play() gets called each update. If there's much overhead to doing so, I'll change it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant