Created
June 20, 2011 00:39
-
-
Save Themaister/1034956 to your computer and use it in GitHub Desktop.
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
if (autosync) { | |
/* | |
* Adjust this raw delay value by calculating the expected | |
* delay for this frame and generating a new value which is | |
* weighted between the two. The higher autosync is, the | |
* closer to the delay value gets to that which "-nosound" | |
* would have used, and the longer it will take for A/V | |
* sync to settle at the right value (but it eventually will.) | |
* This settling time is very short for values below 100. | |
*/ | |
float predicted = mpctx->delay / playback_speed + *time_frame; | |
float difference = delay - predicted; | |
delay = predicted + difference / (float)autosync; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment