aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-03-20 02:53:48 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-03-20 02:53:48 +0000
commit2a9118c19c41576aa2761a48aaf77adc15c1baac (patch)
treef3e21422a141f1c61cb344781bcdaf7513bc7394
parent5eadf56c9f287744415ec0a1c8d7865f33b69eec (diff)
Fix PLC for BSD (bug #2532)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5211 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xinclude/asterisk/plc.h4
-rwxr-xr-xplc.c6
2 files changed, 9 insertions, 1 deletions
diff --git a/include/asterisk/plc.h b/include/asterisk/plc.h
index 85c0d57dd..7e4156802 100755
--- a/include/asterisk/plc.h
+++ b/include/asterisk/plc.h
@@ -35,8 +35,12 @@
#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 d14a98f30..9b2228e7e 100755
--- 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>
@@ -45,6 +44,11 @@
#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 */