From 67acaefcec0455dfcca74a9fca7b81b7b25624bd Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 23 Mar 2007 21:54:16 +0000 Subject: [PATCH] fix windows build. you may need to delete libs/apr-util/xml/expat/lib/config.h for it to build. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4755 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/apr-util/xml/expat/lib/winconfig.h | 1 + src/switch_resample.c | 8 ++++---- w32/Library/FreeSwitchCore.vcproj | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/libs/apr-util/xml/expat/lib/winconfig.h b/libs/apr-util/xml/expat/lib/winconfig.h index 77b1ece8ca..602ea94111 100644 --- a/libs/apr-util/xml/expat/lib/winconfig.h +++ b/libs/apr-util/xml/expat/lib/winconfig.h @@ -23,5 +23,6 @@ #define XML_DTD 1 #define XML_BYTE_ORDER 12 #define XML_CONTEXT_BYTES 1024 +#define HAVE_MEMMOVE #endif /* ndef WINCONFIG_H */ diff --git a/src/switch_resample.c b/src/switch_resample.c index af6321fa9f..20c6729d60 100644 --- a/src/switch_resample.c +++ b/src/switch_resample.c @@ -185,8 +185,9 @@ SWITCH_DECLARE(void) switch_swap_linear(int16_t *buf, int len) SWITCH_DECLARE(void) switch_generate_sln_silence(int16_t *data, uint32_t samples, uint32_t divisor) { - int16_t rnd, x,i; - uint32_t sum_rnd = 0; + int16_t rnd, x; + uint32_t i; + int sum_rnd = 0; assert(divisor); @@ -196,8 +197,7 @@ SWITCH_DECLARE(void) switch_generate_sln_silence(int16_t *data, uint32_t samples sum_rnd += rnd; } switch_normalize_to_16bit(sum_rnd); - *data = (int16_t) sum_rnd; - *data /= (int)divisor; + *data = (int16_t)((int16_t)sum_rnd / (int)divisor); data++; } diff --git a/w32/Library/FreeSwitchCore.vcproj b/w32/Library/FreeSwitchCore.vcproj index e25e5243d7..6c1ebff600 100644 --- a/w32/Library/FreeSwitchCore.vcproj +++ b/w32/Library/FreeSwitchCore.vcproj @@ -43,7 +43,7 @@