start node at correct performance time
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3391 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
1ab3e01897
commit
2bff4d995e
@ -152,16 +152,12 @@ BSoundPlayer::Start()
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
BTimeSource *timeSource = roster->MakeTimeSourceFor(_m_node->Node());
|
||||
|
||||
// make sure we give the producer enough time to run buffers through
|
||||
// the node chain, otherwise it'll start up already late
|
||||
bigtime_t latency = 0;
|
||||
status_t err = roster->GetLatencyFor(_m_node->Node(), &latency);
|
||||
|
||||
err = roster->StartNode(_m_node->Node(), timeSource->Now() + latency + 5000);
|
||||
|
||||
timeSource->Release();
|
||||
err = roster->StartNode(_m_node->Node(), _m_node->TimeSource()->Now() + latency + 5000);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user