[Freeswitch-svn] [commit] r11563 - in freeswitch/trunk/libs/spandsp: src src/msvc src/spandsp src/spandsp/private tests

FreeSWITCH SVN mikej at freeswitch.org
Fri Jan 30 09:00:50 PST 2009


Author: mikej
Date: Fri Jan 30 11:00:50 2009
New Revision: 11563

Log:
update to snapshot spandsp-20090130

Modified:
   freeswitch/trunk/libs/spandsp/src/Makefile.am
   freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c
   freeswitch/trunk/libs/spandsp/src/dtmf.c
   freeswitch/trunk/libs/spandsp/src/fsk.c
   freeswitch/trunk/libs/spandsp/src/g722.c
   freeswitch/trunk/libs/spandsp/src/hdlc.c
   freeswitch/trunk/libs/spandsp/src/libspandsp.dsp
   freeswitch/trunk/libs/spandsp/src/modem_connect_tones.c
   freeswitch/trunk/libs/spandsp/src/msvc/config.h
   freeswitch/trunk/libs/spandsp/src/sig_tone.c
   freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h
   freeswitch/trunk/libs/spandsp/src/spandsp/private/fsk.h
   freeswitch/trunk/libs/spandsp/src/spandsp/private/g726.h
   freeswitch/trunk/libs/spandsp/src/spandsp/private/modem_connect_tones.h
   freeswitch/trunk/libs/spandsp/src/spandsp/private/sig_tone.h
   freeswitch/trunk/libs/spandsp/src/spandsp/private/t30.h
   freeswitch/trunk/libs/spandsp/src/spandsp/version.h
   freeswitch/trunk/libs/spandsp/src/t30.c
   freeswitch/trunk/libs/spandsp/src/t38_gateway.c
   freeswitch/trunk/libs/spandsp/src/v17rx.c
   freeswitch/trunk/libs/spandsp/src/v27ter_rx.c
   freeswitch/trunk/libs/spandsp/src/v29rx.c
   freeswitch/trunk/libs/spandsp/tests/Makefile.am

Modified: freeswitch/trunk/libs/spandsp/src/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/Makefile.am	(original)
+++ freeswitch/trunk/libs/spandsp/src/Makefile.am	Fri Jan 30 11:00:50 2009
@@ -16,7 +16,7 @@
 ## License along with this program; if not, write to the Free Software
 ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 ##
-## $Id: Makefile.am,v 1.116 2008/12/12 13:18:21 steveu Exp $
+## $Id: Makefile.am,v 1.118 2009/01/30 05:35:18 steveu Exp $
 
 AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
 AM_LDFLAGS = $(COMP_VENDOR_LDFLAGS)
@@ -28,6 +28,7 @@
              libspandsp.dsp \
              libspandsp.sln \
              libspandsp.vcproj \
+             msvc/config.h \
              msvc/gettimeofday.c \
              msvc/inttypes.h \
              msvc/tgmath.h \
@@ -38,7 +39,6 @@
              msvc/msvcproj.foot \
              msvc/vc8proj.head \
              msvc/vc8proj.foot \
-             msvc/config.h \
              spandsp/private/README
 
 INCLUDES = -I$(top_builddir)

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	Fri Jan 30 11:00:50 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.34 2009/01/29 01:41:05 steveu Exp $
+ * $Id: bell_r2_mf.c,v 1.35 2009/01/29 18:30:14 steveu Exp $
  */
 
 /*! \file */
@@ -312,7 +312,7 @@
         if ((len = strlen(digits)) == 0)
             return 0;
     }
-    if ((space = queue_free_space(&s->queue.queue)) < len)
+    if ((space = queue_free_space(&s->queue.queue)) < (size_t) len)
         return len - space;
     if (queue_write(&s->queue.queue, (const uint8_t *) digits, len) >= 0)
         return 0;

Modified: freeswitch/trunk/libs/spandsp/src/dtmf.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/dtmf.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/dtmf.c	Fri Jan 30 11:00:50 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: dtmf.c,v 1.47 2009/01/28 03:41:26 steveu Exp $
+ * $Id: dtmf.c,v 1.48 2009/01/29 18:30:14 steveu Exp $
  */
  
 /*! \file dtmf.h */
@@ -485,7 +485,7 @@
         if ((len = strlen(digits)) == 0)
             return 0;
     }
-    if ((space = queue_free_space(&s->queue.queue)) < len)
+    if ((space = queue_free_space(&s->queue.queue)) < (size_t) len)
         return len - space;
     if (queue_write(&s->queue.queue, (const uint8_t *) digits, len) >= 0)
         return 0;

Modified: freeswitch/trunk/libs/spandsp/src/fsk.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/fsk.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/fsk.c	Fri Jan 30 11:00:50 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: fsk.c,v 1.49 2009/01/28 03:41:26 steveu Exp $
+ * $Id: fsk.c,v 1.50 2009/01/29 18:30:14 steveu Exp $
  */
 
 /*! \file */
@@ -149,7 +149,7 @@
 }
 /*- End of function --------------------------------------------------------*/
 
-int fsk_tx(fsk_tx_state_t *s, int16_t *amp, int len)
+int fsk_tx(fsk_tx_state_t *s, int16_t amp[], int len)
 {
     int sample;
     int bit;

Modified: freeswitch/trunk/libs/spandsp/src/g722.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/g722.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/g722.c	Fri Jan 30 11:00:50 2009
@@ -28,7 +28,7 @@
  * Computer Science, Speech Group
  * Chengxiang Lu and Alex Hauptmann
  *
- * $Id: g722.c,v 1.5 2009/01/28 03:41:26 steveu Exp $
+ * $Id: g722.c,v 1.6 2009/01/29 18:30:14 steveu Exp $
  */
 
 /*! \file */
@@ -204,9 +204,9 @@
     wd32 = ((p ^ s->p[0]) & 0x8000)  ?  wd1  :  -wd1;
     if (wd32 > 32767)
         wd32 = 32767;
-    wd3 = (((p ^ s->p[1]) & 0x8000)  ?  -128  :  128)
-        + (wd32 >> 7)
-        + (((int32_t) s->a[1]*(int32_t) 32512) >> 15);
+    wd3 = (int16_t) ((((p ^ s->p[1]) & 0x8000)  ?  -128  :  128)
+                     + (wd32 >> 7)
+                     + (((int32_t) s->a[1]*(int32_t) 32512) >> 15));
     if (abs(wd3) > 12288)
         wd3 = (wd3 < 0)  ?  -12288  :  12288;
     ap[1] = wd3;
@@ -351,7 +351,7 @@
 
         /* Block 2L, INVQAL */
         wd2 = qm4[wd1];
-        dlow = ((int32_t) s->band[0].det*(int32_t) wd2) >> 15;
+        dlow = (int16_t) (((int32_t) s->band[0].det*(int32_t) wd2) >> 15);
 
         /* Block 3L, LOGSCL */
         wd2 = rl42[wd1];
@@ -361,13 +361,13 @@
             wd1 = 0;
         else if (wd1 > 18432)
             wd1 = 18432;
-        s->band[0].nb = wd1;
+        s->band[0].nb = (int16_t) wd1;
             
         /* Block 3L, SCALEL */
         wd1 = (s->band[0].nb >> 6) & 31;
         wd2 = 8 - (s->band[0].nb >> 11);
         wd3 = (wd2 < 0)  ?  (ilb[wd1] << -wd2)  :  (ilb[wd1] >> wd2);
-        s->band[0].det = wd3 << 2;
+        s->band[0].det = (int16_t) (wd3 << 2);
 
         block4(&s->band[0], dlow);
         
@@ -375,7 +375,7 @@
         {
             /* Block 2H, INVQAH */
             wd2 = qm2[ihigh];
-            dhigh = ((int32_t) s->band[1].det*(int32_t) wd2) >> 15;
+            dhigh = (int16_t) (((int32_t) s->band[1].det*(int32_t) wd2) >> 15);
             /* Block 5H, RECONS */
             /* Block 6H, LIMIT */
             rhigh = saturate15(dhigh + s->band[1].s);
@@ -388,13 +388,13 @@
                 wd1 = 0;
             else if (wd1 > 22528)
                 wd1 = 22528;
-            s->band[1].nb = wd1;
+            s->band[1].nb = (int16_t) wd1;
             
             /* Block 3H, SCALEH */
             wd1 = (s->band[1].nb >> 6) & 31;
             wd2 = 10 - (s->band[1].nb >> 11);
             wd3 = (wd2 < 0)  ?  (ilb[wd1] << -wd2)  :  (ilb[wd1] >> wd2);
-            s->band[1].det = wd3 << 2;
+            s->band[1].det = (int16_t) (wd3 << 2);
 
             block4(&s->band[1], dhigh);
         }
@@ -413,8 +413,8 @@
             else
             {
                 /* Apply the QMF to build the final signal */
-                s->x[s->ptr] = rlow + rhigh;
-                s->y[s->ptr] = rlow - rhigh;
+                s->x[s->ptr] = (int16_t) (rlow + rhigh);
+                s->y[s->ptr] = (int16_t) (rlow - rhigh);
                 if (++s->ptr >= 12)
                     s->ptr = 0;
                 amp[outlen++] = (int16_t) (vec_circular_dot_prodi16(s->y, qmf_coeffs_rev, 12, s->ptr) >> 12);
@@ -509,8 +509,8 @@
                     s->ptr = 0;
                 sumodd = vec_circular_dot_prodi16(s->x, qmf_coeffs_fwd, 12, s->ptr);
                 sumeven = vec_circular_dot_prodi16(s->y, qmf_coeffs_rev, 12, s->ptr);
-                xlow = (sumeven + sumodd) >> 13;
-                xhigh = (sumeven - sumodd) >> 13;
+                xlow = (int16_t) ((sumeven + sumodd) >> 13);
+                xhigh = (int16_t) ((sumeven - sumodd) >> 13);
             }
         }
         /* Block 1L, SUBTRA */
@@ -530,12 +530,12 @@
         /* Block 2L, INVQAL */
         ril = ilow >> 2;
         wd2 = qm4[ril];
-        dlow = ((int32_t) s->band[0].det*(int32_t) wd2) >> 15;
+        dlow = (int16_t) (((int32_t) s->band[0].det*(int32_t) wd2) >> 15);
 
         /* Block 3L, LOGSCL */
         il4 = rl42[ril];
         wd = ((int32_t) s->band[0].nb*(int32_t) 127) >> 7;
-        s->band[0].nb = wd + wl[il4];
+        s->band[0].nb = (int16_t) (wd + wl[il4]);
         if (s->band[0].nb < 0)
             s->band[0].nb = 0;
         else if (s->band[0].nb > 18432)
@@ -545,7 +545,7 @@
         wd1 = (s->band[0].nb >> 6) & 31;
         wd2 = 8 - (s->band[0].nb >> 11);
         wd3 = (wd2 < 0)  ?  (ilb[wd1] << -wd2)  :  (ilb[wd1] >> wd2);
-        s->band[0].det = wd3 << 2;
+        s->band[0].det = (int16_t) (wd3 << 2);
 
         block4(&s->band[0], dlow);
         
@@ -567,12 +567,12 @@
 
             /* Block 2H, INVQAH */
             wd2 = qm2[ihigh];
-            dhigh = ((int32_t) s->band[1].det*(int32_t) wd2) >> 15;
+            dhigh = (int16_t) (((int32_t) s->band[1].det*(int32_t) wd2) >> 15);
 
             /* Block 3H, LOGSCH */
             ih2 = rh2[ihigh];
             wd = ((int32_t) s->band[1].nb*(int32_t) 127) >> 7;
-            s->band[1].nb = wd + wh[ih2];
+            s->band[1].nb = (int16_t) (wd + wh[ih2]);
             if (s->band[1].nb < 0)
                 s->band[1].nb = 0;
             else if (s->band[1].nb > 22528)
@@ -582,7 +582,7 @@
             wd1 = (s->band[1].nb >> 6) & 31;
             wd2 = 10 - (s->band[1].nb >> 11);
             wd3 = (wd2 < 0)  ?  (ilb[wd1] << -wd2)  :  (ilb[wd1] >> wd2);
-            s->band[1].det = wd3 << 2;
+            s->band[1].det = (int16_t) (wd3 << 2);
 
             block4(&s->band[1], dhigh);
             code = ((ihigh << 6) | ilow) >> (8 - s->bits_per_sample);

Modified: freeswitch/trunk/libs/spandsp/src/hdlc.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/hdlc.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/hdlc.c	Fri Jan 30 11:00:50 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: hdlc.c,v 1.64 2009/01/05 13:48:31 steveu Exp $
+ * $Id: hdlc.c,v 1.66 2009/01/30 07:19:25 steveu Exp $
  */
 
 /*! \file */
@@ -527,16 +527,16 @@
 
 int hdlc_tx_get(hdlc_tx_state_t *s, uint8_t buf[], size_t max_len)
 {
-    int i;
+    size_t i;
     int x;
 
     for (i = 0;  i < max_len;  i++)
     {
         if ((x = hdlc_tx_get_byte(s)) == SIG_STATUS_END_OF_DATA)
             return i;
-        buf[i] = x;
+        buf[i] = (uint8_t) x;
     }
-    return i;
+    return (int) i;
 }
 /*- End of function --------------------------------------------------------*/
 

Modified: freeswitch/trunk/libs/spandsp/src/libspandsp.dsp
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/libspandsp.dsp	(original)
+++ freeswitch/trunk/libs/spandsp/src/libspandsp.dsp	Fri Jan 30 11:00:50 2009
@@ -397,7 +397,7 @@
 # End Source File
 # Begin Source File
 
-SOURCE=.\msvc/gettimeofday.c
+SOURCE=.\.\msvc\gettimeofday.c
 # End Source File
 # End Group
 # Begin Group "Header Files"

Modified: freeswitch/trunk/libs/spandsp/src/modem_connect_tones.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/modem_connect_tones.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/modem_connect_tones.c	Fri Jan 30 11:00:50 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: modem_connect_tones.c,v 1.31 2009/01/28 03:41:27 steveu Exp $
+ * $Id: modem_connect_tones.c,v 1.32 2009/01/29 18:30:14 steveu Exp $
  */
  
 /*! \file */
@@ -90,7 +90,7 @@
                            int16_t amp[],
                            int len)
 {
-    int mod;
+    int16_t mod;
     int i;
     int xlen;
 
@@ -165,7 +165,7 @@
         }
         for (  ;  i < len;  i++)
         {
-            mod = s->level + dds_mod(&s->mod_phase, s->mod_phase_rate, s->mod_level, 0);
+            mod = (int16_t) (s->level + dds_mod(&s->mod_phase, s->mod_phase_rate, s->mod_level, 0));
             amp[i] = dds_mod(&s->tone_phase, s->tone_phase_rate, mod, 0);
         }
         s->duration_timer -= len;
@@ -186,7 +186,7 @@
                 s->hop_timer = ms_to_samples(450);
                 s->tone_phase += 0x80000000;
             }
-            mod = s->level + dds_mod(&s->mod_phase, s->mod_phase_rate, s->mod_level, 0);
+            mod = (int16_t) (s->level + dds_mod(&s->mod_phase, s->mod_phase_rate, s->mod_level, 0));
             amp[i] = dds_mod(&s->tone_phase, s->tone_phase_rate, mod, 0);
         }
         s->duration_timer -= len;

Modified: freeswitch/trunk/libs/spandsp/src/msvc/config.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/msvc/config.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/msvc/config.h	Fri Jan 30 11:00:50 2009
@@ -10,10 +10,11 @@
  *
  * This file is released in the public domain.
  *
+ * $Id: config.h,v 1.1 2009/01/29 18:30:14 steveu Exp $
  */
 
-#if !defined(_SPANDSP_CONFIG_H_)
-#define _SPANDSP_CONFIG_H_
+#if !defined(_MSVC_CONFIG_H_)
+#define _MSVC_CONFIG_H_
 
 #define HAVE_SINF
 #define HAVE_COSF

Modified: freeswitch/trunk/libs/spandsp/src/sig_tone.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/sig_tone.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/sig_tone.c	Fri Jan 30 11:00:50 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: sig_tone.c,v 1.28 2009/01/28 03:41:27 steveu Exp $
+ * $Id: sig_tone.c,v 1.29 2009/01/30 07:19:25 steveu Exp $
  */
 
 /*! \file */
@@ -457,7 +457,7 @@
                this isn't used in low tone detect mode, but we must keep notch_zl
                rolling along. */
             s->tone[j].notch_zl = ((s->tone[j].notch_zl*s->desc->notch_slugi) >> 15)
-                                + ((abs(notched_signal)*s->desc->notch_slugp) >> 15);
+                                + ((abs((int) notched_signal)*s->desc->notch_slugp) >> 15);
             /* Mow the grass to weed out the noise! */
             mown_notch[j] = s->tone[0].notch_zl & s->desc->notch_threshold;
         }
@@ -505,7 +505,7 @@
 #endif            
             /* Leaky integrate the bandpassed data */
             s->broad_zl = ((s->broad_zl*s->desc->broad_slugi) >> 15)
-                        + ((abs(bandpass_signal)*s->desc->broad_slugp) >> 15);
+                        + ((abs((int) bandpass_signal)*s->desc->broad_slugp) >> 15);
     
             /* For the broad band receiver we use a simple linear threshold! */
             if (s->tone_present)
@@ -557,7 +557,7 @@
 
             /* Modulus and leaky integrate the data */
             s->broad_zl = ((s->broad_zl*s->desc->unfiltered_slugi) >> 15)
-                        + ((abs(amp[i])*s->desc->unfiltered_slugp) >> 15);
+                        + ((abs((int) amp[i])*s->desc->unfiltered_slugp) >> 15);
      
             /* Mow the grass to weed out the noise! */
             mown_bandpass = s->broad_zl & s->desc->unfiltered_threshold;

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h	Fri Jan 30 11:00:50 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: fsk.h,v 1.32 2008/10/13 13:14:00 steveu Exp $
+ * $Id: fsk.h,v 1.33 2009/01/29 18:30:14 steveu Exp $
  */
 
 /*! \file */
@@ -170,7 +170,7 @@
     \param len The number of samples to be generated.
     \return The number of samples actually generated.
 */
-int fsk_tx(fsk_tx_state_t *s, int16_t *amp, int len);
+int fsk_tx(fsk_tx_state_t *s, int16_t amp[], int len);
 
 /*! Get the current received signal power.
     \param s The modem context.

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/private/fsk.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/private/fsk.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/private/fsk.h	Fri Jan 30 11:00:50 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: fsk.h,v 1.1 2008/10/13 13:14:01 steveu Exp $
+ * $Id: fsk.h,v 1.2 2009/01/29 18:30:14 steveu Exp $
  */
 
 #if !defined(_SPANDSP_PRIVATE_FSK_H_)
@@ -46,7 +46,7 @@
     void *status_user_data;
 
     int32_t phase_rates[2];
-    int scaling;
+    int16_t scaling;
     int32_t current_phase_rate;
     uint32_t phase_acc;
     int baud_frac;

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/private/g726.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/private/g726.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/private/g726.h	Fri Jan 30 11:00:50 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: g726.h,v 1.2 2008/11/16 12:20:57 steveu Exp $
+ * $Id: g726.h,v 1.3 2009/01/29 18:30:14 steveu Exp $
  */
 
 #if !defined(_SPANDSP_PRIVATE_G726_H_)
@@ -44,7 +44,7 @@
     /*! The external coding, for tandem operation */
     int ext_coding;
     /*! The number of bits per sample */
-    unsigned int bits_per_sample;
+    int bits_per_sample;
     /*! One of the G.726_PACKING_xxx options */
     int packing;
 

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/private/modem_connect_tones.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/private/modem_connect_tones.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/private/modem_connect_tones.h	Fri Jan 30 11:00:50 2009
@@ -24,7 +24,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: modem_connect_tones.h,v 1.1 2008/10/13 13:14:01 steveu Exp $
+ * $Id: modem_connect_tones.h,v 1.2 2009/01/29 18:30:14 steveu Exp $
  */
  
 /*! \file */
@@ -42,14 +42,14 @@
 
     int32_t tone_phase_rate;
     uint32_t tone_phase;
-    int level;
+    int16_t level;
     /*! \brief Countdown to the next phase hop */
     int hop_timer;
     /*! \brief Maximum duration timer */
     int duration_timer;
     uint32_t mod_phase;
     int32_t mod_phase_rate;
-    int mod_level;
+    int16_t mod_level;
 };
 
 /*!

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/private/sig_tone.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/private/sig_tone.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/private/sig_tone.h	Fri Jan 30 11:00:50 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: sig_tone.h,v 1.1 2008/11/30 13:08:42 steveu Exp $
+ * $Id: sig_tone.h,v 1.2 2009/01/30 07:19:25 steveu Exp $
  */
 
 #if !defined(_SPANDSP_PRIVATE_SIG_TONE_H_)
@@ -121,7 +121,7 @@
     sig_tone_descriptor_t *desc;
 
     /*! The scaling values for the high and low level tones */
-    int32_t tone_scaling[2];
+    int16_t tone_scaling[2];
     /*! The sample timer, used to switch between the high and low level tones. */
     int high_low_timer;
 

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/private/t30.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/private/t30.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/private/t30.h	Fri Jan 30 11:00:50 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.h,v 1.2 2009/01/03 13:02:31 steveu Exp $
+ * $Id: t30.h,v 1.3 2009/01/29 18:30:14 steveu Exp $
  */
 
 /*! \file */
@@ -236,7 +236,8 @@
         partial pages still to come. */
     int ecm_at_page_end;
     int next_tx_step;
-    int next_rx_step;
+    /* The FCF for the next receive step */
+    uint8_t next_rx_step;
     /*! \brief Image file name for image reception. */
     char rx_file[256];
     /*! \brief The last page we are prepared accept for a received image file. -1 means no restriction. */
@@ -264,7 +265,7 @@
     int ecm_allowed;
     
     /*! \brief the FCF2 field of the last PPS message we received. */
-    int last_pps_fcf2;
+    uint8_t last_pps_fcf2;
     /*! \brief The number of the first ECM frame which we do not currently received correctly. For
         a partial page received correctly, this will be one greater than the number of frames it
         contains. */

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	Fri Jan 30 11:00:50 2009
@@ -30,8 +30,8 @@
 
 /* The date and time of the version are in UTC form. */
 
-#define SPANDSP_RELEASE_DATE    20090129
-#define SPANDSP_RELEASE_TIME    014346
+#define SPANDSP_RELEASE_DATE    20090130
+#define SPANDSP_RELEASE_TIME    102456
 
 #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	Fri Jan 30 11:00:50 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.279 2009/01/29 01:41:06 steveu Exp $
+ * $Id: t30.c,v 1.280 2009/01/29 18:30:14 steveu Exp $
  */
 
 /*! \file */
@@ -568,7 +568,7 @@
 }
 /*- End of function --------------------------------------------------------*/
 
-static int check_next_tx_step(t30_state_t *s)
+static uint8_t check_next_tx_step(t30_state_t *s)
 {
     int more;
 
@@ -3107,7 +3107,7 @@
 
 static void process_state_f_doc_ecm(t30_state_t *s, const uint8_t *msg, int len)
 {
-    int fcf2;
+    uint8_t fcf2;
     
     /* This actually handles 2 states - _DOC_ECM and _POST_DOC_ECM - as they are very similar */
     switch (msg[2] & 0xFE)

Modified: freeswitch/trunk/libs/spandsp/src/t38_gateway.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t38_gateway.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/t38_gateway.c	Fri Jan 30 11:00:50 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: t38_gateway.c,v 1.151 2009/01/28 03:41:27 steveu Exp $
+ * $Id: t38_gateway.c,v 1.152 2009/01/29 18:30:14 steveu Exp $
  */
 
 /*! \file */
@@ -1605,7 +1605,7 @@
     if (s->bit_no)
     {
         /* There is a fractional octet in progress. We might as well send every last bit we can. */
-        s->data[s->data_ptr++] = s->bit_stream << (8 - s->bit_no);
+        s->data[s->data_ptr++] = (uint8_t) (s->bit_stream << (8 - s->bit_no));
     }
     t38_core_send_data(&t->t38x.t38, t->t38x.current_tx_data_type, T38_FIELD_T4_NON_ECM_SIG_END, s->data, s->data_ptr, t->t38x.t38.data_end_tx_count);
     s->out_octets += s->data_ptr;

Modified: freeswitch/trunk/libs/spandsp/src/v17rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v17rx.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/v17rx.c	Fri Jan 30 11:00:50 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.130 2009/01/29 01:41:06 steveu Exp $
+ * $Id: v17rx.c,v 1.131 2009/01/30 10:22:23 steveu Exp $
  */
 
 /*! \file */
@@ -960,7 +960,7 @@
     int i;
     int step;
     int16_t x;
-    int32_t diff;
+    int16_t diff;
     complexf_t z;
     complexf_t zz;
     complexf_t sample;
@@ -984,7 +984,8 @@
            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 = (int32_t) x - s->last_sample;
+        /* There could be oveflow here, but it isn't a problem in practice */
+        diff = 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	Fri Jan 30 11:00:50 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.114 2009/01/29 01:41:06 steveu Exp $
+ * $Id: v27ter_rx.c,v 1.115 2009/01/30 10:22:23 steveu Exp $
  */
 
 /*! \file */
@@ -746,7 +746,7 @@
     int i;
     int step;
     int16_t x;
-    int32_t diff;
+    int16_t diff;
 #if defined(SPANDSP_USE_FIXED_POINT)
     complexi16_t z;
     complexi16_t zz;
@@ -772,7 +772,8 @@
                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 = (int32_t) x - s->last_sample;
+            /* There could be oveflow here, but it isn't a problem in practice */
+            diff = x - s->last_sample;
             power = power_meter_update(&(s->power), diff);
 #if defined(IAXMODEM_STUFF)
             /* Quick power drop fudge */
@@ -893,6 +894,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;
+            /* There could be oveflow here, but it isn't a problem in practice */
             diff = x - s->last_sample;
             power = power_meter_update(&(s->power), diff);
 #if defined(IAXMODEM_STUFF)

Modified: freeswitch/trunk/libs/spandsp/src/v29rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v29rx.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/v29rx.c	Fri Jan 30 11:00:50 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.151 2009/01/29 01:41:06 steveu Exp $
+ * $Id: v29rx.c,v 1.152 2009/01/30 10:22:23 steveu Exp $
  */
 
 /*! \file */
@@ -834,7 +834,7 @@
     int i;
     int step;
     int16_t x;
-    int32_t diff;
+    int16_t diff;
 #if defined(SPANDSP_USE_FIXED_POINT)
     complexi16_t z;
     complexi16_t zz;
@@ -858,7 +858,8 @@
            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 = (int32_t) x - s->last_sample;
+        /* There could be oveflow here, but it isn't a problem in practice */
+        diff = x - s->last_sample;
         power = power_meter_update(&(s->power), diff);
 #if defined(IAXMODEM_STUFF)
         /* Quick power drop fudge */

Modified: freeswitch/trunk/libs/spandsp/tests/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/Makefile.am	(original)
+++ freeswitch/trunk/libs/spandsp/tests/Makefile.am	Fri Jan 30 11:00:50 2009
@@ -16,7 +16,7 @@
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 ##
-## $Id: Makefile.am,v 1.108 2008/11/30 10:17:31 steveu Exp $
+## $Id: Makefile.am,v 1.109 2009/01/30 05:35:18 steveu Exp $
 
 AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
 AM_LDFLAGS = $(COMP_VENDOR_LDFLAGS)
@@ -64,9 +64,9 @@
                     line_model_tests \
                     logging_tests \
                     lpc10_tests \
+                    make_g168_css \
                     modem_connect_tones_tests \
                     modem_echo_tests \
-                    make_g168_css \
                     noise_tests \
                     oki_adpcm_tests \
                     playout_tests \



More information about the Freeswitch-svn mailing list