changeset 4757:bb0638143fc8

move libSAD's DEBUG_MSG out of global scope, as it breaks timidity and possible something else
author Andrew O. Shadoura <bugzilla@tut.by>
date Thu, 07 Aug 2008 12:29:24 +0300
parents b136f202ebfa
children 8de129d08238
files src/libSAD/Makefile src/libSAD/common.h src/libSAD/dither.c src/libSAD/dither_ops.c src/libSAD/noicegen.c
diffstat 5 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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 !!! */
--- 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 <assert.h>
 #include <math.h>
 
--- 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]) )
 
--- 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)