[Freeswitch-svn] [commit] r3193 - freeswitch/trunk/src

Freeswitch SVN mikej at freeswitch.org
Wed Oct 25 00:47:09 EDT 2006


Author: mikej
Date: Wed Oct 25 00:47:08 2006
New Revision: 3193

Modified:
   freeswitch/trunk/src/switch_ivr.c
   freeswitch/trunk/src/switch_resample.c

Log:
datatype tweaks.

Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c	(original)
+++ freeswitch/trunk/src/switch_ivr.c	Wed Oct 25 00:47:08 2006
@@ -1977,7 +1977,7 @@
 		while ((!caller_channel || switch_channel_ready(caller_channel)) && 
 			   check_channel_status(peer_channels, peer_sessions, and_argc, &idx, file, key)) {
 
-			if ((to = ((time(NULL) - start) >= (time_t)timelimit_sec))) {
+			if ((to = (uint8_t)((time(NULL) - start) >= (time_t)timelimit_sec))) {
 				break;
 			}
 

Modified: freeswitch/trunk/src/switch_resample.c
==============================================================================
--- freeswitch/trunk/src/switch_resample.c	(original)
+++ freeswitch/trunk/src/switch_resample.c	Wed Oct 25 00:47:08 2006
@@ -205,13 +205,13 @@
 
 	if (newrate) {
 		int32_t tmp;
-		int x;
+		uint32_t x;
 		int16_t *fp = data;
 
 		for (x = 0; x < samples; x++) {
-			tmp = (double) div ? fp[x] / newrate : fp[x] * newrate;
+			tmp = (int32_t) (div ? fp[x] / newrate : fp[x] * newrate);
 			switch_normalize_to_16bit(tmp);
-			fp[x] = tmp;
+			fp[x] = (int16_t)tmp;
 		}
 	}
 }



More information about the Freeswitch-svn mailing list