Ticket #12686: printf_to_TRACE.patch

File printf_to_TRACE.patch, 2.7 KB (added by miqlas, 9 years ago)

Patch

  • src/kits/media/SoundPlayNode.cpp

    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,  
    624624    bigtime_t lateness, bool realTimeEvent)
    625625{
    626626    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);
    628628
    629629    // make sure we're both started *and* connected before delivering a buffer
    630630    if (RunState() != BMediaEventLooper::B_STARTED
    SoundPlayNode::SendNewBuffer(const media_timed_event* event,  
    638638    // lateness is independent of EventLatency()!
    639639
    640640    if (lateness > (BufferDuration() / 3) ) {
    641         printf("SoundPlayNode::SendNewBuffer, event scheduled much too late, "
     641        TRACE("SoundPlayNode::SendNewBuffer, event scheduled much too late, "
    642642            "lateness is %" B_PRId64 "\n", lateness);
    643643    }
    644644
    SoundPlayNode::SendNewBuffer(const media_timed_event* event,  
    655655            bigtime_t how_early = event->event_time - TimeSource()->Now() - fLatency - fInternalLatency;
    656656            if (how_early > 5000) {
    657657
    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);
    659659
    660660                if (fTooEarlyCount++ == 5) {
    661661                    fInternalLatency -= how_early;
    662662                    if (fInternalLatency < 500)
    663663                        fInternalLatency = 500;
    664                     printf("SoundPlayNode::SendNewBuffer setting internal latency to %Ld\n", fInternalLatency);
     664                    TRACE("SoundPlayNode::SendNewBuffer setting internal latency to %Ld\n", fInternalLatency);
    665665                    SetEventLatency(fLatency + fInternalLatency);
    666666                    fTooEarlyCount = 0;
    667667                }
    SoundPlayNode::SendNewBuffer(const media_timed_event* event,  
    672672                    != B_OK) {
    673673                // we need to recycle the buffer
    674674                // if the call to SendBuffer() fails
    675                 printf("SoundPlayNode::SendNewBuffer: Buffer sending "
     675                TRACE("SoundPlayNode::SendNewBuffer: Buffer sending "
    676676                    "failed\n");
    677677                buffer->Recycle();
    678678            }