Fix build busters on non Windows platforms.

Added new line to end of .h file.
Removed duplicated MAX/MIN macros.
Changed Window's only __int64 datatype to cross platform INT64.
included header for 'abs' function.

HEAD only

--greg.




Index: tonegen.cpp
===================================================================
RCS file: /cvsroot/audio/tonegen/tonegen.cpp,v
retrieving revision 1.2
diff -u -w -r1.2 tonegen.cpp
--- tonegen.cpp 15 Jun 2006 10:51:11 -0000      1.2
+++ tonegen.cpp 12 Jul 2006 18:07:16 -0000
@@ -64,6 +64,7 @@
  */

 #include "tonegen.h"
+#include "hlxclib/stdlib.h"

 #define NBUF 65536
 /*
Index: pub/tonegen.h
===================================================================
RCS file: /cvsroot/audio/tonegen/pub/tonegen.h,v
retrieving revision 1.2
diff -u -w -r1.2 tonegen.h
--- pub/tonegen.h       15 Jun 2006 10:51:33 -0000      1.2
+++ pub/tonegen.h       12 Jul 2006 18:07:16 -0000
@@ -72,11 +72,8 @@

 #define MAX_AMPL       30928   /* -0.5dB ensures no clipping */

-#define MAX(a,b)       (((a) > (b)) ? (a) : (b))
-#define MIN(a,b)       (((a) < (b)) ? (a) : (b))
-
-#define mulhi(a,b)     (int)(((__int64)(a) * (__int64)(b)) >> 32)
-#define udivhi(n,d)    (unsigned) (((unsigned __int64)(n) << 32) / (d))
+#define mulhi(a,b)     (int)(((INT64)(a) * (INT64)(b)) >> 32)
+#define udivhi(n,d)    (unsigned) (((unsigned INT64)(n) << 32) / (d))

 /* tone generator state */
 typedef struct {
@@ -105,3 +102,4 @@
 };

 #endif /* #ifndef _TONEGEN_H */
\ No newline at end of file
+

_______________________________________________
Audio-dev mailing list
[email protected]
http://lists.helixcommunity.org/mailman/listinfo/audio-dev

Reply via email to