[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10916: Catch up with FPS, at cost o
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10916: Catch up with FPS, at cost of animation smootness (go faster to catch up when late). Fixes A/V sync in movies with streaming sound, like most of Bozzetto's (see Adam.swf for instance) |
Date: |
Mon, 25 May 2009 15:28:53 +0200 |
User-agent: |
Bazaar (1.13.1) |
------------------------------------------------------------
revno: 10916
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Mon 2009-05-25 15:28:53 +0200
message:
Catch up with FPS, at cost of animation smootness (go faster to catch up when
late). Fixes A/V sync in movies with streaming sound, like most of Bozzetto's
(see Adam.swf for instance)
modified:
libcore/movie_root.cpp
=== modified file 'libcore/movie_root.cpp'
--- a/libcore/movie_root.cpp 2009-05-14 15:02:29 +0000
+++ b/libcore/movie_root.cpp 2009-05-25 13:28:53 +0000
@@ -1017,20 +1017,23 @@
try {
- if ((now - _lastMovieAdvancement) >= _movieAdvancementDelay)
+ int elapsed = now - _lastMovieAdvancement;
+ if (elapsed >= _movieAdvancementDelay)
{
advanced = true;
advanceMovie();
- // setting to 'now' discards time spent on actual rendering
and
- // action processing.
- // if rendering and action processing takes too much time
- // we'll always be late here, so FPS will effectively be
- // slower. Might add a check here allowing a tolerance
- // and printing a warnign when we're later then tolerated...
- //
- _lastMovieAdvancement = now; // or _vm.getTime(); ?
+
+ // To catch-up lateness we pretend we advanced when
+ // was time for it.
+ // NOTE:
+ // now - _lastMovieAdvancement
+ // gives you actual lateness in milliseconds
+ //
+ _lastMovieAdvancement += _movieAdvancementDelay;
}
+
+ //log_debug("Latenss: %d", now-_lastMovieAdvancement);
executeAdvanceCallbacks();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r10916: Catch up with FPS, at cost of animation smootness (go faster to catch up when late). Fixes A/V sync in movies with streaming sound, like most of Bozzetto's (see Adam.swf for instance),
Sandro Santilli <=