SoundConsumer.cpp: fix debug macros compiling in release mode
Signed-off-by: Jérôme Duval <[email protected]>
This commit is contained in:
committed by
Jérôme Duval
parent
91c78f092f
commit
d3668a5473
@@ -35,18 +35,15 @@ namespace BPrivate {
|
|||||||
// other such debugging aids. By contrast, DEBUG turns on extra debugging
|
// other such debugging aids. By contrast, DEBUG turns on extra debugging
|
||||||
// in some programs.
|
// in some programs.
|
||||||
#if !NDEBUG
|
#if !NDEBUG
|
||||||
#define FPRINTF fprintf
|
#define TRACE_SOUNDCONSUMER
|
||||||
#else
|
|
||||||
#define FPRINTF (void)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Comment out the FPRINTF part of these lines to reduce verbiage.
|
// Comment out the FPRINTF part of these lines to reduce verbiage.
|
||||||
// Enabling MESSAGE will kill performance on slower machines, because it
|
// Enabling MESSAGE will kill performance on slower machines, because it
|
||||||
// prints for each message received (including each buffer).
|
// prints for each message received (including each buffer).
|
||||||
#define TRACE_SOUNDCONSUMER
|
|
||||||
#ifdef TRACE_SOUNDCONSUMER
|
#ifdef TRACE_SOUNDCONSUMER
|
||||||
#define NODE FPRINTF
|
#define NODE fprintf
|
||||||
#define MESSAGE FPRINTF
|
#define MESSAGE fprintf
|
||||||
#else
|
#else
|
||||||
#define NODE(x...)
|
#define NODE(x...)
|
||||||
#define MESSAGE(x...)
|
#define MESSAGE(x...)
|
||||||
@@ -628,7 +625,7 @@ SoundConsumer::ServiceThread()
|
|||||||
Notify(B_OP_TIMED_OUT, timeout);
|
Notify(B_OP_TIMED_OUT, timeout);
|
||||||
} else {
|
} else {
|
||||||
// Other errors are bad.
|
// Other errors are bad.
|
||||||
FPRINTF(stderr, "SoundConsumer: error %#010lx\n", err);
|
MESSAGE(stderr, "SoundConsumer: error %#010lx\n", err);
|
||||||
bad++;
|
bad++;
|
||||||
// If we receive three bad reads with no good messages inbetween,
|
// If we receive three bad reads with no good messages inbetween,
|
||||||
// things are probably not going to improve (like the port
|
// things are probably not going to improve (like the port
|
||||||
|
|||||||
Reference in New Issue
Block a user