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.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38655 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2010-09-14 20:18:34 +00:00
parent 5aaa020871
commit 3975779fc2

View File

@ -208,12 +208,13 @@ PlaybackManager::MessageReceived(BMessage* message)
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;