[Freeswitch-svn] [commit] r11548 - in freeswitch/trunk/libs/spandsp/src: . msvc spandsp

FreeSWITCH SVN mikej at freeswitch.org
Wed Jan 28 20:00:34 PST 2009


Author: mikej
Date: Wed Jan 28 22:00:33 2009
New Revision: 11548

Log:
update to snapshot spandsp-20090129

Modified:
   freeswitch/trunk/libs/spandsp/src/adsi.c
   freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c
   freeswitch/trunk/libs/spandsp/src/dds_int.c
   freeswitch/trunk/libs/spandsp/src/floating_fudge.h
   freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj
   freeswitch/trunk/libs/spandsp/src/msvc/spandsp.def
   freeswitch/trunk/libs/spandsp/src/msvc/vc8proj.head
   freeswitch/trunk/libs/spandsp/src/queue.c
   freeswitch/trunk/libs/spandsp/src/spandsp/dds.h
   freeswitch/trunk/libs/spandsp/src/spandsp/t38_core.h
   freeswitch/trunk/libs/spandsp/src/spandsp/version.h
   freeswitch/trunk/libs/spandsp/src/t30.c
   freeswitch/trunk/libs/spandsp/src/t31.c
   freeswitch/trunk/libs/spandsp/src/t38_terminal.c
   freeswitch/trunk/libs/spandsp/src/time_scale.c
   freeswitch/trunk/libs/spandsp/src/v17rx.c
   freeswitch/trunk/libs/spandsp/src/v27ter_rx.c
   freeswitch/trunk/libs/spandsp/src/v29rx.c

Modified: freeswitch/trunk/libs/spandsp/src/adsi.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/adsi.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/adsi.c	Wed Jan 28 22:00:33 2009
@@ -23,7 +23,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: adsi.c,v 1.67 2009/01/28 03:41:26 steveu Exp $
+ * $Id: adsi.c,v 1.68 2009/01/29 01:41:05 steveu Exp $
  */
 
 /*! \file */
@@ -1045,7 +1045,7 @@
             if (field_type != CLIP_DTMF_HASH_UNSPECIFIED)
                 msg[len++] = field_type;
             memcpy(msg + len, field_body, field_len);
-            msg[len + field_len] = x;
+            msg[len + field_len] = (uint8_t) x;
             len += (field_len + 1);
         }
         break;

Modified: freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c	Wed Jan 28 22:00:33 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: bell_r2_mf.c,v 1.33 2009/01/28 03:41:26 steveu Exp $
+ * $Id: bell_r2_mf.c,v 1.34 2009/01/29 01:41:05 steveu Exp $
  */
 
 /*! \file */
@@ -628,7 +628,7 @@
     if (!initialised)
     {
         for (i = 0;  i < 6;  i++)
-            make_goertzel_descriptor(&bell_mf_detect_desc[i], bell_mf_frequencies[i], BELL_MF_SAMPLES_PER_BLOCK);
+            make_goertzel_descriptor(&bell_mf_detect_desc[i], (float) bell_mf_frequencies[i], BELL_MF_SAMPLES_PER_BLOCK);
         initialised = TRUE;
     }
     s->digits_callback = callback;
@@ -805,8 +805,8 @@
     {
         for (i = 0;  i < 6;  i++)
         {
-            make_goertzel_descriptor(&mf_fwd_detect_desc[i], r2_mf_fwd_frequencies[i], R2_MF_SAMPLES_PER_BLOCK);
-            make_goertzel_descriptor(&mf_back_detect_desc[i], r2_mf_back_frequencies[i], R2_MF_SAMPLES_PER_BLOCK);
+            make_goertzel_descriptor(&mf_fwd_detect_desc[i], (float) r2_mf_fwd_frequencies[i], R2_MF_SAMPLES_PER_BLOCK);
+            make_goertzel_descriptor(&mf_back_detect_desc[i], (float) r2_mf_back_frequencies[i], R2_MF_SAMPLES_PER_BLOCK);
         }
         initialised = TRUE;
     }

Modified: freeswitch/trunk/libs/spandsp/src/dds_int.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/dds_int.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/dds_int.c	Wed Jan 28 22:00:33 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: dds_int.c,v 1.13 2009/01/28 03:41:26 steveu Exp $
+ * $Id: dds_int.c,v 1.14 2009/01/29 01:41:05 steveu Exp $
  */
 
 /*! \file */
@@ -202,15 +202,15 @@
 }
 /*- End of function --------------------------------------------------------*/
 
-int dds_scaling_dbm0(float level)
+int16_t dds_scaling_dbm0(float level)
 {
-    return (int) (powf(10.0f, (level - DBM0_MAX_SINE_POWER)/20.0f)*32767.0f);
+    return (int16_t) (powf(10.0f, (level - DBM0_MAX_SINE_POWER)/20.0f)*32767.0f);
 }
 /*- End of function --------------------------------------------------------*/
 
-int dds_scaling_dbov(float level)
+int16_t dds_scaling_dbov(float level)
 {
-    return (int) (powf(10.0f, (level - DBOV_MAX_SINE_POWER)/20.0f)*32767.0f);
+    return (int16_t) (powf(10.0f, (level - DBOV_MAX_SINE_POWER)/20.0f)*32767.0f);
 }
 /*- End of function --------------------------------------------------------*/
 

Modified: freeswitch/trunk/libs/spandsp/src/floating_fudge.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/floating_fudge.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/floating_fudge.h	Wed Jan 28 22:00:33 2009
@@ -25,7 +25,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: floating_fudge.h,v 1.5 2008/08/03 03:44:00 steveu Exp $
+ * $Id: floating_fudge.h,v 1.6 2009/01/29 01:41:05 steveu Exp $
  */
 
 #if !defined(_FLOATING_FUDGE_H_)
@@ -354,6 +354,23 @@
         return i;
     }
 
+    __inline float rintf(float flt)
+    {
+    	_asm
+    	{	fld flt
+    		frndint
+    	}
+    }
+
+    __inline double rint(double dbl)
+    {
+        __asm 
+    	{
+            fld dbl
+            frndint
+        }
+    }
+
     __inline long int lfastrint(double x)
     {
         long int i;

Modified: freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj	(original)
+++ freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj	Wed Jan 28 22:00:33 2009
@@ -42,7 +42,7 @@
 				Name="VCCLCompilerTool"
 				Optimization="0"
 				AdditionalIncludeDirectories="src; src\spandsp; src\msvc;..\libtiff\include"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_MATH_H;HAVE_TGMATH_H"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -51,6 +51,7 @@
 				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="4"
 				CompileAs="1"
+				DisableSpecificWarnings="4127"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -119,12 +120,13 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				AdditionalIncludeDirectories="src; src\spandsp; src\msvc;..\libtiff\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_MATH_H;HAVE_TGMATH_H"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
 				WarningLevel="4"
 				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="3"
+				DisableSpecificWarnings="4127"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"

Modified: freeswitch/trunk/libs/spandsp/src/msvc/spandsp.def
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/msvc/spandsp.def	(original)
+++ freeswitch/trunk/libs/spandsp/src/msvc/spandsp.def	Wed Jan 28 22:00:33 2009
@@ -42,7 +42,6 @@
 echo_can_update
 fax_rx
 fax_tx
-fax_set_flush_handler
 fax_init
 fax_release
 fsk_tx_init
@@ -119,7 +118,8 @@
 queue_write
 queue_read_msg
 queue_write_msg
-sig_tone_init
+sig_tone_rx_init
+sig_tone_tx_init
 sig_tone_rx
 sig_tone_tx
 super_tone_rx_make_descriptor

Modified: freeswitch/trunk/libs/spandsp/src/msvc/vc8proj.head
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/msvc/vc8proj.head	(original)
+++ freeswitch/trunk/libs/spandsp/src/msvc/vc8proj.head	Wed Jan 28 22:00:33 2009
@@ -42,7 +42,7 @@
 				Name="VCCLCompilerTool"
 				Optimization="0"
 				AdditionalIncludeDirectories="src; src\spandsp; src\msvc;..\libtiff\include"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_MATH_H;HAVE_TGMATH_H"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -51,6 +51,7 @@
 				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="4"
 				CompileAs="1"
+				DisableSpecificWarnings="4127"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -119,12 +120,13 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				AdditionalIncludeDirectories="src; src\spandsp; src\msvc;..\libtiff\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_MATH_H;HAVE_TGMATH_H"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H"
 				RuntimeLibrary="2"
 				UsePrecompiledHeader="0"
 				WarningLevel="4"
 				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="3"
+				DisableSpecificWarnings="4127"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"

Modified: freeswitch/trunk/libs/spandsp/src/queue.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/queue.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/queue.c	Wed Jan 28 22:00:33 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: queue.c,v 1.25 2009/01/05 13:48:31 steveu Exp $
+ * $Id: queue.c,v 1.26 2009/01/29 01:41:06 steveu Exp $
  */
 
 /*! \file */
@@ -351,10 +351,10 @@
     if ((real_len = optr - iptr - 1) < 0)
         real_len += s->len;
     /*endif*/
-    if (real_len < len + sizeof(uint16_t))
+    if (real_len < len + (int) sizeof(uint16_t))
         return -1;
     /*endif*/
-    real_len = len + sizeof(uint16_t);
+    real_len = len + (int) sizeof(uint16_t);
 
     to_end = s->len - iptr;
     lenx = (uint16_t) len;

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/dds.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/dds.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/dds.h	Wed Jan 28 22:00:33 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: dds.h,v 1.21 2008/09/11 15:13:42 steveu Exp $
+ * $Id: dds.h,v 1.22 2009/01/29 01:41:06 steveu Exp $
  */
 
 /*! \file */
@@ -51,13 +51,13 @@
     \param level The desired signal level, in dBm0.
     \return The scaling factor.
 */
-int dds_scaling_dbm0(float level);
+int16_t dds_scaling_dbm0(float level);
 
 /*! \brief Find the scaling factor needed to achieve a specified level in dBmov.
     \param level The desired signal level, in dBmov.
     \return The scaling factor.
 */
-int dds_scaling_dbov(float level);
+int16_t dds_scaling_dbov(float level);
 
 /*! \brief Find the amplitude for a particular phase.
     \param phase The desired phase 32 bit phase.

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t38_core.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t38_core.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t38_core.h	Wed Jan 28 22:00:33 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t38_core.h,v 1.33 2009/01/23 16:07:14 steveu Exp $
+ * $Id: t38_core.h,v 1.34 2009/01/29 01:41:06 steveu Exp $
  */
 
 /*! \file */
@@ -333,7 +333,7 @@
                                 t38_rx_data_handler_t *rx_data_handler,
                                 t38_rx_missing_handler_t *rx_missing_handler,
                                 void *rx_user_data,
-                                t38_tx_packet_handler_t tx_packet_handler,
+                                t38_tx_packet_handler_t *tx_packet_handler,
                                 void *tx_packet_user_data);
 
 #if defined(__cplusplus)

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/version.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/version.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/version.h	Wed Jan 28 22:00:33 2009
@@ -30,8 +30,8 @@
 
 /* The date and time of the version are in UTC form. */
 
-#define SPANDSP_RELEASE_DATE    20090128
-#define SPANDSP_RELEASE_TIME    034417
+#define SPANDSP_RELEASE_DATE    20090129
+#define SPANDSP_RELEASE_TIME    014346
 
 #endif
 /*- End of file ------------------------------------------------------------*/

Modified: freeswitch/trunk/libs/spandsp/src/t30.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t30.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/t30.c	Wed Jan 28 22:00:33 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t30.c,v 1.278 2009/01/28 03:41:27 steveu Exp $
+ * $Id: t30.c,v 1.279 2009/01/29 01:41:06 steveu Exp $
  */
 
 /*! \file */
@@ -628,7 +628,7 @@
             s->ecm_at_page_end = TRUE;
             return i;
         }
-        s->ecm_len[i] = (int16_t) 4 + len;
+        s->ecm_len[i] = (int16_t) (4 + len);
     }
     /* We filled the entire buffer */
     s->ecm_frames = 256;

Modified: freeswitch/trunk/libs/spandsp/src/t31.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t31.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/t31.c	Wed Jan 28 22:00:33 2009
@@ -25,7 +25,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t31.c,v 1.136 2009/01/28 03:41:27 steveu Exp $
+ * $Id: t31.c,v 1.137 2009/01/29 01:41:06 steveu Exp $
  */
 
 /*! \file */
@@ -373,7 +373,7 @@
     t31_state_t *s;
     t31_t38_front_end_state_t *fe;
 #if defined(_MSC_VER)
-    uint8_t *buf2 = (uint8_t *) alloca(len);
+    uint8_t *buf2 = (uint8_t *) _alloca(len);
 #else
     uint8_t buf2[len];
 #endif
@@ -1444,7 +1444,7 @@
     s->hdlc_tx.len = 0;
     s->dled = FALSE;
     fsk_rx_init(&(s->audio.modems.v21_rx), &preset_fsk_specs[FSK_V21CH2], TRUE, (put_bit_func_t) hdlc_rx_put_bit, &(s->audio.modems.hdlc_rx));
-    fsk_rx_signal_cutoff(&(s->audio.modems.v21_rx), -39.09);
+    fsk_rx_signal_cutoff(&(s->audio.modems.v21_rx), -39.09f);
     s->at_state.transmit = TRUE;
 }
 /*- End of function --------------------------------------------------------*/
@@ -2233,7 +2233,7 @@
     hdlc_rx_init(&s->hdlc_rx, FALSE, TRUE, HDLC_FRAMING_OK_THRESHOLD, hdlc_accept_frame, user_data);
     hdlc_tx_init(&s->hdlc_tx, FALSE, 2, FALSE, hdlc_tx_underflow, user_data);
     fsk_rx_init(&s->v21_rx, &preset_fsk_specs[FSK_V21CH2], TRUE, (put_bit_func_t) hdlc_rx_put_bit, &s->hdlc_rx);
-    fsk_rx_signal_cutoff(&s->v21_rx, -39.09);
+    fsk_rx_signal_cutoff(&s->v21_rx, -39.09f);
     fsk_tx_init(&s->v21_tx, &preset_fsk_specs[FSK_V21CH2], (get_bit_func_t) hdlc_tx_get_bit, &s->hdlc_tx);
     v17_rx_init(&s->v17_rx, 14400, non_ecm_put_bit, user_data);
     v17_tx_init(&s->v17_tx, 14400, s->use_tep, non_ecm_get_bit, user_data);

Modified: freeswitch/trunk/libs/spandsp/src/t38_terminal.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t38_terminal.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/t38_terminal.c	Wed Jan 28 22:00:33 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t38_terminal.c,v 1.119 2009/01/28 03:41:27 steveu Exp $
+ * $Id: t38_terminal.c,v 1.120 2009/01/29 01:41:06 steveu Exp $
  */
 
 /*! \file */
@@ -278,7 +278,7 @@
     t38_terminal_state_t *s;
     t38_terminal_front_end_state_t *fe;
 #if defined(_MSC_VER)
-    uint8_t *buf2 = (uint8_t *) alloca(len);
+    uint8_t *buf2 = (uint8_t *) _alloca(len);
 #else
     uint8_t buf2[len];
 #endif

Modified: freeswitch/trunk/libs/spandsp/src/time_scale.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/time_scale.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/time_scale.c	Wed Jan 28 22:00:33 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: time_scale.c,v 1.27 2009/01/28 03:41:27 steveu Exp $
+ * $Id: time_scale.c,v 1.28 2009/01/29 01:41:06 steveu Exp $
  */
 
 /*! \file */
@@ -274,7 +274,7 @@
 
 int time_scale_max_output_len(time_scale_state_t *s, int input_len)
 {
-    return input_len*s->playout_rate + s->min_pitch + 1;
+    return (int) (input_len*s->playout_rate + s->min_pitch + 1);
 }
 /*- End of function --------------------------------------------------------*/
 /*- End of file ------------------------------------------------------------*/

Modified: freeswitch/trunk/libs/spandsp/src/v17rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v17rx.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/v17rx.c	Wed Jan 28 22:00:33 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v17rx.c,v 1.129 2009/01/28 03:41:27 steveu Exp $
+ * $Id: v17rx.c,v 1.130 2009/01/29 01:41:06 steveu Exp $
  */
 
 /*! \file */
@@ -984,7 +984,7 @@
            We need to measure the power with the DC blocked, but not using
            a slow to respond DC blocker. Use the most elementary HPF. */
         x = amp[i] >> 1;
-        diff = x - s->last_sample;
+        diff = (int32_t) x - s->last_sample;
         power = power_meter_update(&(s->power), diff);
 #if defined(IAXMODEM_STUFF)
         /* Quick power drop fudge */

Modified: freeswitch/trunk/libs/spandsp/src/v27ter_rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v27ter_rx.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/v27ter_rx.c	Wed Jan 28 22:00:33 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v27ter_rx.c,v 1.113 2009/01/28 03:41:27 steveu Exp $
+ * $Id: v27ter_rx.c,v 1.114 2009/01/29 01:41:06 steveu Exp $
  */
 
 /*! \file */
@@ -772,7 +772,7 @@
                We need to measure the power with the DC blocked, but not using
                a slow to respond DC blocker. Use the most elementary HPF. */
             x = amp[i] >> 1;
-            diff = x - s->last_sample;
+            diff = (int32_t) x - s->last_sample;
             power = power_meter_update(&(s->power), diff);
 #if defined(IAXMODEM_STUFF)
             /* Quick power drop fudge */

Modified: freeswitch/trunk/libs/spandsp/src/v29rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v29rx.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/v29rx.c	Wed Jan 28 22:00:33 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v29rx.c,v 1.150 2009/01/28 03:41:27 steveu Exp $
+ * $Id: v29rx.c,v 1.151 2009/01/29 01:41:06 steveu Exp $
  */
 
 /*! \file */
@@ -858,7 +858,7 @@
            We need to measure the power with the DC blocked, but not using
            a slow to respond DC blocker. Use the most elementary HPF. */
         x = amp[i] >> 1;
-        diff = x - s->last_sample;
+        diff = (int32_t) x - s->last_sample;
         power = power_meter_update(&(s->power), diff);
 #if defined(IAXMODEM_STUFF)
         /* Quick power drop fudge */



More information about the Freeswitch-svn mailing list