From fe99d6238e6acb4a60cdc5bab63aa0bc0af07e5f Mon Sep 17 00:00:00 2001
From: Zoltan Mizsei <miqlas@gmail.com>
Date: Sun, 20 Mar 2016 16:04:23 +0000
Subject: [PATCH] printf's converted to TRACE
---
src/kits/media/SoundPlayNode.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/kits/media/SoundPlayNode.cpp b/src/kits/media/SoundPlayNode.cpp
index f600dbe..e7b54d7 100644
a
|
b
|
SoundPlayNode::SendNewBuffer(const media_timed_event* event,
|
624 | 624 | bigtime_t lateness, bool realTimeEvent) |
625 | 625 | { |
626 | 626 | CALLED(); |
627 | | // printf("latency = %12Ld, event = %12Ld, sched = %5Ld, arrive at %12Ld, now %12Ld, current lateness %12Ld\n", EventLatency() + SchedulingLatency(), EventLatency(), SchedulingLatency(), event->event_time, TimeSource()->Now(), lateness); |
| 627 | // TRACE("latency = %12Ld, event = %12Ld, sched = %5Ld, arrive at %12Ld, now %12Ld, current lateness %12Ld\n", EventLatency() + SchedulingLatency(), EventLatency(), SchedulingLatency(), event->event_time, TimeSource()->Now(), lateness); |
628 | 628 | |
629 | 629 | // make sure we're both started *and* connected before delivering a buffer |
630 | 630 | if (RunState() != BMediaEventLooper::B_STARTED |
… |
… |
SoundPlayNode::SendNewBuffer(const media_timed_event* event,
|
638 | 638 | // lateness is independent of EventLatency()! |
639 | 639 | |
640 | 640 | if (lateness > (BufferDuration() / 3) ) { |
641 | | printf("SoundPlayNode::SendNewBuffer, event scheduled much too late, " |
| 641 | TRACE("SoundPlayNode::SendNewBuffer, event scheduled much too late, " |
642 | 642 | "lateness is %" B_PRId64 "\n", lateness); |
643 | 643 | } |
644 | 644 | |
… |
… |
SoundPlayNode::SendNewBuffer(const media_timed_event* event,
|
655 | 655 | bigtime_t how_early = event->event_time - TimeSource()->Now() - fLatency - fInternalLatency; |
656 | 656 | if (how_early > 5000) { |
657 | 657 | |
658 | | printf("SoundPlayNode::SendNewBuffer, event scheduled too early, how_early is %Ld\n", how_early); |
| 658 | TRACE("SoundPlayNode::SendNewBuffer, event scheduled too early, how_early is %Ld\n", how_early); |
659 | 659 | |
660 | 660 | if (fTooEarlyCount++ == 5) { |
661 | 661 | fInternalLatency -= how_early; |
662 | 662 | if (fInternalLatency < 500) |
663 | 663 | fInternalLatency = 500; |
664 | | printf("SoundPlayNode::SendNewBuffer setting internal latency to %Ld\n", fInternalLatency); |
| 664 | TRACE("SoundPlayNode::SendNewBuffer setting internal latency to %Ld\n", fInternalLatency); |
665 | 665 | SetEventLatency(fLatency + fInternalLatency); |
666 | 666 | fTooEarlyCount = 0; |
667 | 667 | } |
… |
… |
SoundPlayNode::SendNewBuffer(const media_timed_event* event,
|
672 | 672 | != B_OK) { |
673 | 673 | // we need to recycle the buffer |
674 | 674 | // if the call to SendBuffer() fails |
675 | | printf("SoundPlayNode::SendNewBuffer: Buffer sending " |
| 675 | TRACE("SoundPlayNode::SendNewBuffer: Buffer sending " |
676 | 676 | "failed\n"); |
677 | 677 | buffer->Recycle(); |
678 | 678 | } |