* Small cleanup.
* RealTimeForTime() did not work without VideoProducer. Maybe it is never used though. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26141 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -155,7 +155,11 @@ NodeManager::RealTimeForTime(bigtime_t time) const
|
||||
if (fVideoProducer) {
|
||||
result = fVideoProducer->TimeSource()->RealTimeFor(
|
||||
fPerformanceTimeBase + time, 0);
|
||||
} else if (fAudioProducer) {
|
||||
result = fAudioProducer->TimeSource()->RealTimeFor(
|
||||
fPerformanceTimeBase + time, 0);
|
||||
}
|
||||
//printf("NodeManager::RealTimeForTime(%lld) -> %lld\n", time, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -577,7 +581,9 @@ NodeManager::_StartNodes()
|
||||
if (!fMediaRoster || !fAudioProducer)
|
||||
return status;
|
||||
// begin mucking with the media roster
|
||||
if (fMediaRoster->Lock()) {
|
||||
if (!fMediaRoster->Lock())
|
||||
return B_ERROR;
|
||||
|
||||
bigtime_t latency = 0;
|
||||
bigtime_t initLatency = 0;
|
||||
if (fVideoProducer && fVideoConsumer) {
|
||||
@@ -641,6 +647,8 @@ NodeManager::_StartNodes()
|
||||
|
||||
bigtime_t perf = timeSource->PerformanceTimeFor(real + latency
|
||||
+ initLatency);
|
||||
printf("performance time for %lld: %lld\n", real + latency
|
||||
+ initLatency, perf);
|
||||
|
||||
timeSource->Release();
|
||||
|
||||
@@ -664,10 +672,12 @@ NodeManager::_StartNodes()
|
||||
print_error("Can't start the audio producer", status);
|
||||
return status;
|
||||
}
|
||||
|
||||
fPerformanceTimeBase = perf;
|
||||
|
||||
// done mucking with the media roster
|
||||
fMediaRoster->Unlock();
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user