From 0855477c7d5de7b57ab4a2587f8604dc919dcd4d Mon Sep 17 00:00:00 2001
From: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Date: Sun, 12 Aug 2012 18:45:24 +1200
Subject: [PATCH] SoundConsumer.cpp: fix debug macros compiling in release mode
---
src/kits/media/SoundConsumer.cpp | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/kits/media/SoundConsumer.cpp b/src/kits/media/SoundConsumer.cpp
index 41c49b5..a3498f2 100644
a
|
b
|
namespace BPrivate {
|
35 | 35 | // other such debugging aids. By contrast, DEBUG turns on extra debugging |
36 | 36 | // in some programs. |
37 | 37 | #if !NDEBUG |
38 | | #define FPRINTF fprintf |
39 | | #else |
40 | | #define FPRINTF (void) |
| 38 | #define TRACE_SOUNDCONSUMER |
41 | 39 | #endif |
42 | 40 | |
43 | 41 | // Comment out the FPRINTF part of these lines to reduce verbiage. |
44 | 42 | // Enabling MESSAGE will kill performance on slower machines, because it |
45 | 43 | // prints for each message received (including each buffer). |
46 | | #define TRACE_SOUNDCONSUMER |
47 | 44 | #ifdef TRACE_SOUNDCONSUMER |
48 | | #define NODE FPRINTF |
49 | | #define MESSAGE FPRINTF |
| 45 | #define NODE fprintf |
| 46 | #define MESSAGE fprintf |
50 | 47 | #else |
51 | 48 | #define NODE(x...) |
52 | 49 | #define MESSAGE(x...) |
… |
… |
SoundConsumer::ServiceThread()
|
628 | 625 | Notify(B_OP_TIMED_OUT, timeout); |
629 | 626 | } else { |
630 | 627 | // Other errors are bad. |
631 | | FPRINTF(stderr, "SoundConsumer: error %#010lx\n", err); |
| 628 | MESSAGE(stderr, "SoundConsumer: error %#010lx\n", err); |
632 | 629 | bad++; |
633 | 630 | // If we receive three bad reads with no good messages inbetween, |
634 | 631 | // things are probably not going to improve (like the port |