limit max latency

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3414 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
beveloper 2003-06-03 21:10:49 +00:00
parent a0703a47ce
commit b63f90a895

View File

@ -529,6 +529,8 @@ ToneProducer::LateNoticeReceived(const media_source& what, bigtime_t how_much, b
// that at the moment, so we try to start producing buffers earlier to
// compensate.
mInternalLatency += how_much;
if (mInternalLatency > 50000)
mInternalLatency = 50000;
SetEventLatency(mLatency + mInternalLatency);
FPRINTF(stderr, "\tincreasing latency to %Ld\n", mLatency + mInternalLatency);