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

Workaround WebM playback bug after AudioServer latency fixes #35993

Merged
merged 1 commit into from
Feb 8, 2020

Conversation

akien-mga
Copy link
Member

af9bb0e fixed AudioServer's
get_output_delay() (which used to always return 0) while renaming it
to get_output_latency(). It now returns the latency from the
AudioDriver, which can be non-0.

While this was a clear bugfix, it broke playback for WebM files without
audio track. It seems like the playback code, even though it queried
the output delay to calculate a time compensation, was designed to work
even though the delay value was actually bogus. Now that it's correct,
it's not working.

As a workaround we comment out uses of the output latency, restoring
the behavior of Godot 3.1.

This code should still be reviewed by someone more versed in video
playback and fixed to properly account for the non-0 driver latency.

Fixes #35760.

af9bb0e fixed AudioServer's
`get_output_delay()` (which used to always return 0) while renaming it
to `get_output_latency()`. It now returns the latency from the
AudioDriver, which can be non-0.

While this was a clear bugfix, it broke playback for WebM files without
audio track. It seems like the playback code, even though it queried
the output delay to calculate a time compensation, was designed to work
even though the delay value was actually bogus. Now that it's correct,
it's not working.

As a workaround we comment out uses of the output latency, restoring
the behavior of Godot 3.1.

This code should still be reviewed by someone more versed in video
playback and fixed to properly account for the non-0 driver latency.

Fixes godotengine#35760.
@akien-mga akien-mga added bug topic:core topic:audio regression cherrypick:3.x Considered for cherry-picking into a future 3.x release labels Feb 7, 2020
@akien-mga akien-mga added this to the 4.0 milestone Feb 7, 2020
@akien-mga akien-mga merged commit 6203c38 into godotengine:master Feb 8, 2020
@akien-mga akien-mga deleted the who-let-the-latency-out branch February 8, 2020 14:36
@akien-mga
Copy link
Member Author

Cherry-picked for 3.2.1.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Webm playback broke after 3.2 update [regression from af9bb0ea]
1 participant