# HG changeset patch # User Andrew O. Shadoura # Date 1218101364 -10800 # Node ID bb0638143fc8a9eae0a61f54f14fdaa4b955db90 # Parent b136f202ebfa3d2242b338bb37f624caf87a6968 move libSAD's DEBUG_MSG out of global scope, as it breaks timidity and possible something else diff -r b136f202ebfa -r bb0638143fc8 src/libSAD/Makefile --- a/src/libSAD/Makefile Thu Aug 07 03:54:15 2008 +0300 +++ b/src/libSAD/Makefile Thu Aug 07 12:29:24 2008 +0300 @@ -8,7 +8,8 @@ INCLUDES = libSAD.h \ common.h \ - dither.h + dither.h \ + debug.h include ../../buildsys.mk include ../../extra.mk diff -r b136f202ebfa -r bb0638143fc8 src/libSAD/common.h --- a/src/libSAD/common.h Thu Aug 07 03:54:15 2008 +0300 +++ b/src/libSAD/common.h Thu Aug 07 12:29:24 2008 +0300 @@ -130,12 +130,6 @@ #define SAD_ERROR_OK 0 #define SAD_ERROR_FAIL -1 -#ifdef DEBUG -#define DEBUG_MSG(f,x) {printf("debug: "f, x);} -#else -#define DEBUG_MSG(f,x) {} -#endif - typedef struct { int present; float track_gain; /* in dB !!! */ diff -r b136f202ebfa -r bb0638143fc8 src/libSAD/dither.c --- a/src/libSAD/dither.c Thu Aug 07 03:54:15 2008 +0300 +++ b/src/libSAD/dither.c Thu Aug 07 12:29:24 2008 +0300 @@ -25,6 +25,8 @@ #include "dither_ops.h" #include "noicegen.h" +#include "debug.h" + #include #include diff -r b136f202ebfa -r bb0638143fc8 src/libSAD/dither_ops.c --- a/src/libSAD/dither_ops.c Thu Aug 07 03:54:15 2008 +0300 +++ b/src/libSAD/dither_ops.c Thu Aug 07 12:29:24 2008 +0300 @@ -23,6 +23,8 @@ #include "dither_ops.h" #include "dither.h" +#include "debug.h" + #define SAD_GET_LE16(a) ( (uint16_t)(((uint8_t*)(a))[0]) | (uint16_t)(((uint8_t*)(a))[1]) << 8 ) #define SAD_GET_BE16(a) ( (uint16_t)(((uint8_t*)(a))[0]) << 8 | (uint16_t)(((uint8_t*)(a))[1]) ) diff -r b136f202ebfa -r bb0638143fc8 src/libSAD/noicegen.c --- a/src/libSAD/noicegen.c Thu Aug 07 03:54:15 2008 +0300 +++ b/src/libSAD/noicegen.c Thu Aug 07 12:29:24 2008 +0300 @@ -17,6 +17,8 @@ #include "noicegen.h" +#include "debug.h" + int triangular_dither_noise(int nbits) { // parameter nbits : the peak-to-peak amplitude desired (in bits)