Fix PLC for BSD (bug #2532)
authorMark Spencer <markster@digium.com>
Sun, 20 Mar 2005 02:53:48 +0000 (02:53 +0000)
committerMark Spencer <markster@digium.com>
Sun, 20 Mar 2005 02:53:48 +0000 (02:53 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5211 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/plc.h
plc.c

index 85c0d57..7e41568 100755 (executable)
 #ifdef SOLARIS
 #include <sys/int_types.h>
 #else
+#ifdef __FreeBSD__
+#include <inttypes.h>
+#else
 #include <stdint.h>
 #endif
+#endif
 
 /*! \page plc_page Packet loss concealment
 \section plc_page_sec_1 What does it do?
diff --git a/plc.c b/plc.c
index d14a98f..9b2228e 100755 (executable)
--- a/plc.c
+++ b/plc.c
@@ -33,7 +33,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <math.h>
-#include <stdint.h>
 #include <limits.h>
 
 #include <asterisk/plc.h>
 #define TRUE (!FALSE)
 #endif
 
+#if !defined(INT16_MAX)
+#define INT16_MAX      (32767)
+#define INT16_MIN      (-32767-1)
+#endif
+
 /* We do a straight line fade to zero volume in 50ms when we are filling in for missing data. */
 #define ATTENUATION_INCREMENT       0.0025                              /* Attenuation per sample */