From d3668a5473e2cd967e220f9abb56375b39d6747a Mon Sep 17 00:00:00 2001 From: Jessica Hamilton Date: Sun, 12 Aug 2012 18:45:24 +1200 Subject: [PATCH] SoundConsumer.cpp: fix debug macros compiling in release mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Duval --- src/kits/media/SoundConsumer.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/kits/media/SoundConsumer.cpp b/src/kits/media/SoundConsumer.cpp index 41c49b56d2..a3498f2c80 100644 --- a/src/kits/media/SoundConsumer.cpp +++ b/src/kits/media/SoundConsumer.cpp @@ -35,18 +35,15 @@ namespace BPrivate { // other such debugging aids. By contrast, DEBUG turns on extra debugging // in some programs. #if !NDEBUG -#define FPRINTF fprintf -#else -#define FPRINTF (void) +#define TRACE_SOUNDCONSUMER #endif // Comment out the FPRINTF part of these lines to reduce verbiage. // Enabling MESSAGE will kill performance on slower machines, because it // prints for each message received (including each buffer). -#define TRACE_SOUNDCONSUMER #ifdef TRACE_SOUNDCONSUMER -#define NODE FPRINTF -#define MESSAGE FPRINTF +#define NODE fprintf +#define MESSAGE fprintf #else #define NODE(x...) #define MESSAGE(x...) @@ -628,7 +625,7 @@ SoundConsumer::ServiceThread() Notify(B_OP_TIMED_OUT, timeout); } else { // Other errors are bad. - FPRINTF(stderr, "SoundConsumer: error %#010lx\n", err); + MESSAGE(stderr, "SoundConsumer: error %#010lx\n", err); bad++; // If we receive three bad reads with no good messages inbetween, // things are probably not going to improve (like the port