From b63f90a8954b9a47c0b626789b3869da0515329c Mon Sep 17 00:00:00 2001 From: beveloper Date: Tue, 3 Jun 2003 21:10:49 +0000 Subject: [PATCH] limit max latency git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3414 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../media/media-add-ons/tone_producer_demo/ToneProducer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/add-ons/media/media-add-ons/tone_producer_demo/ToneProducer.cpp b/src/add-ons/media/media-add-ons/tone_producer_demo/ToneProducer.cpp index 458aa6f280..1b9d505b3e 100644 --- a/src/add-ons/media/media-add-ons/tone_producer_demo/ToneProducer.cpp +++ b/src/add-ons/media/media-add-ons/tone_producer_demo/ToneProducer.cpp @@ -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);