[haiku-commits] r38655 - haiku/trunk/src/apps/mediaplayer/media_node_framework

  • From: superstippi@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 14 Sep 2010 22:18:34 +0200 (CEST)

Author: stippi
Date: 2010-09-14 22:18:34 +0200 (Tue, 14 Sep 2010)
New Revision: 38655
Changeset: http://dev.haiku-os.org/changeset/38655

Modified:
   haiku/trunk/src/apps/mediaplayer/media_node_framework/PlaybackManager.cpp
Log:
Use the exact time the event was supposed to fire,
not the current real time. If I understand things
correctly, using the mechanism to send a MessageEvent
is just there to invoke SetPerformanceTime() within
the PlaybackManager BLooper (I could be mistaken).
Need to check whether this fixes a drift in audio
and video I am often observing.


Modified: 
haiku/trunk/src/apps/mediaplayer/media_node_framework/PlaybackManager.cpp
===================================================================
--- haiku/trunk/src/apps/mediaplayer/media_node_framework/PlaybackManager.cpp   
2010-09-14 20:16:26 UTC (rev 38654)
+++ haiku/trunk/src/apps/mediaplayer/media_node_framework/PlaybackManager.cpp   
2010-09-14 20:18:34 UTC (rev 38655)
@@ -208,12 +208,13 @@
                                break;
                        }
 
-//                     bigtime_t eventTime;
-//                     message->FindInt64("time", &eventTime);
-                       bigtime_t now = system_time();
+                       bigtime_t eventTime;
+                       message->FindInt64("time", &eventTime);
+//                     bigtime_t now = system_time();
                        fPerformanceTimeEvent = NULL;
 
-                       SetPerformanceTime(TimeForRealTime(now));
+//                     SetPerformanceTime(TimeForRealTime(now));
+                       SetPerformanceTime(TimeForRealTime(eventTime));
 //TRACE("MSG_EVENT: rt: %lld, pt: %lld\n", now, fPerformanceTime);
 //printf("MSG_EVENT: et: %lld, rt: %lld, pt: %lld\n", eventTime, now, 
fPerformanceTime);
                        break;


Other related posts:

  • » [haiku-commits] r38655 - haiku/trunk/src/apps/mediaplayer/media_node_framework - superstippi