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

Correctly set manual timings if audio offset != 0 #111

Merged

Conversation

artjomsR
Copy link
Contributor

@artjomsR artjomsR commented Sep 24, 2023

This fixes a bug which is present if video and audio were downloaded from different sources and don't align perfectly. So, mpv's add audio-delay is used to align them.

In such a case, when cards are updated via mpvacious-update-last-note mpvacious works as expected. subs_observer.set_to_current_sub also works fine because it relies on the sub timing. But when setting timings manually (as with the functions involved in this PR), the audio delay is not taken into account. As such, audio on the final card is off by the value of the offset audio.

You can test this by adding an audio delay, opening the mpvacious menu and pressing s / e to set the timings manually, and c to use the current sub timing. Assuming you're at the beginning / end of the sub, these values should be the same.

@tatsumoto-ren
Copy link
Member

Thanks!

@tatsumoto-ren tatsumoto-ren merged commit a074a11 into Ajatt-Tools:master Sep 25, 2023
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.

2 participants