]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update to snapshot spandsp-20090130
authorMichael Jerris <mike@jerris.com>
Fri, 30 Jan 2009 17:00:50 +0000 (17:00 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 30 Jan 2009 17:00:50 +0000 (17:00 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11563 d0543943-73ff-0310-b7d9-9358b9ac24b2

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

index cb5b772eb2276e13ef051f51ecb89a5158eda2a4..1e99f8d4d8d98ad10df43d2add277a352bdc0b7d 100644 (file)
@@ -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 @@ EXTRA_DIST = floating_fudge.h \
              libspandsp.dsp \
              libspandsp.sln \
              libspandsp.vcproj \
+             msvc/config.h \
              msvc/gettimeofday.c \
              msvc/inttypes.h \
              msvc/tgmath.h \
@@ -38,7 +39,6 @@ EXTRA_DIST = floating_fudge.h \
              msvc/msvcproj.foot \
              msvc/vc8proj.head \
              msvc/vc8proj.foot \
-             msvc/config.h \
              spandsp/private/README
 
 INCLUDES = -I$(top_builddir)
index e5f613b4b8cce2918e92ec2280c283b3e11a251a..74f4638c77c19a661dcdbe77d376de623c364664 100644 (file)
@@ -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 @@ size_t bell_mf_tx_put(bell_mf_tx_state_t *s, const char *digits, int len)
         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;
index 45b0b5ee908c0c60e8731de40a75f7d4e5d83c3f..566da43fab1c6d3c1403eee119b13802488f39c9 100644 (file)
@@ -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 @@ size_t dtmf_tx_put(dtmf_tx_state_t *s, const char *digits, int len)
         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;
index c46e35687fba28f00877dc6608df048c80bc2a37..06612a5f500ed653667bf7258ff2a9e04d61ff08 100644 (file)
@@ -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 @@ fsk_tx_state_t *fsk_tx_init(fsk_tx_state_t *s,
 }
 /*- 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;
index 197dcab48e3d25b6875b68d8bab690fb1b7a9a37..1ab1f80275cbd486f6b038f0e66da4b3d7182136 100644 (file)
@@ -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 @@ static void block4(g722_band_t *s, int16_t dx)
     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 @@ int g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[]
 
         /* 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 @@ int g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[]
             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 @@ int g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[]
         {
             /* 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 @@ int g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[]
                 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 @@ int g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[]
             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 @@ int g722_encode(g722_encode_state_t *s, uint8_t g722_data[], const int16_t amp[]
                     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 @@ int g722_encode(g722_encode_state_t *s, uint8_t g722_data[], const int16_t amp[]
         /* 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 @@ int g722_encode(g722_encode_state_t *s, uint8_t g722_data[], const int16_t amp[]
         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 @@ int g722_encode(g722_encode_state_t *s, uint8_t g722_data[], const int16_t amp[]
 
             /* 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 @@ int g722_encode(g722_encode_state_t *s, uint8_t g722_data[], const int16_t amp[]
             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);
index 622d4956c2af16e70cc6b2ff016c1d81b95232b0..2364bf7634bdc26744cf072a7b5984b3232a0be0 100644 (file)
@@ -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_bit(hdlc_tx_state_t *s)
 
 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 --------------------------------------------------------*/
 
index 3f14522f8bf69873f4ee5a89721c9d91d7c96c37..7680494b8bc9beed36a4ea40bdb0a13ae1e9909b 100644 (file)
@@ -397,7 +397,7 @@ SOURCE=.\vector_int.c
 # End Source File\r
 # Begin Source File\r
 \r
-SOURCE=.\msvc/gettimeofday.c\r
+SOURCE=.\.\msvc\gettimeofday.c\r
 # End Source File\r
 # End Group\r
 # Begin Group "Header Files"\r
index b761f47cd4ac1850440a1686e5b161632351c458..715ddd2e92eefd5cc2ed21779d2cb413a8835d77 100644 (file)
@@ -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 @@ int modem_connect_tones_tx(modem_connect_tones_tx_state_t *s,
                            int16_t amp[],
                            int len)
 {
-    int mod;
+    int16_t mod;
     int i;
     int xlen;
 
@@ -165,7 +165,7 @@ int modem_connect_tones_tx(modem_connect_tones_tx_state_t *s,
         }
         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 @@ int modem_connect_tones_tx(modem_connect_tones_tx_state_t *s,
                 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;
index 1c1e29f9ee9dde456df59141abe0d3c8c614ac10..78d2e8d212803385646f6398af6310353fa159da 100644 (file)
  *
  * 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
index af72d3619ed74fa7f43ce8c4321c8b6d77c364f3..590d94bfa82974185485db537af2cab3230e061b 100644 (file)
@@ -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 @@ int sig_tone_rx(sig_tone_rx_state_t *s, int16_t amp[], int len)
                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 @@ int sig_tone_rx(sig_tone_rx_state_t *s, int16_t amp[], int len)
 #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 @@ int sig_tone_rx(sig_tone_rx_state_t *s, int16_t amp[], int len)
 
             /* 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;
index 248efc469ae7267401c53cf874bef6709a88688f..502c1982ccccf5da853cdd5c209ab7fadde3ccfb 100644 (file)
@@ -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 @@ void fsk_tx_set_modem_status_handler(fsk_tx_state_t *s, modem_tx_status_func_t h
     \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.
index 5c20359731c936771182716f290294d19b2391b8..facbb9cbde8dcf11f1f3ce8102a933049fa5ec8b 100644 (file)
@@ -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 @@ struct fsk_tx_state_s
     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;
index 6f3649e9f5f383bb2422db8cda1a758bb37b2b18..7f74cafefaedeccba0eee4174d18b7a039419cb1 100644 (file)
@@ -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 @@ struct g726_state_s
     /*! 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;
 
index 47796414a3fe3e92ce23518cf1a4759038dbc2ed..6d80f74b133e3a893d93aba60f9048b7d4ab65de 100644 (file)
@@ -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 @@ struct modem_connect_tones_tx_state_s
 
     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;
 };
 
 /*!
index 26c228b7e3f03ba0f5558c6b750c24064e9946ee..f24f3df9df6265081da3b6dc94c0b4a55ca47c12 100644 (file)
@@ -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 @@ struct sig_tone_tx_state_s
     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;
 
index a436b737b256fe6c3c8a7cc9e254443a55cfd548..1656ac3a5acd07b38b006dcff50d1a6f4e694108 100644 (file)
@@ -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 @@ struct t30_state_s
         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 @@ struct t30_state_s
     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. */
index c47489d83e88ad9269c3f7d1fc8737089c461ead..83df6622cf8be9bd1360a22eb2acd29924a4c1c7 100644 (file)
@@ -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 ------------------------------------------------------------*/
index 054dff204f04bc29b71681acb5e5fb7d4f1c9d4e..faf9451880dc3b6aac733da6ca50bea4856ae33a 100644 (file)
@@ -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 @@ static void release_resources(t30_state_t *s)
 }
 /*- 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_post_doc_non_ecm(t30_state_t *s, const uint8_t *msg,
 
 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)
index 5d921764bd5ef4bb8742f21f25152e5d03c6a223..d33d5f042f3fca1c4b9641fc16528f5fa41769fc 100644 (file)
@@ -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 @@ static void non_ecm_push_residue(t38_gateway_state_t *t)
     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;
index 8a2d19349bffc89b4df52feeea317af860fdda08..97f6d2631161baf5f712568500e5cca5b8c0794b 100644 (file)
@@ -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 v17_rx(v17_rx_state_t *s, const int16_t amp[], int len)
     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 @@ int v17_rx(v17_rx_state_t *s, const int16_t amp[], int len)
            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 */
index 24595bbf177b7620fdb72af04b439b3adc7658eb..906fd46f1779eda05933f7c3f69e711488961949 100644 (file)
@@ -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 v27ter_rx(v27ter_rx_state_t *s, const int16_t amp[], int len)
     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 @@ int v27ter_rx(v27ter_rx_state_t *s, const int16_t amp[], int len)
                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 @@ int v27ter_rx(v27ter_rx_state_t *s, const int16_t amp[], int len)
                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)
index 49a5ab5ab17c7892a352db5615a25b9855280ecc..eebdb819eeca874f9202e36eb82426cc158ab812 100644 (file)
@@ -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 v29_rx(v29_rx_state_t *s, const int16_t amp[], int len)
     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 @@ int v29_rx(v29_rx_state_t *s, const int16_t amp[], int len)
            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 */
index 1efac7d5ac549f47ac39699addbc5f295035aaf3..a75aef348e959e1af3e51ecaf57b7fd3c9f822ab 100644 (file)
@@ -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 @@ noinst_PROGRAMS =   adsi_tests \
                     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 \