]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update to snapshot spandsp-20090211
authorMichael Jerris <mike@jerris.com>
Fri, 20 Feb 2009 18:22:32 +0000 (18:22 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 20 Feb 2009 18:22:32 +0000 (18:22 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12186 d0543943-73ff-0310-b7d9-9358b9ac24b2

121 files changed:
libs/spandsp/configure.ac
libs/spandsp/src/Makefile.am
libs/spandsp/src/adsi.c
libs/spandsp/src/async.c
libs/spandsp/src/at_interpreter.c
libs/spandsp/src/awgn.c
libs/spandsp/src/bell_r2_mf.c
libs/spandsp/src/bert.c
libs/spandsp/src/bitstream.c
libs/spandsp/src/dtmf.c
libs/spandsp/src/echo.c
libs/spandsp/src/fax.c
libs/spandsp/src/filter_tools.c
libs/spandsp/src/fsk.c
libs/spandsp/src/g711.c
libs/spandsp/src/g722.c
libs/spandsp/src/g726.c
libs/spandsp/src/gsm0610_encode.c
libs/spandsp/src/gsm0610_lpc.c
libs/spandsp/src/hdlc.c
libs/spandsp/src/ima_adpcm.c
libs/spandsp/src/libspandsp.sln
libs/spandsp/src/logging.c
libs/spandsp/src/lpc10_decode.c
libs/spandsp/src/lpc10_encode.c
libs/spandsp/src/make_at_dictionary.c
libs/spandsp/src/make_modem_filter.c
libs/spandsp/src/modem_connect_tones.c
libs/spandsp/src/msvc/config.h
libs/spandsp/src/msvc/getopt.c [new file with mode: 0644]
libs/spandsp/src/msvc/make_at_dictionary.vcproj [new file with mode: 0644]
libs/spandsp/src/msvc/make_headers.bat [new file with mode: 0644]
libs/spandsp/src/msvc/make_modem_filter.vcproj [new file with mode: 0644]
libs/spandsp/src/msvc/unistd.h
libs/spandsp/src/noise.c
libs/spandsp/src/oki_adpcm.c
libs/spandsp/src/playout.c
libs/spandsp/src/plc.c
libs/spandsp/src/power_meter.c
libs/spandsp/src/queue.c
libs/spandsp/src/schedule.c
libs/spandsp/src/sig_tone.c
libs/spandsp/src/silence_gen.c
libs/spandsp/src/spandsp/adsi.h
libs/spandsp/src/spandsp/async.h
libs/spandsp/src/spandsp/at_interpreter.h
libs/spandsp/src/spandsp/awgn.h
libs/spandsp/src/spandsp/bell_r2_mf.h
libs/spandsp/src/spandsp/bert.h
libs/spandsp/src/spandsp/bitstream.h
libs/spandsp/src/spandsp/complex.h
libs/spandsp/src/spandsp/dtmf.h
libs/spandsp/src/spandsp/echo.h
libs/spandsp/src/spandsp/fast_convert.h
libs/spandsp/src/spandsp/fax_modems.h
libs/spandsp/src/spandsp/fsk.h
libs/spandsp/src/spandsp/g711.h
libs/spandsp/src/spandsp/g722.h
libs/spandsp/src/spandsp/g726.h
libs/spandsp/src/spandsp/gsm0610.h
libs/spandsp/src/spandsp/hdlc.h
libs/spandsp/src/spandsp/ima_adpcm.h
libs/spandsp/src/spandsp/logging.h
libs/spandsp/src/spandsp/lpc10.h
libs/spandsp/src/spandsp/modem_connect_tones.h
libs/spandsp/src/spandsp/noise.h
libs/spandsp/src/spandsp/oki_adpcm.h
libs/spandsp/src/spandsp/playout.h
libs/spandsp/src/spandsp/plc.h
libs/spandsp/src/spandsp/power_meter.h
libs/spandsp/src/spandsp/queue.h
libs/spandsp/src/spandsp/schedule.h
libs/spandsp/src/spandsp/sig_tone.h
libs/spandsp/src/spandsp/silence_gen.h
libs/spandsp/src/spandsp/super_tone_rx.h
libs/spandsp/src/spandsp/super_tone_tx.h
libs/spandsp/src/spandsp/t31.h
libs/spandsp/src/spandsp/t38_core.h
libs/spandsp/src/spandsp/t38_gateway.h
libs/spandsp/src/spandsp/t38_non_ecm_buffer.h
libs/spandsp/src/spandsp/t4.h
libs/spandsp/src/spandsp/time_scale.h
libs/spandsp/src/spandsp/tone_detect.h
libs/spandsp/src/spandsp/tone_generate.h
libs/spandsp/src/spandsp/v17rx.h
libs/spandsp/src/spandsp/v17tx.h
libs/spandsp/src/spandsp/v22bis.h
libs/spandsp/src/spandsp/v27ter_rx.h
libs/spandsp/src/spandsp/v27ter_tx.h
libs/spandsp/src/spandsp/v29rx.h
libs/spandsp/src/spandsp/v29tx.h
libs/spandsp/src/spandsp/v42.h
libs/spandsp/src/spandsp/v42bis.h
libs/spandsp/src/spandsp/version.h
libs/spandsp/src/super_tone_rx.c
libs/spandsp/src/super_tone_tx.c
libs/spandsp/src/t30.c
libs/spandsp/src/t31.c
libs/spandsp/src/t38_core.c
libs/spandsp/src/t38_gateway.c
libs/spandsp/src/t38_non_ecm_buffer.c
libs/spandsp/src/t38_terminal.c
libs/spandsp/src/t4.c
libs/spandsp/src/time_scale.c
libs/spandsp/src/tone_detect.c
libs/spandsp/src/tone_generate.c
libs/spandsp/src/v17rx.c
libs/spandsp/src/v17tx.c
libs/spandsp/src/v22bis_tx.c
libs/spandsp/src/v27ter_rx.c
libs/spandsp/src/v27ter_tx.c
libs/spandsp/src/v29rx.c
libs/spandsp/src/v29tx.c
libs/spandsp/src/v42.c
libs/spandsp/src/v42bis.c
libs/spandsp/src/vector_float.c
libs/spandsp/tests/echo_tests.c
libs/spandsp/tests/fax_decode.c
libs/spandsp/tests/playout_tests.c
libs/spandsp/tests/t4_tests.c
libs/spandsp/tests/tsb85_tests.c

index 30a5facf205ebd0bcc7f9f023f88319cf4842bd4..757e27a3c9c9c1aac568242bcd7f3b3609cbd155 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: configure.ac,v 1.65 2009/01/31 08:48:10 steveu Exp $
+# $Id: configure.ac,v 1.66 2009/02/10 17:20:31 steveu Exp $
 
 # @start 1
 
@@ -33,7 +33,7 @@ SPANDSP_MAJOR_VERSION=0
 SPANDSP_MINOR_VERSION=0
 SPANDSP_MICRO_VERSION=6
 
-SPANDSP_LT_CURRENT=1
+SPANDSP_LT_CURRENT=2
 SPANDSP_LT_REVISION=0
 SPANDSP_LT_AGE=0
 
index 9edd3e27b26c6b120cedf1caa58e8b8ebe76df61..ce163a25fb5beb9403caa2bfc952bc1d03a8d926 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.122 2009/02/03 16:33:13 steveu Exp $
+## $Id: Makefile.am,v 1.123 2009/02/10 17:16:57 steveu Exp $
 
 AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
 AM_LDFLAGS = $(COMP_VENDOR_LDFLAGS)
@@ -29,18 +29,21 @@ EXTRA_DIST = floating_fudge.h \
              libspandsp.sln \
              libspandsp.vcproj \
              msvc/config.h \
+             msvc/getopt.c \
              msvc/gettimeofday.c \
              msvc/inttypes.h \
              msvc/tgmath.h \
              msvc/unistd.h \
              msvc/spandsp.h \
              msvc/sys/time.h \
+             msvc/make_at_dictionary.vcproj \
+             msvc/make_headers.bat \
+             msvc/make_modem_filter.vcproj \
              msvc/msvcproj.head \
              msvc/msvcproj.foot \
              msvc/vc8proj.head \
              msvc/vc8proj.foot \
              spandsp/private/README
-
 INCLUDES = -I$(top_builddir)
 
 lib_LTLIBRARIES = libspandsp.la
index 644aad26aafa37eccaca06315dfd5dbd74e13642..4f7982f55712e9a5ee9332c53aaac05e86a5fc69 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: adsi.c,v 1.69 2009/02/03 16:28:39 steveu Exp $
+ * $Id: adsi.c,v 1.70 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -449,6 +449,12 @@ SPAN_DECLARE(adsi_rx_state_t *) adsi_rx_init(adsi_rx_state_t *s,
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) adsi_rx_release(adsi_rx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) adsi_rx_free(adsi_rx_state_t *s)
 {
     free(s);
@@ -658,6 +664,12 @@ SPAN_DECLARE(adsi_tx_state_t *) adsi_tx_init(adsi_tx_state_t *s, int standard)
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) adsi_tx_release(adsi_tx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) adsi_tx_free(adsi_tx_state_t *s)
 {
     free(s);
index 2214b6500e7ba2da35e29c50eaa427677c0938dd..8c3f205c22c4a1d536e68989c0e1d4889063afdd 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: async.c,v 1.17 2009/02/04 13:18:53 steveu Exp $
+ * $Id: async.c,v 1.18 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -103,6 +103,19 @@ SPAN_DECLARE(async_rx_state_t *) async_rx_init(async_rx_state_t *s,
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) async_rx_release(async_rx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) async_rx_free(async_rx_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE_NONSTD(void) async_rx_put_bit(void *user_data, int bit)
 {
     async_rx_state_t *s;
@@ -216,6 +229,19 @@ SPAN_DECLARE(async_tx_state_t *) async_tx_init(async_tx_state_t *s,
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) async_tx_release(async_tx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) async_tx_free(async_tx_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE_NONSTD(int) async_tx_get_bit(void *user_data)
 {
     async_tx_state_t *s;
index bd5d6ee2b19ed518772c8f29c870fc40e29c95ed..d748c809d5d16f0ef2a99b7b6f8558262e0f7e54 100644 (file)
@@ -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: at_interpreter.c,v 1.35 2009/02/03 16:28:39 steveu Exp $
+ * $Id: at_interpreter.c,v 1.36 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -5318,13 +5318,22 @@ SPAN_DECLARE(at_state_t *) at_init(at_state_t *s,
 }
 /*- End of function --------------------------------------------------------*/
 
-SPAN_DECLARE(int) at_free(at_state_t *s)
+SPAN_DECLARE(int) at_release(at_state_t *s)
 {
     at_reset_call_info(s);
     if (s->local_id)
         free(s->local_id);
-    free(s);
     return 0;
 }
 /*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) at_free(at_state_t *s)
+{
+    int ret;
+
+    ret = at_release(s);
+    free(s);
+    return ret;
+}
+/*- End of function --------------------------------------------------------*/
 /*- End of file ------------------------------------------------------------*/
index 9e1095a7495e06b78ff782f9df7fecef59a6c6d6..f0e246a1fbd19f6ddda668e29aa0a8596c453a8a 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: awgn.c,v 1.21 2009/02/03 16:28:39 steveu Exp $
+ * $Id: awgn.c,v 1.22 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -96,12 +96,6 @@ static double ran1(awgn_state_t *s)
 }
 /*- End of function --------------------------------------------------------*/
 
-SPAN_DECLARE(awgn_state_t *) awgn_init_dbm0(awgn_state_t *s, int idum, float level)
-{
-    return awgn_init_dbov(s, idum, level - DBM0_MAX_POWER);
-}
-/*- End of function --------------------------------------------------------*/
-
 SPAN_DECLARE(awgn_state_t *) awgn_init_dbov(awgn_state_t *s, int idum, float level)
 {
     int j;
@@ -134,6 +128,25 @@ SPAN_DECLARE(awgn_state_t *) awgn_init_dbov(awgn_state_t *s, int idum, float lev
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(awgn_state_t *) awgn_init_dbm0(awgn_state_t *s, int idum, float level)
+{
+    return awgn_init_dbov(s, idum, level - DBM0_MAX_POWER);
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) awgn_release(awgn_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) awgn_free(awgn_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int16_t) awgn(awgn_state_t *s)
 {
     double fac;
index 0e92cc714b8c5742444ad1d98aa73f1286ca9fb0..25f202ecd30c755a421a9a5b1cfa4bb942016065 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.37 2009/02/03 16:28:39 steveu Exp $
+ * $Id: bell_r2_mf.c,v 1.38 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -340,6 +340,12 @@ SPAN_DECLARE(bell_mf_tx_state_t *) bell_mf_tx_init(bell_mf_tx_state_t *s)
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) bell_mf_tx_release(bell_mf_tx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) bell_mf_tx_free(bell_mf_tx_state_t *s)
 {
     free(s);
@@ -437,6 +443,12 @@ SPAN_DECLARE(r2_mf_tx_state_t *) r2_mf_tx_init(r2_mf_tx_state_t *s, int fwd)
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) r2_mf_tx_release(r2_mf_tx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) r2_mf_tx_free(r2_mf_tx_state_t *s)
 {
     free(s);
@@ -651,6 +663,12 @@ SPAN_DECLARE(bell_mf_rx_state_t *) bell_mf_rx_init(bell_mf_rx_state_t *s,
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) bell_mf_rx_release(bell_mf_rx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) bell_mf_rx_free(bell_mf_rx_state_t *s)
 {
     free(s);
@@ -829,6 +847,12 @@ SPAN_DECLARE(r2_mf_rx_state_t *) r2_mf_rx_init(r2_mf_rx_state_t *s,
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) r2_mf_rx_release(r2_mf_rx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) r2_mf_rx_free(r2_mf_rx_state_t *s)
 {
     free(s);
index 5ae7688862ce61d79e8247adb58a1aa02a6314fb..0e4e2e3406317279149164e425cd1ffc0e8c2982 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: bert.c,v 1.31 2009/02/03 16:28:39 steveu Exp $
+ * $Id: bert.c,v 1.32 2009/02/10 13:06:46 steveu Exp $
  */
 
 #if defined(HAVE_CONFIG_H)
@@ -351,7 +351,7 @@ SPAN_DECLARE(bert_state_t *) bert_init(bert_state_t *s, int limit, int pattern,
     if (s == NULL)
     {
         if ((s = (bert_state_t *) malloc(sizeof(*s))) == NULL)
-            return  NULL;
+            return NULL;
     }
     memset(s, 0, sizeof(*s));
 
@@ -493,4 +493,17 @@ SPAN_DECLARE(bert_state_t *) bert_init(bert_state_t *s, int limit, int pattern,
     return  s;
 }
 /*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) bert_release(bert_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) bert_free(bert_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
 /*- End of file ------------------------------------------------------------*/
index 914836f0107db2898f8af134e8bfd786ed1785ba..7bc7c085e473ef737c44e5e90de07714dcfa848e 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: bitstream.c,v 1.17 2009/02/03 16:28:39 steveu Exp $
+ * $Id: bitstream.c,v 1.18 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -128,10 +128,27 @@ SPAN_DECLARE(void) bitstream_flush2(bitstream_state_t *s, uint8_t **c)
 SPAN_DECLARE(bitstream_state_t *) bitstream_init(bitstream_state_t *s)
 {
     if (s == NULL)
-        return NULL;
+    {
+        if ((s = (bitstream_state_t *) malloc(sizeof(*s))) == NULL)
+            return NULL;
+    }
     s->bitstream = 0;
     s->residue = 0;
     return s;
 }
 /*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) bitstream_release(bitstream_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) bitstream_free(bitstream_state_t *s)
+{
+    if (s)
+        free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
 /*- End of file ------------------------------------------------------------*/
index 2d5f607ca618f15ba9a3798c146b8f10b2d4f88c..5becbc1990dc6915d6497d7d7795b99eff4df183 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.50 2009/02/03 16:28:39 steveu Exp $
+ * $Id: dtmf.c,v 1.51 2009/02/10 13:06:46 steveu Exp $
  */
  
 /*! \file dtmf.h */
@@ -410,6 +410,12 @@ SPAN_DECLARE(dtmf_rx_state_t *) dtmf_rx_init(dtmf_rx_state_t *s,
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) dtmf_rx_release(dtmf_rx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) dtmf_rx_free(dtmf_rx_state_t *s)
 {
     free(s);
@@ -526,6 +532,12 @@ SPAN_DECLARE(dtmf_tx_state_t *) dtmf_tx_init(dtmf_tx_state_t *s)
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) dtmf_tx_release(dtmf_tx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) dtmf_tx_free(dtmf_tx_state_t *s)
 {
     free(s);
index 01ceb3c7141fd23d83af24cb90e7066ec3815d46..30c607ca54d114c89abd5cd6dd39cca6daf7d741 100644 (file)
@@ -27,7 +27,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: echo.c,v 1.31 2009/02/03 16:28:39 steveu Exp $
+ * $Id: echo.c,v 1.32 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -238,7 +238,7 @@ static __inline__ void lms_adapt(echo_can_state_t *ec, int factor)
 }
 /*- End of function --------------------------------------------------------*/
 
-SPAN_DECLARE(echo_can_state_t *) echo_can_create(int len, int adaption_mode)
+SPAN_DECLARE(echo_can_state_t *) echo_can_init(int len, int adaption_mode)
 {
     echo_can_state_t *ec;
     int i;
@@ -279,11 +279,17 @@ SPAN_DECLARE(echo_can_state_t *) echo_can_create(int len, int adaption_mode)
     ec->tap_rotate_counter = 1600;
     ec->cng_level = 1000;
     echo_can_adaption_mode(ec, adaption_mode);
-    return  ec;
+    return ec;
 }
 /*- End of function --------------------------------------------------------*/
 
-SPAN_DECLARE(void) echo_can_free(echo_can_state_t *ec)
+SPAN_DECLARE(int) echo_can_release(echo_can_state_t *ec)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) echo_can_free(echo_can_state_t *ec)
 {
     int i;
     
@@ -292,6 +298,7 @@ SPAN_DECLARE(void) echo_can_free(echo_can_state_t *ec)
     for (i = 0;  i < 4;  i++)
         free(ec->fir_taps16[i]);
     free(ec);
+    return 0;
 }
 /*- End of function --------------------------------------------------------*/
 
index a34eef5c9e7d68ec3298bb4d70c4c33e2d5e7cc8..03e6c0be372f823dc2563695e427b392158d44d9 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: fax.c,v 1.85 2009/02/03 16:28:39 steveu Exp $
+ * $Id: fax.c,v 1.86 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -545,7 +545,6 @@ SPAN_DECLARE(fax_state_t *) fax_init(fax_state_t *s, int calling_party)
         if ((s = (fax_state_t *) malloc(sizeof(*s))) == NULL)
             return NULL;
     }
-
     memset(s, 0, sizeof(*s));
     span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
     span_log_set_protocol(&s->logging, "FAX");
index 00d7f5ef955dd602f2e3e04c499f477f2cb2bcda..4bde208f887be95c69a075dd1a22ae576f122de5 100644 (file)
@@ -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: filter_tools.c,v 1.9 2009/01/28 03:41:26 steveu Exp $
+ * $Id: filter_tools.c,v 1.10 2009/02/10 17:16:57 steveu Exp $
  */
  
 #if defined(HAVE_CONFIG_H)
 #include "spandsp/complex.h"
 #include "filter_tools.h"
 
+#if !defined(FALSE)
 #define FALSE 0
+#endif
+#if !defined(TRUE)
 #define TRUE (!FALSE)
+#endif
 
 #define MAXPZ      8192
 #define SEQ_LEN     8192
@@ -149,7 +153,7 @@ void compute_raised_cosine_filter(double coeffs[],
         if (f <= f1)
             vec[i] = complex_set(1.0, 0.0);
         else if (f <= f2)
-            vec[i] = complex_set(0.5*(1.0 + cos((3.1415926535*tau/beta) * (f - f1))), 0.0);
+            vec[i] = complex_set(0.5*(1.0 + cos((3.1415926535*tau/beta)*(f - f1))), 0.0);
         else
             vec[i] = complex_set(0.0, 0.0);
     }
index fce99243ad0c02bcdf538236e43b3a093b29476a..5db699c2de1f60ac19f6534f9b056f3cda374940 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.51 2009/02/03 16:28:39 steveu Exp $
+ * $Id: fsk.c,v 1.52 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -149,6 +149,19 @@ SPAN_DECLARE(fsk_tx_state_t *) fsk_tx_init(fsk_tx_state_t *s,
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) fsk_tx_release(fsk_tx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) fsk_tx_free(fsk_tx_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) fsk_tx(fsk_tx_state_t *s, int16_t amp[], int len)
 {
     int sample;
@@ -289,6 +302,19 @@ SPAN_DECLARE(fsk_rx_state_t *) fsk_rx_init(fsk_rx_state_t *s,
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) fsk_rx_release(fsk_rx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) fsk_rx_free(fsk_rx_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 static void report_status_change(fsk_rx_state_t *s, int status)
 {
     if (s->status_handler)
index eeea9ada04965744c2506544759f116456a4e880..fad1882011edf495d1d3384492eea3c2a55c0866 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: g711.c,v 1.15 2009/02/03 16:28:39 steveu Exp $
+ * $Id: g711.c,v 1.16 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -182,6 +182,12 @@ SPAN_DECLARE(g711_state_t *) g711_init(g711_state_t *s, int mode)
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(int) g711_release(g711_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) g711_free(g711_state_t *s)
 {
     free(s);
     return 0;
index 195c31d50cf67b98eb40589fec66d9a9567c011b..eb3425c6ec3d435d7131977dca3bb7fc25354e58 100644 (file)
@@ -28,7 +28,7 @@
  * Computer Science, Speech Group
  * Chengxiang Lu and Alex Hauptmann
  *
- * $Id: g722.c,v 1.7 2009/02/03 16:28:39 steveu Exp $
+ * $Id: g722.c,v 1.8 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -282,6 +282,12 @@ SPAN_DECLARE(g722_decode_state_t *) g722_decode_init(g722_decode_state_t *s, int
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(int) g722_decode_release(g722_decode_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) g722_decode_free(g722_decode_state_t *s)
 {
     free(s);
     return 0;
@@ -454,6 +460,12 @@ SPAN_DECLARE(g722_encode_state_t *) g722_encode_init(g722_encode_state_t *s, int
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(int) g722_encode_release(g722_encode_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) g722_encode_free(g722_encode_state_t *s)
 {
     free(s);
     return 0;
index 57a0f4bf20ee81f15f9f28edf7dcd41207b361fb..9ba124531b4f5f15907d8f2ec13b02aad29eb002 100644 (file)
@@ -48,7 +48,7 @@
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  *
- * $Id: g726.c,v 1.27 2009/02/03 16:28:39 steveu Exp $
+ * $Id: g726.c,v 1.28 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -1058,6 +1058,12 @@ SPAN_DECLARE(g726_state_t *) g726_init(g726_state_t *s, int bit_rate, int ext_co
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(int) g726_release(g726_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) g726_free(g726_state_t *s)
 {
     free(s);
     return 0;
index b599b7528b40002cf9042ca3a9b03df3b1cf49e9..091e4fb4580d14946d12d3a2e180f52c9e80ab28 100644 (file)
@@ -25,7 +25,7 @@
  * This code is based on the widely used GSM 06.10 code available from
  * http://kbs.cs.tu-berlin.de/~jutta/toast.html
  *
- * $Id: gsm0610_encode.c,v 1.29 2009/02/03 16:28:39 steveu Exp $
+ * $Id: gsm0610_encode.c,v 1.30 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -106,6 +106,13 @@ static void encode_a_frame(gsm0610_state_t *s, gsm0610_frame_t *f, const int16_t
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) gsm0610_set_packing(gsm0610_state_t *s, int packing)
+{
+    s->packing = packing;
+    return 0;    
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(gsm0610_state_t *) gsm0610_init(gsm0610_state_t *s, int packing)
 {
     if (s == NULL)
@@ -122,14 +129,13 @@ SPAN_DECLARE(gsm0610_state_t *) gsm0610_init(gsm0610_state_t *s, int packing)
 }
 /*- End of function --------------------------------------------------------*/
 
-SPAN_DECLARE(int) gsm0610_set_packing(gsm0610_state_t *s, int packing)
+SPAN_DECLARE(int) gsm0610_release(gsm0610_state_t *s)
 {
-    s->packing = packing;
-    return 0;    
+    return 0;
 }
 /*- End of function --------------------------------------------------------*/
 
-SPAN_DECLARE(int) gsm0610_release(gsm0610_state_t *s)
+SPAN_DECLARE(int) gsm0610_free(gsm0610_state_t *s)
 {
     if (s)
         free(s);
index 46e1726201362533ca8797d4f6e6b32e630e24d3..b8ec8d4aa223e2c5bc9cf7b94899e74346cf93a1 100644 (file)
@@ -25,7 +25,7 @@
  * This code is based on the widely used GSM 06.10 code available from
  * http://kbs.cs.tu-berlin.de/~jutta/toast.html
  *
- * $Id: gsm0610_lpc.c,v 1.28 2009/02/03 16:28:39 steveu Exp $
+ * $Id: gsm0610_lpc.c,v 1.29 2009/02/05 15:57:27 steveu Exp $
  */
 
 /*! \file */
index 644a8c602dfdf943dfb0b3ec9f911993d35b5cd7..328838dd4ed78dd6f1c790a1fa98cffaa3a6c918 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.69 2009/02/03 16:28:39 steveu Exp $
+ * $Id: hdlc.c,v 1.70 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -318,6 +318,19 @@ SPAN_DECLARE(hdlc_rx_state_t *) hdlc_rx_init(hdlc_rx_state_t *s,
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) hdlc_rx_release(hdlc_rx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) hdlc_rx_free(hdlc_rx_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) hdlc_rx_get_stats(hdlc_rx_state_t *s,
                                     hdlc_rx_stats_t *t)
 {
@@ -578,4 +591,17 @@ SPAN_DECLARE(hdlc_tx_state_t *) hdlc_tx_init(hdlc_tx_state_t *s,
     return s;
 }
 /*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) hdlc_tx_release(hdlc_tx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) hdlc_tx_free(hdlc_tx_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
 /*- End of file ------------------------------------------------------------*/
index d3daf245eb2d0d7577c8e7e8672f0696c942ce7b..36b56cabfb594b96ba713ce3f9df60d09ff3b1b8 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: ima_adpcm.c,v 1.34 2009/02/03 16:28:39 steveu Exp $
+ * $Id: ima_adpcm.c,v 1.35 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -293,6 +293,12 @@ SPAN_DECLARE(ima_adpcm_state_t *) ima_adpcm_init(ima_adpcm_state_t *s, int varia
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(int) ima_adpcm_release(ima_adpcm_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) ima_adpcm_free(ima_adpcm_state_t *s)
 {
     free(s);
     return 0;
index 9d0247c1ef71a90b792cf40d9083f9a429e231bc..7ab695adefa2f55e540e391e61b298dd758001ac 100644 (file)
@@ -1,6 +1,10 @@
 ï»¿\r
 Microsoft Visual Studio Solution File, Format Version 10.00\r
 # Visual Studio 2008\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_at_dictionary", "msvc\make_at_dictionary.vcproj", "{DEE932AB-5911-4700-9EEB-8C7090A0A330}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_modem_filter", "msvc\make_modem_filter.vcproj", "{329A6FA0-0FCC-4435-A950-E670AEFA9838}"\r
+EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspandsp", "libspandsp.vcproj", "{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}"\r
        ProjectSection(ProjectDependencies) = postProject\r
                {401A40CD-5DB4-4E34-AC68-FA99E9FAC014} = {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}\r
index dbc17c9b7d8a2fa28112a9abd5f70646acb99a38..9017a0c2265c048c7be4ba30a2dda17b5a0ab55f 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: logging.c,v 1.30 2009/02/03 16:28:39 steveu Exp $
+ * $Id: logging.c,v 1.31 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -177,20 +177,6 @@ SPAN_DECLARE(int) span_log_buf(logging_state_t *s, int level, const char *tag, c
 }
 /*- End of function --------------------------------------------------------*/
 
-SPAN_DECLARE(int) span_log_init(logging_state_t *s, int level, const char *tag)
-{
-    s->span_error = __span_error;
-    s->span_message = __span_message;
-    s->level = level;
-    s->tag = tag;
-    s->protocol = NULL;
-    s->samples_per_second = SAMPLE_RATE;
-    s->elapsed_samples = 0;
-
-    return  0;
-}
-/*- End of function --------------------------------------------------------*/
-
 SPAN_DECLARE(int) span_log_set_level(logging_state_t *s, int level)
 {
     s->level = level;
@@ -254,4 +240,37 @@ SPAN_DECLARE(void) span_set_error_handler(error_handler_func_t func)
     __span_error = func;
 }
 /*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) span_log_init(logging_state_t *s, int level, const char *tag)
+{
+    if (s == NULL)
+    {
+        if ((s = (logging_state_t *) malloc(sizeof(*s))) == NULL)
+            return NULL;
+    }
+    s->span_error = __span_error;
+    s->span_message = __span_message;
+    s->level = level;
+    s->tag = tag;
+    s->protocol = NULL;
+    s->samples_per_second = SAMPLE_RATE;
+    s->elapsed_samples = 0;
+
+    return  0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) span_log_release(logging_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) span_log_free(logging_state_t *s)
+{
+    if (s)
+        free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
 /*- End of file ------------------------------------------------------------*/
index 6a973176c07a0fbce9cf11778563bcdffb685920..88a88f404bc14e767761d9983801b6b5b25effb1 100644 (file)
@@ -26,7 +26,7 @@
  * implementation of the LPC-10 2400 bps Voice Coder. They do not
  * exert copyright claims on their code, and it may be freely used.
  *
- * $Id: lpc10_decode.c,v 1.26 2009/02/03 16:28:39 steveu Exp $
+ * $Id: lpc10_decode.c,v 1.27 2009/02/10 13:06:46 steveu Exp $
  */
 
 #if defined(HAVE_CONFIG_H)
@@ -1076,6 +1076,12 @@ SPAN_DECLARE(lpc10_decode_state_t *) lpc10_decode_init(lpc10_decode_state_t *s,
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(int) lpc10_decode_release(lpc10_decode_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) lpc10_decode_free(lpc10_decode_state_t *s)
 {
     free(s);
     return 0;
index 4d9182822dd529f6a55556a862d0d9c8ce8f6e41..2f3608019745346f6a19e941450deeb9cf8c0ce7 100644 (file)
@@ -26,7 +26,7 @@
  * implementation of the LPC-10 2400 bps Voice Coder. They do not
  * exert copyright claims on their code, and it may be freely used.
  *
- * $Id: lpc10_encode.c,v 1.27 2009/02/03 16:28:39 steveu Exp $
+ * $Id: lpc10_encode.c,v 1.28 2009/02/10 13:06:46 steveu Exp $
  */
 
 #if defined(HAVE_CONFIG_H)
@@ -364,6 +364,12 @@ SPAN_DECLARE(lpc10_encode_state_t *) lpc10_encode_init(lpc10_encode_state_t *s,
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(int) lpc10_encode_release(lpc10_encode_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) lpc10_encode_free(lpc10_encode_state_t *s)
 {
     free(s);
     return 0;
index 5c74550d229bb6926626d9e7a614290ba89fdb6e..fcd1253167efb3c37367951a989553b10beed540 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: make_at_dictionary.c,v 1.1 2008/07/01 03:27:51 steveu Exp $
+ * $Id: make_at_dictionary.c,v 1.2 2009/02/10 17:16:57 steveu Exp $
  */
 
 #if defined(HAVE_CONFIG_H)
@@ -541,7 +541,7 @@ static void trie_recursive_build_packed_trie(trie_node_t *t)
 
 static void trie_add(trie_t *s, const char *u, size_t len)
 {
-    int i;
+    size_t i;
     int index;
     trie_node_t *t;
 
index 31c1db455a49245668dc0e50e1ee8b5cceef7b6f..45d7ab8013ae40ed1ae56c9b4ecd0e78bb13b634 100644 (file)
@@ -23,7 +23,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: make_modem_filter.c,v 1.13 2009/01/28 03:41:27 steveu Exp $
+ * $Id: make_modem_filter.c,v 1.14 2009/02/10 17:16:57 steveu Exp $
  */
 
 #if defined(HAVE_CONFIG_H)
 #include "spandsp/complex.h"
 #include "filter_tools.h"
 
+#if !defined(FALSE)
 #define FALSE 0
+#endif
+#if !defined(TRUE)
 #define TRUE (!FALSE)
+#endif
 
 //#define SAMPLE_RATE         8000.0
 #define MAX_COEFFS_PER_FILTER   128
index 2fd2bacb5325052c56627a722ad67b9a1186089f..4b611db2acdcbf243c43aaed292bf487cac6bee3 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.33 2009/02/03 16:28:39 steveu Exp $
+ * $Id: modem_connect_tones.c,v 1.34 2009/02/10 13:06:46 steveu Exp $
  */
  
 /*! \file */
@@ -253,6 +253,12 @@ SPAN_DECLARE(modem_connect_tones_tx_state_t *) modem_connect_tones_tx_init(modem
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) modem_connect_tones_tx_release(modem_connect_tones_tx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) modem_connect_tones_tx_free(modem_connect_tones_tx_state_t *s)
 {
     free(s);
@@ -544,6 +550,12 @@ SPAN_DECLARE(modem_connect_tones_rx_state_t *) modem_connect_tones_rx_init(modem
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) modem_connect_tones_rx_release(modem_connect_tones_rx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) modem_connect_tones_rx_free(modem_connect_tones_rx_state_t *s)
 {
     free(s);
index c7f3be5637936c80e14be16e595379acd546ec5a..a69e2acc181224ddb88682ade90dfb21111039eb 100644 (file)
@@ -10,7 +10,7 @@
  *
  * This file is released in the public domain.
  *
- * $Id: config.h,v 1.2 2009/02/03 16:39:41 steveu Exp $
+ * $Id: config.h,v 1.3 2009/02/10 13:06:47 steveu Exp $
  */
 
 #if !defined(_MSVC_CONFIG_H_)
@@ -33,6 +33,7 @@
 #define HAVE_TGMATH_H
 
 #define HAVE_LONG_DOUBLE
+#define HAVE_LIBTIFF
 
 #define SPANDSP_USE_EXPORT_CAPABILITY 1
 
diff --git a/libs/spandsp/src/msvc/getopt.c b/libs/spandsp/src/msvc/getopt.c
new file mode 100644 (file)
index 0000000..2fa9318
--- /dev/null
@@ -0,0 +1,177 @@
+/***************************************************************************** 
+ * 
+ *  MODULE NAME : GETOPT.C 
+ * 
+ *  COPYRIGHTS: 
+ *             This module contains code made available by IBM 
+ *             Corporation on an AS IS basis.  Any one receiving the 
+ *             module is considered to be licensed under IBM copyrights 
+ *             to use the IBM-provided source code in any way he or she 
+ *             deems fit, including copying it, compiling it, modifying 
+ *             it, and redistributing it, with or without 
+ *             modifications.  No license under any IBM patents or 
+ *             patent applications is to be implied from this copyright 
+ *             license. 
+ * 
+ *             A user of the module should understand that IBM cannot 
+ *             provide technical support for the module and will not be 
+ *             responsible for any consequences of use of the program. 
+ * 
+ *             Any notices, including this one, are not to be removed 
+ *             from the module without the prior written consent of 
+ *             IBM. 
+ * 
+ *  AUTHOR:   Original author: 
+ *                 G. R. Blair (BOBBLAIR at AUSVM1) 
+ *                 Internet: bobblair@bobblair.austin.ibm.com 
+ * 
+ *            Extensively revised by: 
+ *                 John Q. Walker II, Ph.D. (JOHHQ at RALVM6) 
+ *                 Internet: johnq@ralvm6.vnet.ibm.com 
+ * 
+ *****************************************************************************/ 
+/****************************************************************************** 
+ * getopt() 
+ * 
+ * The getopt() function is a command line parser.  It returns the next 
+ * option character in argv that matches an option character in opstring. 
+ * 
+ * The argv argument points to an array of argc+1 elements containing argc 
+ * pointers to character strings followed by a null pointer. 
+ * 
+ * The opstring argument points to a string of option characters; if an 
+ * option character is followed by a colon, the option is expected to have 
+ * an argument that may or may not be separated from it by white space. 
+ * The external variable optarg is set to point to the start of the option 
+ * argument on return from getopt(). 
+ * 
+ * The getopt() function places in optind the argv index of the next argument 
+ * to be processed.  The system initializes the external variable optind to 
+ * 1 before the first call to getopt(). 
+ * 
+ * When all options have been processed (that is, up to the first nonoption 
+ * argument), getopt() returns EOF.  The special option "--" may be used to 
+ * delimit the end of the options; EOF will be returned, and "--" will be 
+ * skipped. 
+ * 
+ * The getopt() function returns a question mark (?) when it encounters an 
+ * option character not included in opstring.  This error message can be 
+ * disabled by setting opterr to zero.  Otherwise, it returns the option 
+ * character that was detected. 
+ * 
+ * If the special option "--" is detected, or all options have been 
+ * processed, EOF is returned. 
+ * 
+ * Options are marked by either a minus sign (-) or a slash (/). 
+ * 
+ * No errors are defined. 
+ *****************************************************************************/ 
+#include <stdio.h>                  /* for EOF */ 
+#include <string.h>                 /* for strchr() */ 
+/* static (global) variables that are specified as exported by getopt() */ 
+char *optarg = NULL;    /* pointer to the start of the option argument  */ 
+int   optind = 1;       /* number of the next argv[] to be evaluated    */ 
+int   opterr = 1;       /* non-zero if a question mark should be returned 
+                           when a non-valid option character is detected */ 
+/* handle possible future character set concerns by putting this in a macro */ 
+#define _next_char(string)  (char)(*(string+1)) 
+int getopt(int argc, char *argv[], char *opstring) 
+{ 
+    static char *pIndexPosition = NULL; /* place inside current argv string */ 
+    char *pArgString = NULL;        /* where to start from next */ 
+    char *pOptString;               /* the string in our program */ 
+    if (pIndexPosition != NULL) { 
+        /* we last left off inside an argv string */ 
+        if (*(++pIndexPosition)) { 
+            /* there is more to come in the most recent argv */ 
+            pArgString = pIndexPosition; 
+        } 
+    } 
+    if (pArgString == NULL) { 
+        /* we didn't leave off in the middle of an argv string */ 
+        if (optind >= argc) { 
+            /* more command-line arguments than the argument count */ 
+            pIndexPosition = NULL;  /* not in the middle of anything */ 
+            return EOF;             /* used up all command-line arguments */ 
+        } 
+        /*--------------------------------------------------------------------- 
+         * If the next argv[] is not an option, there can be no more options. 
+         *-------------------------------------------------------------------*/ 
+        pArgString = argv[optind++]; /* set this to the next argument ptr */ 
+        if (('/' != *pArgString) && /* doesn't start with a slash or a dash? */ 
+            ('-' != *pArgString)) { 
+            --optind;               /* point to current arg once we're done */ 
+            optarg = NULL;          /* no argument follows the option */ 
+            pIndexPosition = NULL;  /* not in the middle of anything */ 
+            return EOF;             /* used up all the command-line flags */ 
+        } 
+        /* check for special end-of-flags markers */ 
+        if ((strcmp(pArgString, "-") == 0) || 
+            (strcmp(pArgString, "--") == 0)) { 
+            optarg = NULL;          /* no argument follows the option */ 
+            pIndexPosition = NULL;  /* not in the middle of anything */ 
+            return EOF;             /* encountered the special flag */ 
+        } 
+        pArgString++;               /* look past the / or - */ 
+    } 
+    if (':' == *pArgString) {       /* is it a colon? */ 
+        /*--------------------------------------------------------------------- 
+         * Rare case: if opterr is non-zero, return a question mark; 
+         * otherwise, just return the colon we're on. 
+         *-------------------------------------------------------------------*/ 
+        return (opterr ? (int)'?' : (int)':'); 
+    } 
+    else if ((pOptString = strchr(opstring, *pArgString)) == 0) { 
+        /*--------------------------------------------------------------------- 
+         * The letter on the command-line wasn't any good. 
+         *-------------------------------------------------------------------*/ 
+        optarg = NULL;              /* no argument follows the option */ 
+        pIndexPosition = NULL;      /* not in the middle of anything */ 
+        return (opterr ? (int)'?' : (int)*pArgString); 
+    } 
+    else { 
+        /*--------------------------------------------------------------------- 
+         * The letter on the command-line matches one we expect to see 
+         *-------------------------------------------------------------------*/ 
+        if (':' == _next_char(pOptString)) { /* is the next letter a colon? */ 
+            /* It is a colon.  Look for an argument string. */ 
+            if ('\0' != _next_char(pArgString)) {  /* argument in this argv? */ 
+                optarg = &pArgString[1];   /* Yes, it is */ 
+            } 
+            else { 
+                /*------------------------------------------------------------- 
+                 * The argument string must be in the next argv. 
+                 * But, what if there is none (bad input from the user)? 
+                 * In that case, return the letter, and optarg as NULL. 
+                 *-----------------------------------------------------------*/ 
+                if (optind < argc) 
+                    optarg = argv[optind++]; 
+                else { 
+                    optarg = NULL; 
+                    return (opterr ? (int)'?' : (int)*pArgString); 
+                } 
+            } 
+            pIndexPosition = NULL;  /* not in the middle of anything */ 
+        } 
+        else { 
+            /* it's not a colon, so just return the letter */ 
+            optarg = NULL;          /* no argument follows the option */ 
+            pIndexPosition = pArgString;    /* point to the letter we're on */ 
+        } 
+        return (int)*pArgString;    /* return the letter that matched */ 
+    } 
+}
diff --git a/libs/spandsp/src/msvc/make_at_dictionary.vcproj b/libs/spandsp/src/msvc/make_at_dictionary.vcproj
new file mode 100644 (file)
index 0000000..f7dce51
--- /dev/null
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9.00"\r
+       Name="make_at_dictionary"\r
+       ProjectGUID="{DEE932AB-5911-4700-9EEB-8C7090A0A330}"\r
+       RootNamespace="make_at_dictionary"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
+                       IntermediateDirectory="$(ConfigurationName)"\r
+                       ConfigurationType="1"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories=".;.\spandsp;.\msvc;..\..\tiff-3.8.2\libtiff;.\generated"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                               DebugInformationFormat="4"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               LinkIncremental="2"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="1"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
+                       IntermediateDirectory="$(ConfigurationName)"\r
+                       ConfigurationType="1"\r
+                       CharacterSet="1"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               EnableIntrinsicFunctions="true"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"\r
+                               RuntimeLibrary="2"\r
+                               EnableFunctionLevelLinking="true"\r
+                               UsePrecompiledHeader="2"\r
+                               WarningLevel="3"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               LinkIncremental="1"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="1"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\make_at_dictionary.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\stdafx.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\targetver.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
+                       >\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/libs/spandsp/src/msvc/make_headers.bat b/libs/spandsp/src/msvc/make_headers.bat
new file mode 100644 (file)
index 0000000..cbc976c
--- /dev/null
@@ -0,0 +1,27 @@
+..\Debug\make_at_dictionary >..\at_interpreter_dictionary.h
+
+..\Debug\make_modem_filter -m V.17 -i -r >..\v17rx_fixed_rrc.h
+..\Debug\make_modem_filter -m V.17 -r >..\v17rx_floating_rrc.h
+
+..\Debug\make_modem_filter -m V.17 -i -t >..\v17tx_fixed_rrc.h
+..\Debug\make_modem_filter -m V.17 -t >..\v17tx_floating_rrc.h
+
+..\Debug\make_modem_filter -m V.22bis1200 -i -r >..\v22bis_rx_1200_fixed_rrc.h
+..\Debug\make_modem_filter -m V.22bis2400 -i -r >..\v22bis_rx_2400_fixed_rrc.h
+..\Debug\make_modem_filter -m V.22bis1200 -r >..\v22bis_rx_1200_floating_rrc.h
+..\Debug\make_modem_filter -m V.22bis2400 -r >..\v22bis_rx_2400_floating_rrc.h
+
+..\Debug\make_modem_filter -m V.27ter2400 -i -r >..\v27ter_rx_2400_fixed_rrc.h
+..\Debug\make_modem_filter -m V.27ter4800 -i -r >..\v27ter_rx_4800_fixed_rrc.h
+..\Debug\make_modem_filter -m V.27ter2400 -r >..\v27ter_rx_2400_floating_rrc.h
+..\Debug\make_modem_filter -m V.27ter4800 -r >..\v27ter_rx_4800_floating_rrc.h
+..\Debug\make_modem_filter -m V.27ter2400 -i -t >..\v27ter_tx_2400_fixed_rrc.h
+..\Debug\make_modem_filter -m V.27ter4800 -i -t >..\v27ter_tx_4800_fixed_rrc.h
+..\Debug\make_modem_filter -m V.27ter2400 -t >..\v27ter_tx_2400_floating_rrc.h
+..\Debug\make_modem_filter -m V.27ter4800 -t >..\v27ter_tx_4800_floating_rrc.h
+
+..\Debug\make_modem_filter -m V.29 -i -r >..\v29rx_fixed_rrc.h
+..\Debug\make_modem_filter -m V.29 -r >..\v29rx_floating_rrc.h
+..\Debug\make_modem_filter -m V.29 -i -t >..\v29tx_fixed_rrc.h
+..\Debug\make_modem_filter -m V.29 -t >..\v29tx_floating_rrc.h
+
diff --git a/libs/spandsp/src/msvc/make_modem_filter.vcproj b/libs/spandsp/src/msvc/make_modem_filter.vcproj
new file mode 100644 (file)
index 0000000..502cb5b
--- /dev/null
@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9.00"\r
+       Name="make_modem_filter"\r
+       ProjectGUID="{329A6FA0-0FCC-4435-A950-E670AEFA9838}"\r
+       RootNamespace="make_modem_filter"\r
+       Keyword="Win32Proj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
+                       IntermediateDirectory="$(ConfigurationName)"\r
+                       ConfigurationType="1"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories=".;.\spandsp;.\msvc;..\..\tiff-3.8.2\libtiff;.\generated"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                               DebugInformationFormat="4"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               LinkIncremental="2"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="1"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
+                       IntermediateDirectory="$(ConfigurationName)"\r
+                       ConfigurationType="1"\r
+                       CharacterSet="1"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               EnableIntrinsicFunctions="true"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"\r
+                               RuntimeLibrary="2"\r
+                               EnableFunctionLevelLinking="true"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               LinkIncremental="1"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="1"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
+                       >\r
+                       <File\r
+                               RelativePath="getopt.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\make_modem_filter.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\filter_tools.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\filter_tools.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\stdafx.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\targetver.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
+                       >\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
index fc8cd06d7bf9b680497397dd6d762d6b1897d485..2d7326c80e6855c761dc4ef10e0f802edc72bc75 100644 (file)
@@ -12,8 +12,8 @@
  *
  */
 
-#if !defined(_INTTYPES_H_)
-#define _INTTYPES_H_
+#if !defined(_UNISTD_H_)
+#define _UNISTD_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -22,7 +22,9 @@ extern "C" {
 #define open _open
 #define write _write
 
-extern int gethostname (char *name, size_t len);
+extern int getopt(int argc, char *argv[], char *opstring);
+
+extern char *optarg;
 
 #ifdef __cplusplus
 }
index 857124d16a8404cc04e4806b75cf43e5575872a9..4eaccae911a2272e566a2fe4357ce5dc7df29915 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: noise.c,v 1.30 2009/02/03 16:28:39 steveu Exp $
+ * $Id: noise.c,v 1.31 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -80,12 +80,6 @@ SPAN_DECLARE(int16_t) noise(noise_state_t *s)
 }
 /*- End of function --------------------------------------------------------*/
 
-SPAN_DECLARE(noise_state_t *) noise_init_dbm0(noise_state_t *s, int seed, float level, int class_of_noise, int quality)
-{
-    return noise_init_dbov(s, seed, (level - DBM0_MAX_POWER), class_of_noise, quality);
-}
-/*- End of function --------------------------------------------------------*/
-
 SPAN_DECLARE(noise_state_t *) noise_init_dbov(noise_state_t *s, int seed, float level, int class_of_noise, int quality)
 {
     float rms;
@@ -115,6 +109,18 @@ SPAN_DECLARE(noise_state_t *) noise_init_dbov(noise_state_t *s, int seed, float
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(noise_state_t *) noise_init_dbm0(noise_state_t *s, int seed, float level, int class_of_noise, int quality)
+{
+    return noise_init_dbov(s, seed, (level - DBM0_MAX_POWER), class_of_noise, quality);
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) noise_release(noise_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) noise_free(noise_state_t *s)
 {
     free(s);
index ec5b54825815255cf6568bdd36fbfac5c13360bf..787df3e32239f5509a7464c1daccb41e33aec7a4 100644 (file)
@@ -27,7 +27,7 @@
  * The actual OKI ADPCM encode and decode method is derived from freely
  * available code, whose exact origins seem uncertain.
  *
- * $Id: oki_adpcm.c,v 1.31 2009/02/03 16:28:39 steveu Exp $
+ * $Id: oki_adpcm.c,v 1.32 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -259,6 +259,12 @@ SPAN_DECLARE(oki_adpcm_state_t *) oki_adpcm_init(oki_adpcm_state_t *s, int bit_r
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(int) oki_adpcm_release(oki_adpcm_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) oki_adpcm_free(oki_adpcm_state_t *s)
 {
     free(s);
     return 0;
index 9acc3628bf8b87c10ba3a4ba71f2ed0972f2bc90..0f3eabc715a4d054a2e5687a5875378d00db2e21 100644 (file)
@@ -29,7 +29,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: playout.c,v 1.16 2009/02/03 16:28:39 steveu Exp $
+ * $Id: playout.c,v 1.17 2009/02/10 13:06:46 steveu Exp $
  */
 
 #if defined(HAVE_CONFIG_H)
@@ -330,7 +330,7 @@ SPAN_DECLARE(void) playout_restart(playout_state_t *s, int min_length, int max_l
 }
 /*- End of function --------------------------------------------------------*/
 
-SPAN_DECLARE(playout_state_t *) playout_new(int min_length, int max_length)
+SPAN_DECLARE(playout_state_t *) playout_init(int min_length, int max_length)
 {
     playout_state_t *s;
 
@@ -342,7 +342,7 @@ SPAN_DECLARE(playout_state_t *) playout_new(int min_length, int max_length)
 }
 /*- End of function --------------------------------------------------------*/
 
-SPAN_DECLARE(void) playout_free(playout_state_t *s)
+SPAN_DECLARE(int) playout_release(playout_state_t *s)
 {
     playout_frame_t *frame;
     playout_frame_t *next;
@@ -360,8 +360,19 @@ SPAN_DECLARE(void) playout_free(playout_state_t *s)
         next = frame->later;
         free(frame);
     }
-    /* Finally, free ourselves! */ 
-    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) playout_free(playout_state_t *s)
+{
+    if (s)
+    {
+        playout_release(s);
+        /* Finally, free ourselves! */ 
+        free(s);
+    }
+    return 0;
 }
 /*- End of function --------------------------------------------------------*/
 /*- End of file ------------------------------------------------------------*/
index 96ed832bf8f31add770ff7c52b003b6a8d2aa67a..c7e1d0bb985bc6b2c31359519d66a4ef790be2a2 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: plc.c,v 1.26 2009/02/03 16:28:39 steveu Exp $
+ * $Id: plc.c,v 1.27 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -248,6 +248,12 @@ SPAN_DECLARE(plc_state_t *) plc_init(plc_state_t *s)
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) plc_release(plc_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) plc_free(plc_state_t *s)
 {
     if (s)
index e017635832b158d1b53dfc05f41c996201298fb6..8adfeea0e4515b117f73f06e827cd42a056ddcb5 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: power_meter.c,v 1.27 2009/02/03 16:28:39 steveu Exp $
+ * $Id: power_meter.c,v 1.28 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -62,6 +62,20 @@ SPAN_DECLARE(power_meter_t *) power_meter_init(power_meter_t *s, int shift)
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) power_meter_release(power_meter_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) power_meter_free(power_meter_t *s)
+{
+    if (s)
+        free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(power_meter_t *) power_meter_damping(power_meter_t *s, int shift)
 {
     s->shift = shift;
index 6b53b647865dec16980405251017e95a0aa90fff..70b5706c21deb0641b8fd9e2434e8e74cb3ab2e1 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: queue.c,v 1.28 2009/02/03 16:28:40 steveu Exp $
+ * $Id: queue.c,v 1.29 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -410,6 +410,12 @@ SPAN_DECLARE(queue_state_t *) queue_init(queue_state_t *s, int len, int flags)
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) queue_release(queue_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) queue_free(queue_state_t *s)
 {
     free(s);
index 5c55f428f3a492ba2656a6f46e9d886e32f72440..010806a12971281d0194815c5dce79751694ef99 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: schedule.c,v 1.21 2009/02/03 16:28:40 steveu Exp $
+ * $Id: schedule.c,v 1.22 2009/02/10 13:06:46 steveu Exp $
  */
 
 #if defined(HAVE_CONFIG_H)
@@ -149,4 +149,13 @@ SPAN_DECLARE(int) span_schedule_release(span_sched_state_t *s)
     return 0;
 }
 /*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) span_schedule_free(span_sched_state_t *s)
+{
+    span_schedule_release(s);
+    if (s)
+        free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
 /*- End of file ------------------------------------------------------------*/
index 3003ca993b8f14cd54d73319c010b106a5f9b0ce..4d9d5ec8b87f9df2c14c204b70e45d1a3e5e0588 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.30 2009/02/03 16:28:40 steveu Exp $
+ * $Id: sig_tone.c,v 1.31 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -390,6 +390,19 @@ SPAN_DECLARE(sig_tone_tx_state_t *) sig_tone_tx_init(sig_tone_tx_state_t *s, int
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) sig_tone_tx_release(sig_tone_tx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) sig_tone_tx_free(sig_tone_tx_state_t *s)
+{
+    if (s)
+        free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
 SPAN_DECLARE(int) sig_tone_rx(sig_tone_rx_state_t *s, int16_t amp[], int len)
 {
 #if defined(SPANDSP_USE_FIXED_POINT)
@@ -674,4 +687,18 @@ SPAN_DECLARE(sig_tone_rx_state_t *) sig_tone_rx_init(sig_tone_rx_state_t *s, int
     return s;
 }
 /*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) sig_tone_rx_release(sig_tone_rx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) sig_tone_rx_free(sig_tone_rx_state_t *s)
+{
+    if (s)
+        free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
 /*- End of file ------------------------------------------------------------*/
index a702d3a91d33ceeab68d0dc6c885043263e46319..d9c302c02baf7464a12a484852d4dde7ad597f15 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: silence_gen.c,v 1.19 2009/02/04 13:18:53 steveu Exp $
+ * $Id: silence_gen.c,v 1.20 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -128,6 +128,20 @@ SPAN_DECLARE(silence_gen_state_t *) silence_gen_init(silence_gen_state_t *s, int
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) silence_gen_release(silence_gen_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) silence_gen_free(silence_gen_state_t *s)
+{
+    if (s)
+        free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 /* The following dummy routines, to absorb data, don't really have a proper home,
    so they have been put here. */
 
index 759498affcc30f12ec5ffda0582e7aae85791a9f..a725f7b5a2e7c762cffce7f603b976e415154aae 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: adsi.h,v 1.35 2009/02/03 16:28:40 steveu Exp $
+ * $Id: adsi.h,v 1.36 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -394,6 +394,8 @@ extern "C"
 */
 SPAN_DECLARE(adsi_rx_state_t *) adsi_rx_init(adsi_rx_state_t *s, int standard, put_msg_func_t put_msg, void *user_data);
 
+SPAN_DECLARE(int) adsi_rx_release(adsi_rx_state_t *s);
+
 SPAN_DECLARE(int) adsi_rx_free(adsi_rx_state_t *s);
 
 /*! \brief Receive a chunk of ADSI audio.
@@ -411,6 +413,8 @@ SPAN_DECLARE(int) adsi_rx(adsi_rx_state_t *s, const int16_t *amp, int len);
 */
 SPAN_DECLARE(adsi_tx_state_t *) adsi_tx_init(adsi_tx_state_t *s, int standard);
 
+SPAN_DECLARE(int) adsi_tx_release(adsi_tx_state_t *s);
+
 SPAN_DECLARE(int) adsi_tx_free(adsi_tx_state_t *s);
 
 /*! \brief Adjust the preamble associated with an ADSI transmit context.
index e73f62f6c7362d26fd4042ec0966502f07eee16a..a167618b377b6e9a9665eb31040553d4414f77ef 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: async.h,v 1.22 2009/02/04 13:18:53 steveu Exp $
+ * $Id: async.h,v 1.23 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -158,6 +158,10 @@ SPAN_DECLARE(async_tx_state_t *) async_tx_init(async_tx_state_t *s,
                                                get_byte_func_t get_byte,
                                                void *user_data);
 
+SPAN_DECLARE(int) async_tx_release(async_tx_state_t *s);
+
+SPAN_DECLARE(int) async_tx_free(async_tx_state_t *s);
+
 /*! Get the next bit of a transmitted serial bit stream.
     \brief Get the next bit of a transmitted serial bit stream.
     \param user_data An opaque point which must point to a transmitter context.
@@ -182,6 +186,10 @@ SPAN_DECLARE(async_rx_state_t *) async_rx_init(async_rx_state_t *s,
                                                put_byte_func_t put_byte,
                                                void *user_data);
 
+SPAN_DECLARE(int) async_rx_release(async_rx_state_t *s);
+
+SPAN_DECLARE(int) async_rx_free(async_rx_state_t *s);
+
 /*! Accept a bit from a received serial bit stream
     \brief Accept a bit from a received serial bit stream
     \param user_data An opaque point which must point to a receiver context.
index 44a5712c26e522c25f4730fd86e8286e82042f3f..90cf06169977d2e5cb83cbec8500b8e85e4476a2 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: at_interpreter.h,v 1.22 2009/02/03 16:28:40 steveu Exp $
+ * $Id: at_interpreter.h,v 1.23 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -179,6 +179,12 @@ SPAN_DECLARE(at_state_t *) at_init(at_state_t *s,
                                    at_modem_control_handler_t *modem_control_handler,
                                    void *modem_control_user_data);
 
+/*! Release an AT interpreter context.
+    \brief Release an AT interpreter context.
+    \param s The AT context.
+    \return 0 for OK */
+SPAN_DECLARE(int) at_release(at_state_t *s);
+
 /*! Free an AT interpreter context.
     \brief Free an AT interpreter context.
     \param s The AT context.
index 7a18f27ca94db7d2a104c56cfb61d2fa8367c391..ef4ff09d145e4268cbc3780e5993369d03b357ae 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: awgn.h,v 1.17 2009/02/03 16:28:40 steveu Exp $
+ * $Id: awgn.h,v 1.18 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -82,6 +82,10 @@ SPAN_DECLARE(awgn_state_t *) awgn_init_dbm0(awgn_state_t *s, int idum, float lev
 
 SPAN_DECLARE(awgn_state_t *) awgn_init_dbov(awgn_state_t *s, int idum, float level);
 
+SPAN_DECLARE(int) awgn_release(awgn_state_t *s);
+
+SPAN_DECLARE(int) awgn_free(awgn_state_t *s);
+
 SPAN_DECLARE(int16_t) awgn(awgn_state_t *s);
 
 #if defined(__cplusplus)
index 5d2a7872ab43e1a4d51a315f90a13d796dda2939..398a9c583b9a6516ecaf121fcdbde1bbcf4eb8e6 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.h,v 1.23 2009/02/03 16:28:41 steveu Exp $
+ * $Id: bell_r2_mf.h,v 1.24 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -152,6 +152,11 @@ SPAN_DECLARE(int) bell_mf_tx_put(bell_mf_tx_state_t *s, const char *digits, int
     \return A pointer to the Bell MF generator context.*/
 SPAN_DECLARE(bell_mf_tx_state_t *) bell_mf_tx_init(bell_mf_tx_state_t *s);
 
+/*! \brief Release a Bell MF generator context.
+    \param s The Bell MF generator context.
+    \return 0 for OK, else -1. */
+SPAN_DECLARE(int) bell_mf_tx_release(bell_mf_tx_state_t *s);
+
 /*! \brief Free a Bell MF generator context.
     \param s The Bell MF generator context.
     \return 0 for OK, else -1. */
@@ -177,6 +182,11 @@ SPAN_DECLARE(int) r2_mf_tx_put(r2_mf_tx_state_t *s, char digit);
     \return A pointer to the MFC/R2 generator context.*/
 SPAN_DECLARE(r2_mf_tx_state_t *) r2_mf_tx_init(r2_mf_tx_state_t *s, int fwd);
 
+/*! \brief Release an R2 MF tone generator context.
+    \param s The R2 MF tone generator context.
+    \return 0 for OK, else -1. */
+SPAN_DECLARE(int) r2_mf_tx_release(r2_mf_tx_state_t *s);
+
 /*! \brief Free an R2 MF tone generator context.
     \param s The R2 MF tone generator context.
     \return 0 for OK, else -1. */
@@ -209,6 +219,11 @@ SPAN_DECLARE(bell_mf_rx_state_t *) bell_mf_rx_init(bell_mf_rx_state_t *s,
                                                    digits_rx_callback_t callback,
                                                    void *user_data);
 
+/*! \brief Release a Bell MF receiver context.
+    \param s The Bell MF receiver context.
+    \return 0 for OK, else -1. */
+SPAN_DECLARE(int) bell_mf_rx_release(bell_mf_rx_state_t *s);
+
 /*! \brief Free a Bell MF receiver context.
     \param s The Bell MF receiver context.
     \return 0 for OK, else -1. */
@@ -242,6 +257,11 @@ SPAN_DECLARE(r2_mf_rx_state_t *) r2_mf_rx_init(r2_mf_rx_state_t *s,
                                                tone_report_func_t callback,
                                                void *user_data);
 
+/*! \brief Release an R2 MF receiver context.
+    \param s The R2 MF receiver context.
+    \return 0 for OK, else -1. */
+SPAN_DECLARE(int) r2_mf_rx_release(r2_mf_rx_state_t *s);
+
 /*! \brief Free an R2 MF receiver context.
     \param s The R2 MF receiver context.
     \return 0 for OK, else -1. */
index 240ca44cb19c2805731ae2f1b6d2f89cc0c8b12c..3871255bad1dd3c779cd720e207c58f605216b46 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: bert.h,v 1.22 2009/02/03 16:28:41 steveu Exp $
+ * $Id: bert.h,v 1.23 2009/02/10 13:06:47 steveu Exp $
  */
 
 #if !defined(_SPANDSP_BERT_H_)
@@ -127,6 +127,10 @@ SPAN_DECLARE(const char *) bert_event_to_str(int event);
     \return The BERT context. */
 SPAN_DECLARE(bert_state_t *) bert_init(bert_state_t *s, int limit, int pattern, int resync_len, int resync_percent);
 
+SPAN_DECLARE(int) bert_release(bert_state_t *s);
+
+SPAN_DECLARE(int) bert_free(bert_state_t *s);
+
 /*! Get the next bit of the BERT sequence from the generator.
     \param s The BERT context.
     \return The bit. */
index e97e2f35cb29a266101d6c613bf161acfc9e3c45..724f0f3498ffe7d43577ee5a98352199dd0495a2 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: bitstream.h,v 1.13 2009/02/03 16:28:41 steveu Exp $
+ * $Id: bitstream.h,v 1.14 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -75,6 +75,10 @@ SPAN_DECLARE(void) bitstream_flush2(bitstream_state_t *s, uint8_t **c);
     \return A pointer to the bitstream context. */
 SPAN_DECLARE(bitstream_state_t *) bitstream_init(bitstream_state_t *s);
 
+SPAN_DECLARE(int) bitstream_release(bitstream_state_t *s);
+
+SPAN_DECLARE(int) bitstream_free(bitstream_state_t *s);
+
 #if defined(__cplusplus)
 }
 #endif
index c33d6fb90ab725f7f6273a17bf13d1c237b4093a..d1a6ec96581a34b669730c8567a204d5a74d3c27 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: complex.h,v 1.18 2008/09/03 13:41:42 steveu Exp $
+ * $Id: complex.h,v 1.19 2009/02/10 17:16:57 steveu Exp $
  */
 
 /*! \file */
@@ -121,7 +121,7 @@ static __inline__ complexf_t complex_setf(float re, float im)
 }
 /*- End of function --------------------------------------------------------*/
 
-static __inline__ complex_t complex_set(float re, float im)
+static __inline__ complex_t complex_set(double re, double im)
 {
     complex_t z;
 
index 8063dcbbec91a5247470e27e4573fc988e404691..d3f81eaa19e72157c47d5b42ded3384c6a2e1473 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.h,v 1.31 2009/02/03 16:28:41 steveu Exp $
+ * $Id: dtmf.h,v 1.32 2009/02/10 13:06:47 steveu Exp $
  */
 
 #if !defined(_SPANDSP_DTMF_H_)
@@ -127,6 +127,11 @@ SPAN_DECLARE(void) dtmf_tx_set_timing(dtmf_tx_state_t *s, int on_time, int off_t
     \return A pointer to the DTMF generator context. */
 SPAN_DECLARE(dtmf_tx_state_t *) dtmf_tx_init(dtmf_tx_state_t *s);
 
+/*! \brief Release a DTMF tone generator context.
+    \param s The DTMF tone generator context.
+    \return 0 for OK, else -1. */
+SPAN_DECLARE(int) dtmf_tx_release(dtmf_tx_state_t *s);
+
 /*! \brief Free a DTMF tone generator context.
     \param s The DTMF tone generator context.
     \return 0 for OK, else -1. */
@@ -195,6 +200,11 @@ SPAN_DECLARE(dtmf_rx_state_t *) dtmf_rx_init(dtmf_rx_state_t *s,
                                              digits_rx_callback_t callback,
                                              void *user_data);
 
+/*! \brief Release a DTMF receiver context.
+    \param s The DTMF receiver context.
+    \return 0 for OK, else -1. */
+SPAN_DECLARE(int) dtmf_rx_release(dtmf_rx_state_t *s);
+
 /*! \brief Free a DTMF receiver context.
     \param s The DTMF receiver context.
     \return 0 for OK, else -1. */
index 3564d6237dced53a8b999cb7b5f9c0f6fccc0a0b..eb423dd0f7e27694e2e7487107c2d25b705b1bd5 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: echo.h,v 1.18 2009/02/03 16:28:41 steveu Exp $
+ * $Id: echo.h,v 1.19 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -196,12 +196,19 @@ extern "C"
     \param len The length of the canceller, in samples.
     \return The new canceller context, or NULL if the canceller could not be created.
 */
-SPAN_DECLARE(echo_can_state_t *) echo_can_create(int len, int adaption_mode);
+SPAN_DECLARE(echo_can_state_t *) echo_can_init(int len, int adaption_mode);
+
+/*! Release a voice echo canceller context.
+    \param ec The echo canceller context.
+    \return 0 for OK, else -1.
+*/
+SPAN_DECLARE(int) echo_can_release(echo_can_state_t *ec);
 
 /*! Free a voice echo canceller context.
     \param ec The echo canceller context.
+    \return 0 for OK, else -1.
 */
-SPAN_DECLARE(void) echo_can_free(echo_can_state_t *ec);
+SPAN_DECLARE(int) echo_can_free(echo_can_state_t *ec);
 
 /*! Flush (reinitialise) a voice echo canceller context.
     \param ec The echo canceller context.
index 33be635b789c514d8fbc35bfaa4714b7af0a4c12..850db3907a8920a0a2c47ea524a62b4890cfaab2 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: fast_convert.h,v 1.2 2009/02/05 12:21:36 steveu Exp $
+ * $Id: fast_convert.h,v 1.3 2009/02/10 13:06:47 steveu Exp $
  */
 
 #if !defined(_SPANDSP_FAST_CONVERT_H_)
@@ -82,6 +82,7 @@ extern "C"
  */
 
 #if defined(__CYGWIN__)
+#if !defined(__cplusplus)
     /*
      *    CYGWIN has lrint and lrintf functions, but they are slow and buggy:
      *        http://sourceware.org/ml/cygwin/2005-06/msg00153.html
@@ -118,6 +119,7 @@ extern "C"
         );
         return retval;
     }
+#endif
 
     /* The fastest way to convert is the equivalent of lrint() */
     static __inline__ long int lfastrint(double x)
index 6a04cc236587251682d9a21dea8c51e8f78e2f66..80b7b2ca7a9a0e67603d66a1edadd0ad872742d4 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: fax_modems.h,v 1.8 2009/02/03 16:28:41 steveu Exp $
+ * $Id: fax_modems.h,v 1.9 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -44,8 +44,13 @@ extern "C"
 SPAN_DECLARE(int) fax_modems_v17_v21_rx(void *user_data, const int16_t amp[], int len);
 SPAN_DECLARE(int) fax_modems_v27ter_v21_rx(void *user_data, const int16_t amp[], int len);
 SPAN_DECLARE(int) fax_modems_v29_v21_rx(void *user_data, const int16_t amp[], int len);
+
 SPAN_DECLARE(fax_modems_state_t *) fax_modems_init(fax_modems_state_t *s, void *user_data);
 
+SPAN_DECLARE(int) fax_modems_release(fax_modems_state_t *s);
+
+SPAN_DECLARE(int) fax_modems_free(fax_modems_state_t *s);
+
 #if defined(__cplusplus)
 }
 #endif
index c443cf2f2f61fe1662f936a6acd6062bba03df82..89af683cdef918d73963d9b963a04e0e14668208 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.35 2009/02/03 16:28:41 steveu Exp $
+ * $Id: fsk.h,v 1.36 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -148,6 +148,10 @@ SPAN_DECLARE(fsk_tx_state_t *) fsk_tx_init(fsk_tx_state_t *s,
                                            get_bit_func_t get_bit,
                                            void *user_data);
 
+SPAN_DECLARE(int) fsk_tx_release(fsk_tx_state_t *s);
+
+SPAN_DECLARE(int) fsk_tx_free(fsk_tx_state_t *s);
+
 /*! Adjust an FSK modem transmit context's power output.
     \brief Adjust an FSK modem transmit context's power output.
     \param s The modem context.
@@ -197,6 +201,10 @@ SPAN_DECLARE(fsk_rx_state_t *) fsk_rx_init(fsk_rx_state_t *s,
                                            put_bit_func_t put_bit,
                                            void *user_data);
 
+SPAN_DECLARE(int) fsk_rx_release(fsk_rx_state_t *s);
+
+SPAN_DECLARE(int) fsk_rx_free(fsk_rx_state_t *s);
+
 /*! Process a block of received FSK modem audio samples.
     \brief Process a block of received FSK modem audio samples.
     \param s The modem context.
index 0ab8a79ce5b479cb0566603234c9b2c997ecfc40..d0e31a1d4007dc8c51ccc98686b3ee430fe32dc4 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: g711.h,v 1.17 2009/02/03 16:28:41 steveu Exp $
+ * $Id: g711.h,v 1.18 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -280,11 +280,16 @@ SPAN_DECLARE(int) g711_transcode(g711_state_t *s,
     \return A pointer to the G.711 context, or NULL for error. */
 SPAN_DECLARE(g711_state_t *) g711_init(g711_state_t *s, int mode);
 
-/*! Free a G.711 encode or decode context.
+/*! Release a G.711 encode or decode context.
     \param s The G.711 context.
     \return 0 for OK. */
 SPAN_DECLARE(int) g711_release(g711_state_t *s);
 
+/*! Free a G.711 encode or decode context.
+    \param s The G.711 context.
+    \return 0 for OK. */
+SPAN_DECLARE(int) g711_free(g711_state_t *s);
+
 #if defined(__cplusplus)
 }
 #endif
index 3ec29b2857e4bc9bf4ac8a555603685be12c95f1..c2bf4420b6b04f9197004f6e372fbb79fec6d35e 100644 (file)
@@ -28,7 +28,7 @@
  * Computer Science, Speech Group
  * Chengxiang Lu and Alex Hauptmann
  *
- * $Id: g722.h,v 1.24 2009/02/03 16:28:41 steveu Exp $
+ * $Id: g722.h,v 1.25 2009/02/10 13:06:47 steveu Exp $
  */
 
 
@@ -75,6 +75,8 @@ SPAN_DECLARE(g722_encode_state_t *) g722_encode_init(g722_encode_state_t *s, int
 
 SPAN_DECLARE(int) g722_encode_release(g722_encode_state_t *s);
 
+SPAN_DECLARE(int) g722_encode_free(g722_encode_state_t *s);
+
 /*! Encode a buffer of linear PCM data to G.722
     \param s The G.722 context.
     \param g722_data The G.722 data produced.
@@ -93,6 +95,8 @@ SPAN_DECLARE(g722_decode_state_t *) g722_decode_init(g722_decode_state_t *s, int
 
 SPAN_DECLARE(int) g722_decode_release(g722_decode_state_t *s);
 
+SPAN_DECLARE(int) g722_decode_free(g722_decode_state_t *s);
+
 /*! Decode a buffer of G.722 data to linear PCM.
     \param s The G.722 context.
     \param amp The audio sample buffer.
index a237fa508e6765d85e841461b1e738fd58728dd0..bace8bd602fba44739dd57af3c8990710de39233 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.24 2009/02/03 16:28:41 steveu Exp $
+ * $Id: g726.h,v 1.25 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -79,11 +79,16 @@ extern "C"
     \return A pointer to the G.726 context, or NULL for error. */
 SPAN_DECLARE(g726_state_t *) g726_init(g726_state_t *s, int bit_rate, int ext_coding, int packing);
 
-/*! Free a G.726 encode or decode context.
+/*! Release a G.726 encode or decode context.
     \param s The G.726 context.
     \return 0 for OK. */
 SPAN_DECLARE(int) g726_release(g726_state_t *s);
 
+/*! Free a G.726 encode or decode context.
+    \param s The G.726 context.
+    \return 0 for OK. */
+SPAN_DECLARE(int) g726_free(g726_state_t *s);
+
 /*! Decode a buffer of G.726 ADPCM data to linear PCM, a-law or u-law.
     \param s The G.726 context.
     \param amp The audio sample buffer.
index c4b9361cff2303d51936e600a8f636dd5e4dc349..b31b7db3e4cda064caf421a47514a2e43b2262d9 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: gsm0610.h,v 1.20 2009/02/03 16:28:41 steveu Exp $
+ * $Id: gsm0610.h,v 1.21 2009/02/10 13:06:47 steveu Exp $
  */
 
 #if !defined(_SPANDSP_GSM0610_H_)
@@ -90,6 +90,11 @@ SPAN_DECLARE(gsm0610_state_t *) gsm0610_init(gsm0610_state_t *s, int packing);
     \return 0 for success, else -1. */
 SPAN_DECLARE(int) gsm0610_release(gsm0610_state_t *s);
 
+/*! Free a GSM 06.10 encode or decode context.
+    \param s The GSM 06.10 context
+    \return 0 for success, else -1. */
+SPAN_DECLARE(int) gsm0610_free(gsm0610_state_t *s);
+
 /*! Set the packing format for a GSM 06.10 encode or decode context.
     \param s The GSM 06.10 context
     \param packing One of the GSM0610_PACKING_xxx options.
index ac3172001faa6bd9cd71450b62f164905f507ba1..145234ec57d899ab4a947672435a8e1e17862633 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.h,v 1.42 2009/02/03 16:28:41 steveu Exp $
+ * $Id: hdlc.h,v 1.43 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -101,6 +101,10 @@ SPAN_DECLARE(hdlc_rx_state_t *) hdlc_rx_init(hdlc_rx_state_t *s,
                                              hdlc_frame_handler_t handler,
                                              void *user_data);
 
+SPAN_DECLARE(int) hdlc_rx_release(hdlc_rx_state_t *s);
+
+SPAN_DECLARE(int) hdlc_rx_free(hdlc_rx_state_t *s);
+
 /*! \brief Set the maximum frame length for an HDLC receiver context.
     \param s A pointer to an HDLC receiver context.
     \param max_len The maximum permitted length of a frame.
@@ -157,6 +161,10 @@ SPAN_DECLARE(hdlc_tx_state_t *) hdlc_tx_init(hdlc_tx_state_t *s,
                                              hdlc_underflow_handler_t handler,
                                              void *user_data);
 
+SPAN_DECLARE(int) hdlc_tx_release(hdlc_tx_state_t *s);
+
+SPAN_DECLARE(int) hdlc_tx_free(hdlc_tx_state_t *s);
+
 /*! \brief Set the maximum frame length for an HDLC transmitter context.
     \param s A pointer to an HDLC transmitter context.
     \param max_len The maximum length.
index c1b6e8d200a863fd757e8a68a41adb272565f6f6..2039e75c177b4634596fcb0542183d5aea49e86a 100644 (file)
@@ -26,7 +26,7 @@
  * Based on a bit from here, a bit from there, eye of toad,
  * ear of bat, etc - plus, of course, my own 2 cents.
  *
- * $Id: ima_adpcm.h,v 1.23 2009/02/03 16:28:41 steveu Exp $
+ * $Id: ima_adpcm.h,v 1.24 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -77,11 +77,16 @@ SPAN_DECLARE(ima_adpcm_state_t *) ima_adpcm_init(ima_adpcm_state_t *s,
                                                  int variant,
                                                  int chunk_size);
 
-/*! Free an IMA ADPCM encode or decode context.
+/*! Release an IMA ADPCM encode or decode context.
     \param s The IMA ADPCM context.
     \return 0 for OK. */
 SPAN_DECLARE(int) ima_adpcm_release(ima_adpcm_state_t *s);
 
+/*! Free an IMA ADPCM encode or decode context.
+    \param s The IMA ADPCM context.
+    \return 0 for OK. */
+SPAN_DECLARE(int) ima_adpcm_free(ima_adpcm_state_t *s);
+
 /*! Encode a buffer of linear PCM data to IMA ADPCM.
     \param s The IMA ADPCM context.
     \param ima_data The IMA ADPCM data produced.
index ffb7f2e5267a3d512a684a880843f0f2df8821e6..db36fdbf745fd34e9be0c7b26c4a68d9b00c4bdc 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: logging.h,v 1.18 2009/01/31 08:48:11 steveu Exp $
+ * $Id: logging.h,v 1.19 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -109,8 +109,6 @@ SPAN_DECLARE(int) span_log(logging_state_t *s, int level, const char *format, ..
 */
 SPAN_DECLARE(int) span_log_buf(logging_state_t *s, int level, const char *tag, const uint8_t *buf, int len);
 
-SPAN_DECLARE(int) span_log_init(logging_state_t *s, int level, const char *tag);
-
 SPAN_DECLARE(int) span_log_set_level(logging_state_t *s, int level);
 
 SPAN_DECLARE(int) span_log_set_tag(logging_state_t *s, const char *tag);
@@ -129,6 +127,12 @@ SPAN_DECLARE(void) span_set_message_handler(message_handler_func_t func);
 
 SPAN_DECLARE(void) span_set_error_handler(error_handler_func_t func);
 
+SPAN_DECLARE(int) span_log_init(logging_state_t *s, int level, const char *tag);
+
+SPAN_DECLARE(int) span_log_release(logging_state_t *s);
+
+SPAN_DECLARE(int) span_log_free(logging_state_t *s);
+
 #if defined(__cplusplus)
 }
 #endif
index fa5a1241e9886dea7cc236d8fd73581418e62c38..76c58eb1d4136f792dad3d21538c93963a96ea7c 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: lpc10.h,v 1.20 2009/02/03 16:28:41 steveu Exp $
+ * $Id: lpc10.h,v 1.21 2009/02/10 13:06:47 steveu Exp $
  */
 
 #if !defined(_SPANDSP_LPC10_H_)
@@ -78,6 +78,8 @@ SPAN_DECLARE(lpc10_encode_state_t *) lpc10_encode_init(lpc10_encode_state_t *s,
 
 SPAN_DECLARE(int) lpc10_encode_release(lpc10_encode_state_t *s);
 
+SPAN_DECLARE(int) lpc10_encode_free(lpc10_encode_state_t *s);
+
 /*! Encode a buffer of linear PCM data to LPC10e.
     \param s The LPC10e context.
     \param ima_data The LPC10e data produced.
@@ -95,6 +97,8 @@ SPAN_DECLARE(lpc10_decode_state_t *) lpc10_decode_init(lpc10_decode_state_t *st,
 
 SPAN_DECLARE(int) lpc10_decode_release(lpc10_decode_state_t *s);
 
+SPAN_DECLARE(int) lpc10_decode_free(lpc10_decode_state_t *s);
+
 /*! Decode a buffer of LPC10e data to linear PCM.
     \param s The LPC10e context.
     \param amp The audio sample buffer.
index c8dc4e2f5d623fbca6332b6afc7d3d82e8c0b316..a1c13b7e598d140c9e1818120a553f6cce9d665c 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.21 2009/02/03 16:28:41 steveu Exp $
+ * $Id: modem_connect_tones.h,v 1.22 2009/02/10 13:06:47 steveu Exp $
  */
  
 /*! \file */
@@ -107,6 +107,12 @@ extern "C"
 SPAN_DECLARE(modem_connect_tones_tx_state_t *) modem_connect_tones_tx_init(modem_connect_tones_tx_state_t *s,
                                                                            int tone_type);
 
+/*! \brief Release an instance of the modem connect tones generator.
+    \param s The context.
+    \return 0 for OK, else -1.
+*/
+SPAN_DECLARE(int) modem_connect_tones_tx_release(modem_connect_tones_tx_state_t *s);
+
 /*! \brief Free an instance of the modem connect tones generator.
     \param s The context.
     \return 0 for OK, else -1.
@@ -152,6 +158,11 @@ SPAN_DECLARE(modem_connect_tones_rx_state_t *) modem_connect_tones_rx_init(modem
                                                                            tone_report_func_t tone_callback,
                                                                            void *user_data);
 
+/*! \brief Release an instance of the modem connect tones detector.
+    \param s The context.
+    \return 0 for OK, else -1. */
+SPAN_DECLARE(int) modem_connect_tones_rx_release(modem_connect_tones_rx_state_t *s);
+
 /*! \brief Free an instance of the modem connect tones detector.
     \param s The context.
     \return 0 for OK, else -1. */
index d04dbe3204b4134d4e3fc3db5c8fa25429522eba..eca1136864e804e8117b7000d623a87bb9abfd69 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: noise.h,v 1.16 2009/02/03 16:28:41 steveu Exp $
+ * $Id: noise.h,v 1.17 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -112,6 +112,8 @@ SPAN_DECLARE(noise_state_t *) noise_init_dbm0(noise_state_t *s, int seed, float
 
 SPAN_DECLARE(noise_state_t *) noise_init_dbov(noise_state_t *s, int seed, float level, int class_of_noise, int quality);
 
+SPAN_DECLARE(int) noise_release(noise_state_t *s);
+
 SPAN_DECLARE(int) noise_free(noise_state_t *s);
 
 /*! Generate a sample of audio noise.
index dec6b4df8d0335cf896515b064be2828404e2c53..c9bfef7ef375350904a8f6324a4c0c6ced7383a7 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: oki_adpcm.h,v 1.23 2009/02/03 16:28:41 steveu Exp $
+ * $Id: oki_adpcm.h,v 1.24 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -64,11 +64,16 @@ extern "C"
 SPAN_DECLARE(oki_adpcm_state_t *) oki_adpcm_init(oki_adpcm_state_t *s,
                                                  int bit_rate);
 
-/*! Free an Oki ADPCM encode or decode context.
+/*! Release an Oki ADPCM encode or decode context.
     \param s The Oki ADPCM context.
     \return 0 for OK. */
 SPAN_DECLARE(int) oki_adpcm_release(oki_adpcm_state_t *s);
 
+/*! Free an Oki ADPCM encode or decode context.
+    \param s The Oki ADPCM context.
+    \return 0 for OK. */
+SPAN_DECLARE(int) oki_adpcm_free(oki_adpcm_state_t *s);
+
 /*! Decode a buffer of Oki ADPCM data to linear PCM.
     \param s The Oki ADPCM context.
     \param amp The audio sample buffer.
index d6d2a6c8fd1c44b847a176cd9b78deedf5fc6923..abe3584a06353b5045ba0e16ffa9f331b0f89092 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: playout.h,v 1.13 2009/02/03 16:28:41 steveu Exp $
+ * $Id: playout.h,v 1.14 2009/02/10 13:06:47 steveu Exp $
  */
 
 #if !defined(_SPANDSP_PLAYOUT_H_)
@@ -182,17 +182,6 @@ SPAN_DECLARE(timestamp_t) playout_current_length(playout_state_t *s);
     \return The next timestamp. */
 SPAN_DECLARE(timestamp_t) playout_next_due(playout_state_t *s);
 
-/*! Create a new instance of play-out buffering.
-    \param min_length Minimum length of the buffer, in samples.
-    \param max_length Maximum length of the buffer, in samples. If this equals min_length, static
-           length buffering is used.
-    \return The new context */
-SPAN_DECLARE(playout_state_t *) playout_new(int min_length, int max_length);
-
-/*! Destroy an instance of play-out buffering.
-    \param s The play-out context to be destroyed */
-SPAN_DECLARE(void) playout_free(playout_state_t *s);
-
 /*! Reset an instance of play-out buffering.
     NOTE:  The buffer should be empty before you call this function, otherwise
            you will leak queued frames, and some internal structures
@@ -202,6 +191,23 @@ SPAN_DECLARE(void) playout_free(playout_state_t *s);
            length buffering is used. */
 SPAN_DECLARE(void) playout_restart(playout_state_t *s, int min_length, int max_length);
 
+/*! Create a new instance of play-out buffering.
+    \param min_length Minimum length of the buffer, in samples.
+    \param max_length Maximum length of the buffer, in samples. If this equals min_length, static
+           length buffering is used.
+    \return The new context */
+SPAN_DECLARE(playout_state_t *) playout_init(int min_length, int max_length);
+
+/*! Release an instance of play-out buffering.
+    \param s The play-out context to be releaased
+    \return 0 if OK, else -1 */
+SPAN_DECLARE(int) playout_release(playout_state_t *s);
+
+/*! Free an instance of play-out buffering.
+    \param s The play-out context to be destroyed
+    \return 0 if OK, else -1 */
+SPAN_DECLARE(int) playout_free(playout_state_t *s);
+
 #if defined(__cplusplus)
 }
 #endif
index b01fe9af12e23ed024d206a1216d3a28d857aa2a..f4cbade794e7ebf769984f72db8e46864af5cce1 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: plc.h,v 1.20 2009/02/03 16:28:41 steveu Exp $
+ * $Id: plc.h,v 1.21 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -155,6 +155,11 @@ SPAN_DECLARE(int) plc_fillin(plc_state_t *s, int16_t amp[], int len);
     \return A pointer to the the packet loss concealer context. */
 SPAN_DECLARE(plc_state_t *) plc_init(plc_state_t *s);
 
+/*! Release a packet loss concealer context.
+    \param s The packet loss concealer context.
+    \return 0 for OK. */
+SPAN_DECLARE(int) plc_release(plc_state_t *s);
+
 /*! Free a packet loss concealer context.
     \param s The packet loss concealer context.
     \return 0 for OK. */
index 27a3576dd888b3c5d010ebaea268deaac6995af2..1f9a0abe96d5a6c762aea3f39b4c33a0bf2dbf56 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: power_meter.h,v 1.17 2009/02/03 16:28:41 steveu Exp $
+ * $Id: power_meter.h,v 1.18 2009/02/10 13:06:47 steveu Exp $
  */
 
 #if !defined(_POWER_METER_H_)
@@ -68,6 +68,10 @@ extern "C"
     \return The power meter context. */
 SPAN_DECLARE(power_meter_t *) power_meter_init(power_meter_t *s, int shift);
 
+SPAN_DECLARE(int) power_meter_release(power_meter_t *s);
+
+SPAN_DECLARE(int) power_meter_free(power_meter_t *s);
+
 /*! Change the damping factor of a power meter context.
     \brief Change the damping factor of a power meter context.
     \param s The power meter context.
index cf0d18ae78dd73acbd0e54d44e9989c7a6c0f5d3..d5e58d44963f2a3623b45d031bd9ec1f7846b890 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: queue.h,v 1.20 2009/02/03 16:28:41 steveu Exp $
+ * $Id: queue.h,v 1.21 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -160,10 +160,16 @@ SPAN_DECLARE(int) queue_write_msg(queue_state_t *s, const uint8_t *buf, int len)
     \return A pointer to the context if OK, else NULL. */
 SPAN_DECLARE(queue_state_t *) queue_init(queue_state_t *s, int len, int flags);
 
-/*! Delete a queue.
+/*! Release a queue.
+    \brief Release a queue.
+    \param s The queue context.
+    \return 0 if OK, else -1. */
+SPAN_DECLARE(int) queue_release(queue_state_t *s);
+
+/*! Free a queue.
     \brief Delete a queue.
     \param s The queue context.
-    \return 0 if deleted OK, else -1. */
+    \return 0 if OK, else -1. */
 SPAN_DECLARE(int) queue_free(queue_state_t *s);
 
 #if defined(__cplusplus)
index d9f607a1868c16fe1639c77a24b3754b14296fa6..20c99f1577eb1aecc80a8beafd40308bbceb17ad 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: schedule.h,v 1.19 2009/02/03 16:28:41 steveu Exp $
+ * $Id: schedule.h,v 1.20 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -60,6 +60,7 @@ SPAN_DECLARE(void) span_schedule_del(span_sched_state_t *s, int id);
 
 SPAN_DECLARE(span_sched_state_t *) span_schedule_init(span_sched_state_t *s);
 SPAN_DECLARE(int) span_schedule_release(span_sched_state_t *s);
+SPAN_DECLARE(int) span_schedule_free(span_sched_state_t *s);
 
 #if defined(__cplusplus)
 }
index 2f397be74911e08fae7807f5800af049f076491d..904e459c0a87ddaa897e37995e0751aea7b93404 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.17 2009/02/03 16:28:41 steveu Exp $
+ * $Id: sig_tone.h,v 1.18 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -115,6 +115,10 @@ SPAN_DECLARE(int) sig_tone_rx(sig_tone_rx_state_t *s, int16_t amp[], int len);
     \return A pointer to the signalling tone context, or NULL if there was a problem. */
 SPAN_DECLARE(sig_tone_rx_state_t *) sig_tone_rx_init(sig_tone_rx_state_t *s, int tone_type, sig_tone_func_t sig_update, void *user_data);
 
+SPAN_DECLARE(int) sig_tone_rx_release(sig_tone_rx_state_t *s);
+
+SPAN_DECLARE(int) sig_tone_rx_free(sig_tone_rx_state_t *s);
+
 /*! Generate a block of signaling tone audio samples.
     \brief Generate a block of signaling tone audio samples.
     \param s The signaling tone context.
@@ -138,6 +142,10 @@ SPAN_DECLARE(void) sig_tone_tx_set_mode(sig_tone_tx_state_t *s, int mode);
     \return A pointer to the signalling tone context, or NULL if there was a problem. */
 SPAN_DECLARE(sig_tone_tx_state_t *) sig_tone_tx_init(sig_tone_tx_state_t *s, int tone_type, sig_tone_func_t sig_update, void *user_data);
 
+SPAN_DECLARE(int) sig_tone_tx_release(sig_tone_tx_state_t *s);
+
+SPAN_DECLARE(int) sig_tone_tx_free(sig_tone_tx_state_t *s);
+
 #if defined(__cplusplus)
 }
 #endif
index e65509b73dbbb891cffe1474e1f71a7927c2eb69..f8521a3d412a84d8073ba8a14b5be73e986c887d 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: silence_gen.h,v 1.15 2009/02/04 13:18:53 steveu Exp $
+ * $Id: silence_gen.h,v 1.16 2009/02/10 13:06:47 steveu Exp $
  */
 
 #if !defined(_SPANDSP_SILENCE_GEN_H_)
@@ -105,6 +105,10 @@ SPAN_DECLARE(void) silence_gen_status_handler(silence_gen_state_t *s, modem_tx_s
 */
 SPAN_DECLARE(silence_gen_state_t *) silence_gen_init(silence_gen_state_t *s, int silent_samples);
 
+SPAN_DECLARE(int) silence_gen_release(silence_gen_state_t *s);
+
+SPAN_DECLARE(int) silence_gen_free(silence_gen_state_t *s);
+
 /* The following dummy routines, to absorb data, don't really have a proper home,
    so they have been put here. */
 
index a24bc8b2efb1eb71d9f7b93efbb3b22ea0184c08..790c694e691d5387387e9608cc97024de3f936ff 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: super_tone_rx.h,v 1.20 2009/02/03 16:28:41 steveu Exp $
+ * $Id: super_tone_rx.h,v 1.21 2009/02/10 13:06:47 steveu Exp $
  */
 
 #if !defined(_SPANDSP_SUPER_TONE_RX_H_)
@@ -119,6 +119,12 @@ SPAN_DECLARE(super_tone_rx_state_t *) super_tone_rx_init(super_tone_rx_state_t *
     \param s The supervisory tone context.
     \return 0 for OK, -1 for fail.
 */
+SPAN_DECLARE(int) super_tone_rx_release(super_tone_rx_state_t *s);
+
+/*! Free a supervisory tone detector.
+    \param s The supervisory tone context.
+    \return 0 for OK, -1 for fail.
+*/
 SPAN_DECLARE(int) super_tone_rx_free(super_tone_rx_state_t *s);
 
 /*! Define a callback routine to be called each time a tone pattern element is complete. This is
index b6153f8d39dff60c790bca8a2b23b14ddf82d050..b2de99fbb73be9f7819bb3aada377a328676f005 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: super_tone_tx.h,v 1.16 2009/02/03 16:28:41 steveu Exp $
+ * $Id: super_tone_tx.h,v 1.17 2009/02/10 13:06:47 steveu Exp $
  */
 
 #if !defined(_SPANDSP_SUPER_TONE_TX_H_)
@@ -58,7 +58,7 @@ SPAN_DECLARE(super_tone_tx_step_t *) super_tone_tx_make_step(super_tone_tx_step_
                                                              int length,
                                                              int cycles);
 
-SPAN_DECLARE(void) super_tone_tx_free(super_tone_tx_step_t *s);
+SPAN_DECLARE(int) super_tone_tx_free_tone(super_tone_tx_step_t *s);
 
 /*! Initialise a supervisory tone generator.
     \brief Initialise a supervisory tone generator.
@@ -67,6 +67,10 @@ SPAN_DECLARE(void) super_tone_tx_free(super_tone_tx_step_t *s);
     \return The supervisory tone generator context. */
 SPAN_DECLARE(super_tone_tx_state_t *) super_tone_tx_init(super_tone_tx_state_t *s, super_tone_tx_step_t *tree);
 
+SPAN_DECLARE(int) super_tone_tx_release(super_tone_tx_state_t *s);
+
+SPAN_DECLARE(int) super_tone_tx_free(super_tone_tx_state_t *s);
+
 /*! Generate a block of audio samples for a supervisory tone pattern.
     \brief Generate a block of audio samples for a supervisory tone pattern.
     \param s The supervisory tone context.
index f33d071ac95ef77178fa7ca2154f5c7939bcfd47..0d02196fb7c1d8f3db7da4858280cbf5f82065b7 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: t31.h,v 1.57 2009/02/03 16:28:41 steveu Exp $
+ * $Id: t31.h,v 1.58 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -140,6 +140,12 @@ SPAN_DECLARE(t31_state_t *) t31_init(t31_state_t *s,
     \return 0 for OK */
 SPAN_DECLARE(int) t31_release(t31_state_t *s);
 
+/*! Free a T.31 context.
+    \brief Release a T.31 context.
+    \param s The T.31 context.
+    \return 0 for OK */
+SPAN_DECLARE(int) t31_free(t31_state_t *s);
+
 #if defined(__cplusplus)
 }
 #endif
index 1d31e7ff797fb66514132324afea643cff131526..ba9e828575f793a7bbb33fa36276a88d4617fdc0 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: t38_core.h,v 1.36 2009/02/03 16:28:41 steveu Exp $
+ * $Id: t38_core.h,v 1.37 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -336,6 +336,10 @@ SPAN_DECLARE(t38_core_state_t *) t38_core_init(t38_core_state_t *s,
                                                t38_tx_packet_handler_t *tx_packet_handler,
                                                void *tx_packet_user_data);
 
+SPAN_DECLARE(int) t38_core_release(t38_core_state_t *s);
+
+SPAN_DECLARE(int) t38_core_free(t38_core_state_t *s);
+
 #if defined(__cplusplus)
 }
 #endif
index ea6dd25f0ac9a6cc4e39bd4aa98d8849ab3e6b43..9ac760e8de465ee1cba3f09a2baecd5be96192e7 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: t38_gateway.h,v 1.61 2009/02/03 16:28:41 steveu Exp $
+ * $Id: t38_gateway.h,v 1.62 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -86,6 +86,12 @@ SPAN_DECLARE(t38_gateway_state_t *) t38_gateway_init(t38_gateway_state_t *s,
                                                      t38_tx_packet_handler_t *tx_packet_handler,
                                                      void *tx_packet_user_data);
 
+/*! Release a gateway mode T.38 context.
+    \brief Release a T.38 context.
+    \param s The T.38 context.
+    \return 0 for OK, else -1. */
+SPAN_DECLARE(int) t38_gateway_release(t38_gateway_state_t *s);
+
 /*! Free a gateway mode T.38 context.
     \brief Free a T.38 context.
     \param s The T.38 context.
index 5f6f2d247bbc01b2997be533f9a8b170d610c33a..a1c6cc2e583bd0f029c84ea9535556a17a5aae11 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_non_ecm_buffer.h,v 1.6 2009/02/04 13:18:53 steveu Exp $
+ * $Id: t38_non_ecm_buffer.h,v 1.7 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -61,6 +61,10 @@ extern "C"
     \return A pointer to the buffer context, or NULL if there was a problem. */
 SPAN_DECLARE(t38_non_ecm_buffer_state_t *) t38_non_ecm_buffer_init(t38_non_ecm_buffer_state_t *s, int mode, int min_row_bits);
 
+SPAN_DECLARE(int) t38_non_ecm_buffer_release(t38_non_ecm_buffer_state_t *s);
+
+SPAN_DECLARE(int) t38_non_ecm_buffer_free(t38_non_ecm_buffer_state_t *s);
+
 /*! \brief Set the mode of a T.38 rate adapting non-ECM buffer context.
     \param s The buffer context.
     \param mode TRUE for image data mode, or FALSE for TCF mode.
index 3e3ff4a002a8e8b230cc5a3c917685ffd6fe69ba..533d7c08de6cb1c818337f14d078f4565a183b42 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: t4.h,v 1.56 2009/02/05 12:21:36 steveu Exp $
+ * $Id: t4.h,v 1.57 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -244,6 +244,13 @@ SPAN_DECLARE(int) t4_rx_put_chunk(t4_state_t *s, const uint8_t buf[], int len);
     \return 0 for success, otherwise -1. */
 SPAN_DECLARE(int) t4_rx_end_page(t4_state_t *s);
 
+/*! \brief End reception of a document. Tidy up and close the file.
+           This should be used to end T.4 reception started with
+           t4_rx_init.
+    \param s The T.4 receive context.
+    \return 0 for success, otherwise -1. */
+SPAN_DECLARE(int) t4_rx_release(t4_state_t *s);
+
 /*! \brief End reception of a document. Tidy up, close the file and
            free the context. This should be used to end T.4 reception
            started with t4_rx_init.
@@ -251,13 +258,6 @@ SPAN_DECLARE(int) t4_rx_end_page(t4_state_t *s);
     \return 0 for success, otherwise -1. */
 SPAN_DECLARE(int) t4_rx_free(t4_state_t *s);
 
-/*! \brief End reception of a document. Tidy up and close the file.
-           This should be used to end T.4 reception started with
-           t4_rx_init.
-    \param s The T.4 context.
-    \return 0 for success, otherwise -1. */
-SPAN_DECLARE(int) t4_rx_end(t4_state_t *s);
-
 SPAN_DECLARE(int) t4_rx_set_row_write_handler(t4_state_t *s, t4_row_write_handler_t handler, void *user_data);
 
 /*! \brief Set the encoding for the received data.
@@ -374,6 +374,12 @@ SPAN_DECLARE(int) t4_tx_get_chunk(t4_state_t *s, uint8_t buf[], int max_len);
             set (i.e. the returned value is 2 or 3). */
 SPAN_DECLARE(int) t4_tx_check_bit(t4_state_t *s);
 
+/*! \brief End the transmission of a document. Tidy up and close the file.
+           This should be used to end T.4 transmission started with t4_tx_init.
+    \param s The T.4 context.
+    \return 0 for success, otherwise -1. */
+SPAN_DECLARE(int) t4_tx_release(t4_state_t *s);
+
 /*! \brief End the transmission of a document. Tidy up, close the file and
            free the context. This should be used to end T.4 transmission
            started with t4_tx_init.
@@ -381,12 +387,6 @@ SPAN_DECLARE(int) t4_tx_check_bit(t4_state_t *s);
     \return 0 for success, otherwise -1. */
 SPAN_DECLARE(int) t4_tx_free(t4_state_t *s);
 
-/*! \brief End the transmission of a document. Tidy up and close the file.
-           This should be used to end T.4 transmission started with t4_tx_init.
-    \param s The T.4 context.
-    \return 0 for success, otherwise -1. */
-SPAN_DECLARE(int) t4_tx_end(t4_state_t *s);
-
 /*! \brief Set the encoding for the encoded data.
     \param s The T.4 context.
     \param encoding The encoding. */
index f42526d75aecf5521afeba20340fc63450108d5e..7b7a60eda78befcdf38b909144d56715e108fc19 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: time_scale.h,v 1.19 2009/02/03 16:28:41 steveu Exp $
+ * $Id: time_scale.h,v 1.20 2009/02/10 13:06:47 steveu Exp $
  */
 
 #if !defined(_SPANDSP_TIME_SCALE_H_)
@@ -73,6 +73,11 @@ extern "C"
     \return A pointer to the context, or NULL if there was a problem. */
 SPAN_DECLARE(time_scale_state_t *) time_scale_init(time_scale_state_t *s, int sample_rate, float playout_rate);
 
+/*! \brief Release a time scale context.
+    \param s The time scale context.
+    \return 0 for OK, else -1. */
+SPAN_DECLARE(int) time_scale_release(time_scale_state_t *s);
+
 /*! \brief Free a time scale context.
     \param s The time scale context.
     \return 0 for OK, else -1. */
index 07fe02df58ddc994958c3ac46995d5dd6ff42906..6822fff6765655b687cd65fb33c42ba1a2fe6e51 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: tone_detect.h,v 1.44 2009/02/03 16:28:41 steveu Exp $
+ * $Id: tone_detect.h,v 1.45 2009/02/10 13:06:47 steveu Exp $
  */
 
 #if !defined(_SPANDSP_TONE_DETECT_H_)
@@ -86,6 +86,10 @@ SPAN_DECLARE(void) make_goertzel_descriptor(goertzel_descriptor_t *t,
 SPAN_DECLARE(goertzel_state_t *) goertzel_init(goertzel_state_t *s,
                                                goertzel_descriptor_t *t);
 
+SPAN_DECLARE(int) goertzel_release(goertzel_state_t *s);
+
+SPAN_DECLARE(int) goertzel_free(goertzel_state_t *s);
+
 /*! \brief Reset the state of a Goertzel transform.
     \param s The Goertzel context. */
 SPAN_DECLARE(void) goertzel_reset(goertzel_state_t *s);
index 8e78d70fc767d642e4800629c01197f830955170..4ca3fadbb614f00e6a4208a49bf0a0af7a9e9e1f 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: tone_generate.h,v 1.37 2009/02/03 16:28:41 steveu Exp $
+ * $Id: tone_generate.h,v 1.38 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -88,9 +88,13 @@ SPAN_DECLARE(void) make_tone_gen_descriptor(tone_gen_descriptor_t *s,
                                             int d4,
                                             int repeat);
 
+SPAN_DECLARE(int) tone_gen(tone_gen_state_t *s, int16_t amp[], int max_samples);
+
 SPAN_DECLARE(tone_gen_state_t *) tone_gen_init(tone_gen_state_t *s, tone_gen_descriptor_t *t);
 
-SPAN_DECLARE(int) tone_gen(tone_gen_state_t *s, int16_t amp[], int max_samples);
+SPAN_DECLARE(int) tone_gen_release(tone_gen_state_t *s);
+
+SPAN_DECLARE(int) tone_gen_free(tone_gen_state_t *s);
 
 #if defined(__cplusplus)
 }
index 8d8d77e71eb6ffba5e1698c0556347d59dee6efd..efbbc37d73db14ea1ff0b9abeb5f71864fc1ca08 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.h,v 1.60 2009/02/03 16:28:41 steveu Exp $
+ * $Id: v17rx.h,v 1.61 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -253,6 +253,12 @@ SPAN_DECLARE(v17_rx_state_t *) v17_rx_init(v17_rx_state_t *s, int bit_rate, put_
     \return 0 for OK, -1 for bad parameter */
 SPAN_DECLARE(int) v17_rx_restart(v17_rx_state_t *s, int bit_rate, int short_train);
 
+/*! Release a V.17 modem receive context.
+    \brief Release a V.17 modem receive context.
+    \param s The modem context.
+    \return 0 for OK */
+SPAN_DECLARE(int) v17_rx_release(v17_rx_state_t *s);
+
 /*! Free a V.17 modem receive context.
     \brief Free a V.17 modem receive context.
     \param s The modem context.
index c02684b3b2104a4c39251428a01f981965dffbe6..6be30bdbdb5446081a350fd032c6275f3c287ead 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: v17tx.h,v 1.39 2009/02/03 16:28:41 steveu Exp $
+ * $Id: v17tx.h,v 1.40 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -120,6 +120,12 @@ SPAN_DECLARE(v17_tx_state_t *) v17_tx_init(v17_tx_state_t *s, int rate, int tep,
     \return 0 for OK, -1 for parameter error. */
 SPAN_DECLARE(int) v17_tx_restart(v17_tx_state_t *s, int bit_rate, int tep, int short_train);
 
+/*! Release a V.17 modem transmit context.
+    \brief Release a V.17 modem transmit context.
+    \param s The modem context.
+    \return 0 for OK */
+SPAN_DECLARE(int) v17_tx_release(v17_tx_state_t *s);
+
 /*! Free a V.17 modem transmit context.
     \brief Free a V.17 modem transmit context.
     \param s The modem context.
index 4bb755312b7dd255d86a4d7f1212d122fd5a3c06..de256ef925939522ce9e040365b23aeabdfacef7 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: v22bis.h,v 1.34 2009/02/03 16:28:41 steveu Exp $
+ * $Id: v22bis.h,v 1.35 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -152,6 +152,12 @@ SPAN_DECLARE(v22bis_state_t *) v22bis_init(v22bis_state_t *s,
                                            put_bit_func_t put_bit,
                                            void *user_data);
 
+/*! Release a V.22bis modem receive context.
+    \brief Release a V.22bis modem receive context.
+    \param s The modem context.
+    \return 0 for OK */
+SPAN_DECLARE(int) v22bis_release(v22bis_state_t *s);
+
 /*! Free a V.22bis modem receive context.
     \brief Free a V.22bis modem receive context.
     \param s The modem context.
index 7d660a07f8920f0ba2a67a6183f03128e9b7ffe1..3ad57293876200703c32e973bbddc52cb31d8d90 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.h,v 1.56 2009/02/03 16:28:41 steveu Exp $
+ * $Id: v27ter_rx.h,v 1.57 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -88,6 +88,12 @@ SPAN_DECLARE(v27ter_rx_state_t *) v27ter_rx_init(v27ter_rx_state_t *s, int bit_r
     \return 0 for OK, -1 for bad parameter */
 SPAN_DECLARE(int) v27ter_rx_restart(v27ter_rx_state_t *s, int bit_rate, int old_train);
 
+/*! Release a V.27ter modem receive context.
+    \brief Release a V.27ter modem receive context.
+    \param s The modem context.
+    \return 0 for OK */
+SPAN_DECLARE(int) v27ter_rx_release(v27ter_rx_state_t *s);
+
 /*! Free a V.27ter modem receive context.
     \brief Free a V.27ter modem receive context.
     \param s The modem context.
index 8dcfd9442ed40f6d7feb8e80d62afbee193d6d3e..826331d0bbf9d3c8220ea8f48ad064101f0659f5 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_tx.h,v 1.39 2009/02/03 16:28:41 steveu Exp $
+ * $Id: v27ter_tx.h,v 1.40 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -101,6 +101,12 @@ SPAN_DECLARE(v27ter_tx_state_t *) v27ter_tx_init(v27ter_tx_state_t *s, int bit_r
     \return 0 for OK, -1 for bad parameter */
 SPAN_DECLARE(int) v27ter_tx_restart(v27ter_tx_state_t *s, int bit_rate, int tep);
 
+/*! Release a V.27ter modem transmit context.
+    \brief Release a V.27ter modem transmit context.
+    \param s The modem context.
+    \return 0 for OK */
+SPAN_DECLARE(int) v27ter_tx_release(v27ter_tx_state_t *s);
+
 /*! Free a V.27ter modem transmit context.
     \brief Free a V.27ter modem transmit context.
     \param s The modem context.
index 59b0e4c106751518f2cc11c935d5767ce01c5e95..151b58164de48fa4f28054796016dbf38d680cde 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.h,v 1.67 2009/02/03 16:28:41 steveu Exp $
+ * $Id: v29rx.h,v 1.68 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -157,6 +157,12 @@ SPAN_DECLARE(v29_rx_state_t *) v29_rx_init(v29_rx_state_t *s, int bit_rate, put_
     \return 0 for OK, -1 for bad parameter */
 SPAN_DECLARE(int) v29_rx_restart(v29_rx_state_t *s, int bit_rate, int old_train);
 
+/*! Release a V.29 modem receive context.
+    \brief Release a V.29 modem receive context.
+    \param s The modem context.
+    \return 0 for OK */
+SPAN_DECLARE(int) v29_rx_release(v29_rx_state_t *s);
+
 /*! Free a V.29 modem receive context.
     \brief Free a V.29 modem receive context.
     \param s The modem context.
index f0fd50e4576b75f83e4df090f9268a13cf713559..1fc94d1b49c818eaca936d90ad32cf3903821081 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: v29tx.h,v 1.37 2009/02/03 16:28:41 steveu Exp $
+ * $Id: v29tx.h,v 1.38 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -132,6 +132,12 @@ SPAN_DECLARE(v29_tx_state_t *) v29_tx_init(v29_tx_state_t *s, int bit_rate, int
     \return 0 for OK, -1 for bad parameter */
 SPAN_DECLARE(int) v29_tx_restart(v29_tx_state_t *s, int bit_rate, int tep);
 
+/*! Release a V.29 modem transmit context.
+    \brief Release a V.29 modem transmit context.
+    \param s The modem context.
+    \return 0 for OK */
+SPAN_DECLARE(int) v29_tx_release(v29_tx_state_t *s);
+
 /*! Free a V.29 modem transmit context.
     \brief Free a V.29 modem transmit context.
     \param s The modem context.
index 5dedf61d490a10ebdc14a22eb30ffcdee1fc8d4b..3185908d04d2a5ad7d34ba12e299f6f7eefcbd9d 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: v42.h,v 1.29 2009/02/04 13:18:53 steveu Exp $
+ * $Id: v42.h,v 1.30 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \page v42_page V.42 modem error correction
@@ -147,6 +147,11 @@ SPAN_DECLARE(void) v42_restart(v42_state_t *s);
     \return 0 if OK */
 SPAN_DECLARE(int) v42_release(v42_state_t *s);
 
+/*! Free a V.42 context.
+    \param s The V.42 context.
+    \return 0 if OK */
+SPAN_DECLARE(int) v42_free(v42_state_t *s);
+
 #if defined(__cplusplus)
 }
 #endif
index 1f74fc71f9130d075b02a4a74f071cb2460c92ad..938276753766a70851c0924553b580390e1d8cfa 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: v42bis.h,v 1.25 2009/02/03 16:28:41 steveu Exp $
+ * $Id: v42bis.h,v 1.26 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \page v42bis_page V.42bis modem data compression
@@ -94,6 +94,14 @@ SPAN_DECLARE(int) v42bis_decompress(v42bis_state_t *s, const uint8_t *buf, int l
     \return 0 */
 SPAN_DECLARE(int) v42bis_decompress_flush(v42bis_state_t *s);
 
+/*! Set the compression mode.
+    \param s The V.42bis context.
+    \param mode One of the V.42bis compression modes -
+            V42BIS_COMPRESSION_MODE_DYNAMIC,
+            V42BIS_COMPRESSION_MODE_ALWAYS,
+            V42BIS_COMPRESSION_MODE_NEVER */
+SPAN_DECLARE(void) v42bis_compression_control(v42bis_state_t *s, int mode);
+
 /*! Initialise a V.42bis context.
     \param s The V.42bis context.
     \param negotiated_p0 The negotiated P0 parameter, from the V.42bis spec.
@@ -117,19 +125,16 @@ SPAN_DECLARE(v42bis_state_t *) v42bis_init(v42bis_state_t *s,
                                            void *data_user_data,
                                            int max_data_len);
 
-/*! Set the compression mode.
-    \param s The V.42bis context.
-    \param mode One of the V.42bis compression modes -
-            V42BIS_COMPRESSION_MODE_DYNAMIC,
-            V42BIS_COMPRESSION_MODE_ALWAYS,
-            V42BIS_COMPRESSION_MODE_NEVER */
-SPAN_DECLARE(void) v42bis_compression_control(v42bis_state_t *s, int mode);
-
 /*! Release a V.42bis context.
     \param s The V.42bis context.
     \return 0 if OK */
 SPAN_DECLARE(int) v42bis_release(v42bis_state_t *s);
 
+/*! Free a V.42bis context.
+    \param s The V.42bis context.
+    \return 0 if OK */
+SPAN_DECLARE(int) v42bis_free(v42bis_state_t *s);
+
 #if defined(__cplusplus)
 }
 #endif
index dd161426aaf571bb068e6f9720e5de16e908a7c8..3c83ec56343195495bb9b5e0254fc01a0f5a2b06 100644 (file)
@@ -30,8 +30,8 @@
 
 /* The date and time of the version are in UTC form. */
 
-#define SPANDSP_RELEASE_DATE    20090205
-#define SPANDSP_RELEASE_TIME    122416
+#define SPANDSP_RELEASE_DATE    20090210
+#define SPANDSP_RELEASE_TIME    172413
 
 #endif
 /*- End of file ------------------------------------------------------------*/
index 840154166d224936754a662285f40b6cbd3b3b0e..5c9af718d1af249732c66ea5e357298e462f1aa6 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: super_tone_rx.c,v 1.32 2009/02/03 16:28:40 steveu Exp $
+ * $Id: super_tone_rx.c,v 1.33 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -267,6 +267,12 @@ SPAN_DECLARE(super_tone_rx_state_t *) super_tone_rx_init(super_tone_rx_state_t *
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) super_tone_rx_release(super_tone_rx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) super_tone_rx_free(super_tone_rx_state_t *s)
 {
     if (s)
index 99d7616a31125d82bd45e181c9684e0489e085fc..a54d3fdd69da9c0250637f9dfe46b6f48defdfab 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: super_tone_tx.c,v 1.28 2009/02/03 16:28:40 steveu Exp $
+ * $Id: super_tone_tx.c,v 1.29 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -112,7 +112,7 @@ SPAN_DECLARE(super_tone_tx_step_t *) super_tone_tx_make_step(super_tone_tx_step_
 }
 /*- End of function --------------------------------------------------------*/
 
-SPAN_DECLARE(void) super_tone_tx_free(super_tone_tx_step_t *s)
+SPAN_DECLARE(int) super_tone_tx_free_tone(super_tone_tx_step_t *s)
 {
     super_tone_tx_step_t *t;
 
@@ -125,6 +125,7 @@ SPAN_DECLARE(void) super_tone_tx_free(super_tone_tx_step_t *s)
         s = s->next;
         free(t);
     }
+    return 0;
 }
 /*- End of function --------------------------------------------------------*/
 
@@ -147,6 +148,20 @@ SPAN_DECLARE(super_tone_tx_state_t *) super_tone_tx_init(super_tone_tx_state_t *
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) super_tone_tx_release(super_tone_tx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) super_tone_tx_free(super_tone_tx_state_t *s)
+{
+    if (s)
+        free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) super_tone_tx(super_tone_tx_state_t *s, int16_t amp[], int max_samples)
 {
     int samples;
index c0d3191d7b689b8a432de80f545c2577f9a9f342..592cee5df89c224b1e25a97061aa224c75073576 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.284 2009/02/04 13:18:53 steveu Exp $
+ * $Id: t30.c,v 1.285 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -367,12 +367,29 @@ static void timer_t4b_start(t30_state_t *s);
 #define set_ctrl_bits(s,val,bit) (s)[3 + ((bit - 1)/8)] |= ((val) << ((bit - 1)%8))
 #define clr_ctrl_bit(s,bit) (s)[3 + ((bit - 1)/8)] &= ~(1 << ((bit - 1)%8))
 
+static int terminate_operation_in_progress(t30_state_t *s)
+{
+    /* Make sure any FAX in progress is tidied up. If the tidying up has
+       already happened, repeating it here is harmless. */
+    switch (s->operation_in_progress)
+    {
+    case OPERATION_IN_PROGRESS_T4_TX:
+        t4_tx_release(&(s->t4));
+        break;
+    case OPERATION_IN_PROGRESS_T4_RX:
+        t4_rx_release(&(s->t4));
+        break;
+    }
+    s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 static int tx_start_page(t30_state_t *s)
 {
     if (t4_tx_start_page(&(s->t4)))
     {
-        t4_tx_end(&(s->t4));
-        s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
+        terminate_operation_in_progress(s);
         return -1;
     }
     s->ecm_block = 0;
@@ -1750,10 +1767,10 @@ static void disconnect(t30_state_t *s)
     switch (s->operation_in_progress)
     {
     case OPERATION_IN_PROGRESS_T4_TX:
-        t4_tx_end(&(s->t4));
+        t4_tx_release(&(s->t4));
         break;
     case OPERATION_IN_PROGRESS_T4_RX:
-        t4_rx_end(&(s->t4));
+        t4_rx_release(&(s->t4));
         break;
     }
     s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
@@ -1848,7 +1865,7 @@ static int start_sending_document(t30_state_t *s)
        must be evaluated before the minimum scan row bits can be evaluated. */
     if ((min_row_bits = set_min_scan_time_code(s)) < 0)
     {
-        t4_tx_end(&(s->t4));
+        t4_tx_release(&(s->t4));
         s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
         return -1;
     }
@@ -2953,14 +2970,14 @@ static void process_state_f_post_doc_non_ecm(t30_state_t *s, const uint8_t *msg,
         case T30_COPY_QUALITY_PERFECT:
         case T30_COPY_QUALITY_GOOD:
             rx_end_page(s);
-            t4_rx_end(&(s->t4));
+            t4_rx_release(&(s->t4));
             s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
             s->in_message = FALSE;
             set_state(s, T30_STATE_III_Q_MCF);
             break;
         case T30_COPY_QUALITY_POOR:
             rx_end_page(s);
-            t4_rx_end(&(s->t4));
+            t4_rx_release(&(s->t4));
             s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
             s->in_message = FALSE;
             set_state(s, T30_STATE_III_Q_RTP);
@@ -3011,14 +3028,14 @@ static void process_state_f_post_doc_non_ecm(t30_state_t *s, const uint8_t *msg,
         case T30_COPY_QUALITY_PERFECT:
         case T30_COPY_QUALITY_GOOD:
             rx_end_page(s);
-            t4_rx_end(&(s->t4));
+            t4_rx_release(&(s->t4));
             s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
             s->in_message = FALSE;
             set_state(s, T30_STATE_III_Q_MCF);
             break;
         case T30_COPY_QUALITY_POOR:
             rx_end_page(s);
-            t4_rx_end(&(s->t4));
+            t4_rx_release(&(s->t4));
             s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
             s->in_message = FALSE;
             set_state(s, T30_STATE_III_Q_RTP);
@@ -3038,7 +3055,7 @@ static void process_state_f_post_doc_non_ecm(t30_state_t *s, const uint8_t *msg,
         case T30_COPY_QUALITY_PERFECT:
         case T30_COPY_QUALITY_GOOD:
             rx_end_page(s);
-            t4_rx_end(&(s->t4));
+            t4_rx_release(&(s->t4));
             s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
             s->in_message = FALSE;
             set_state(s, T30_STATE_III_Q_MCF);
@@ -3046,7 +3063,7 @@ static void process_state_f_post_doc_non_ecm(t30_state_t *s, const uint8_t *msg,
             break;
         case T30_COPY_QUALITY_POOR:
             rx_end_page(s);
-            t4_rx_end(&(s->t4));
+            t4_rx_release(&(s->t4));
             s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
             s->in_message = FALSE;
             set_state(s, T30_STATE_III_Q_RTP);
@@ -3070,14 +3087,14 @@ static void process_state_f_post_doc_non_ecm(t30_state_t *s, const uint8_t *msg,
         case T30_COPY_QUALITY_PERFECT:
         case T30_COPY_QUALITY_GOOD:
             rx_end_page(s);
-            t4_rx_end(&(s->t4));
+            t4_rx_release(&(s->t4));
             s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
             s->in_message = FALSE;
             set_state(s, T30_STATE_III_Q_MCF);
             break;
         case T30_COPY_QUALITY_POOR:
             rx_end_page(s);
-            t4_rx_end(&(s->t4));
+            t4_rx_release(&(s->t4));
             s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
             s->in_message = FALSE;
             set_state(s, T30_STATE_III_Q_RTP);
@@ -3380,7 +3397,7 @@ static void process_state_ii_q(t30_state_t *s, const uint8_t *msg, int len)
             tx_end_page(s);
             if (s->phase_d_handler)
                 s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
-            t4_tx_end(&(s->t4));
+            t4_tx_release(&(s->t4));
             s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
             if (span_log_test(&s->logging, SPAN_LOG_FLOW))
             {
@@ -3394,7 +3411,7 @@ static void process_state_ii_q(t30_state_t *s, const uint8_t *msg, int len)
             tx_end_page(s);
             if (s->phase_d_handler)
                 s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
-            t4_tx_end(&(s->t4));
+            t4_tx_release(&(s->t4));
             s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
             send_dcn(s);
             if (span_log_test(&s->logging, SPAN_LOG_FLOW))
@@ -3436,7 +3453,7 @@ static void process_state_ii_q(t30_state_t *s, const uint8_t *msg, int len)
             tx_end_page(s);
             if (s->phase_d_handler)
                 s->phase_d_handler(s, s->phase_d_user_data, T30_RTP);
-            t4_tx_end(&(s->t4));
+            t4_tx_release(&(s->t4));
             /* TODO: should go back to T, and resend */
             return_to_phase_b(s, TRUE);
             break;
@@ -3445,7 +3462,7 @@ static void process_state_ii_q(t30_state_t *s, const uint8_t *msg, int len)
             tx_end_page(s);
             if (s->phase_d_handler)
                 s->phase_d_handler(s, s->phase_d_user_data, T30_RTP);
-            t4_tx_end(&(s->t4));
+            t4_tx_release(&(s->t4));
             s->current_status = T30_ERR_TX_INVALRSP;
             send_dcn(s);
             break;
@@ -3702,7 +3719,7 @@ static void process_state_iv_pps_null(t30_state_t *s, const uint8_t *msg, int le
                 tx_end_page(s);
                 if (s->phase_d_handler)
                     s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
-                t4_tx_end(&(s->t4));
+                t4_tx_release(&(s->t4));
                 s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
                 if (span_log_test(&s->logging, SPAN_LOG_FLOW))
                 {
@@ -3716,7 +3733,7 @@ static void process_state_iv_pps_null(t30_state_t *s, const uint8_t *msg, int le
                 tx_end_page(s);
                 if (s->phase_d_handler)
                     s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
-                t4_tx_end(&(s->t4));
+                t4_tx_release(&(s->t4));
                 s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
                 send_dcn(s);
                 if (span_log_test(&s->logging, SPAN_LOG_FLOW))
@@ -3804,7 +3821,7 @@ static void process_state_iv_pps_q(t30_state_t *s, const uint8_t *msg, int len)
                 tx_end_page(s);
                 if (s->phase_d_handler)
                     s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
-                t4_tx_end(&(s->t4));
+                t4_tx_release(&(s->t4));
                 s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
                 if (span_log_test(&s->logging, SPAN_LOG_FLOW))
                 {
@@ -3818,7 +3835,7 @@ static void process_state_iv_pps_q(t30_state_t *s, const uint8_t *msg, int len)
                 tx_end_page(s);
                 if (s->phase_d_handler)
                     s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
-                t4_tx_end(&(s->t4));
+                t4_tx_release(&(s->t4));
                 s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
                 send_dcn(s);
                 if (span_log_test(&s->logging, SPAN_LOG_FLOW))
@@ -3922,7 +3939,7 @@ static void process_state_iv_pps_rnr(t30_state_t *s, const uint8_t *msg, int len
                 tx_end_page(s);
                 if (s->phase_d_handler)
                     s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
-                t4_tx_end(&(s->t4));
+                t4_tx_release(&(s->t4));
                 s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
                 if (span_log_test(&s->logging, SPAN_LOG_FLOW))
                 {
@@ -3936,7 +3953,7 @@ static void process_state_iv_pps_rnr(t30_state_t *s, const uint8_t *msg, int len
                 tx_end_page(s);
                 if (s->phase_d_handler)
                     s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
-                t4_tx_end(&(s->t4));
+                t4_tx_release(&(s->t4));
                 s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
                 send_dcn(s);
                 if (span_log_test(&s->logging, SPAN_LOG_FLOW))
@@ -5870,10 +5887,10 @@ SPAN_DECLARE(int) t30_release(t30_state_t *s)
     switch (s->operation_in_progress)
     {
     case OPERATION_IN_PROGRESS_T4_TX:
-        t4_tx_end(&(s->t4));
+        t4_tx_release(&(s->t4));
         break;
     case OPERATION_IN_PROGRESS_T4_RX:
-        t4_rx_end(&(s->t4));
+        t4_rx_release(&(s->t4));
         break;
     }
     s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
index 99f562d055fcb853e9b86c4346d797d7aede84aa..ce048e656253e4031f692f01996e190deb41ebdc 100644 (file)
@@ -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.139 2009/02/03 16:28:40 steveu Exp $
+ * $Id: t31.c,v 1.140 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -2528,6 +2528,13 @@ SPAN_DECLARE(t31_state_t *) t31_init(t31_state_t *s,
 SPAN_DECLARE(int) t31_release(t31_state_t *s)
 {
     at_reset_call_info(&s->at_state);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) t31_free(t31_state_t *s)
+{
+    t31_release(s);
     free(s);
     return 0;
 }
index 2c501dd3900e79d5f4cf10b4d4b95d7b8ae1b1de..63e160363956fdc3a6156d3b6df5ce26f867ec0c 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: t38_core.c,v 1.51 2009/02/03 16:28:40 steveu Exp $
+ * $Id: t38_core.c,v 1.52 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -976,4 +976,18 @@ SPAN_DECLARE(t38_core_state_t *) t38_core_init(t38_core_state_t *s,
     return s;
 }
 /*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) t38_core_release(t38_core_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) t38_core_free(t38_core_state_t *s)
+{
+    if (s)
+        free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
 /*- End of file ------------------------------------------------------------*/
index 169c73f67fd999cf4967c39d9655ea9882b17284..f47fa4c69bbefa6bae5e30ac766b0b9f4f770872 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.153 2009/02/03 16:28:40 steveu Exp $
+ * $Id: t38_gateway.c,v 1.154 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -2273,6 +2273,12 @@ SPAN_DECLARE(t38_gateway_state_t *) t38_gateway_init(t38_gateway_state_t *s,
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) t38_gateway_release(t38_gateway_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) t38_gateway_free(t38_gateway_state_t *s)
 {
     free(s);
index c07b393c6da2e74d2cc9438d231dc3f05246bb1f..66bf096fbf096fd247972a348ffd5fa26c116f30 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_non_ecm_buffer.c,v 1.7 2009/02/04 13:18:53 steveu Exp $
+ * $Id: t38_non_ecm_buffer.c,v 1.8 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -261,6 +261,11 @@ SPAN_DECLARE(void) t38_non_ecm_buffer_set_mode(t38_non_ecm_buffer_state_t *s, in
 
 SPAN_DECLARE(t38_non_ecm_buffer_state_t *) t38_non_ecm_buffer_init(t38_non_ecm_buffer_state_t *s, int mode, int min_row_bits)
 {
+    if (s == NULL)
+    {
+        if ((s = (t38_non_ecm_buffer_state_t *) malloc(sizeof(*s))) == NULL)
+            return NULL;
+    }
     memset(s, 0, sizeof(*s));
     s->octet = 0xFF;
     s->flow_control_fill_octet = 0xFF;
@@ -271,4 +276,18 @@ SPAN_DECLARE(t38_non_ecm_buffer_state_t *) t38_non_ecm_buffer_init(t38_non_ecm_b
     return s;
 }
 /*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) t38_non_ecm_buffer_release(t38_non_ecm_buffer_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) t38_non_ecm_buffer_free(t38_non_ecm_buffer_state_t *s)
+{
+    if (s)
+        free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
 /*- End of file ------------------------------------------------------------*/
index 60b6e93e023216ce7389ffe06c8dd5bcb782ac83..e4b1926f2bbbbb6b8115331f8df164234dee8cb7 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: t38_terminal.c,v 1.122 2009/02/03 16:28:40 steveu Exp $
+ * $Id: t38_terminal.c,v 1.123 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*! \file */
@@ -1160,7 +1160,7 @@ SPAN_DECLARE(int) t38_terminal_release(t38_terminal_state_t *s)
 
 SPAN_DECLARE(int) t38_terminal_free(t38_terminal_state_t *s)
 {
-    t30_release(&s->t30);
+    t38_terminal_release(s);
     free(s);
     return 0;
 }
index 6cbc119584228fddeac059052e0b8219e0b16aeb..06b3ac90527328961132cec8ba978193f7249575 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: t4.c,v 1.123 2009/02/05 12:21:36 steveu Exp $
+ * $Id: t4.c,v 1.124 2009/02/10 13:06:46 steveu Exp $
  */
 
 /*
@@ -150,6 +150,7 @@ typedef struct
 
 #include "t4_states.h"
 
+#if defined(HAVE_LIBTIFF)
 static int set_tiff_directory_info(t4_state_t *s)
 {
     time_t now;
@@ -354,6 +355,23 @@ static int get_tiff_directory_info(t4_state_t *s)
 }
 /*- End of function --------------------------------------------------------*/
 
+static int get_tiff_total_pages(t4_state_t *s)
+{
+    int max;
+
+    /* Each page *should* contain the total number of pages, but can this be
+       trusted? Some files say 0. Actually searching for the last page is
+       more reliable. */
+    max = 0;
+    while (TIFFSetDirectory(s->tiff.tiff_file, (tdir_t) max))
+        max++;
+    /* Back to the previous page */
+    if (!TIFFSetDirectory(s->tiff.tiff_file, (tdir_t) s->pages_transferred))
+        return -1;
+    return max;
+}
+/*- End of function --------------------------------------------------------*/
+
 static int open_tiff_input_file(t4_state_t *s, const char *file)
 {
     if ((s->tiff.tiff_file = TIFFOpen(file, "r")) == NULL)
@@ -449,6 +467,57 @@ static int close_tiff_output_file(t4_state_t *s)
 }
 /*- End of function --------------------------------------------------------*/
 
+#else
+
+static int set_tiff_directory_info(t4_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int get_tiff_directory_info(t4_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int open_tiff_input_file(t4_state_t *s, const char *file)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int read_tiff_image(t4_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int close_tiff_input_file(t4_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int open_tiff_output_file(t4_state_t *s, const char *file)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void write_tiff_image(t4_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int close_tiff_output_file(t4_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
 static void update_row_bit_info(t4_state_t *s)
 {
     if (s->row_bits > s->max_row_bits)
@@ -1327,7 +1396,7 @@ SPAN_DECLARE(int) t4_rx_start_page(t4_state_t *s)
 }
 /*- End of function --------------------------------------------------------*/
 
-SPAN_DECLARE(int) t4_rx_end(t4_state_t *s)
+SPAN_DECLARE(int) t4_rx_release(t4_state_t *s)
 {
     if (!s->rx)
         return -1;
@@ -1340,10 +1409,11 @@ SPAN_DECLARE(int) t4_rx_end(t4_state_t *s)
 
 SPAN_DECLARE(int) t4_rx_free(t4_state_t *s)
 {
-    if (t4_rx_end(s))
-        return -1;
+    int ret;
+
+    ret = t4_rx_release(s);
     free(s);
-    return 0;
+    return ret;
 }
 /*- End of function --------------------------------------------------------*/
 
@@ -1874,9 +1944,11 @@ SPAN_DECLARE(int) t4_tx_start_page(t4_state_t *s)
     this_image_width = 0;
     if (s->row_read_handler == NULL)
     {
+#if defined(HAVE_LIBTIFF)
         if (!TIFFSetDirectory(s->tiff.tiff_file, (tdir_t) s->pages_transferred))
             return -1;
         TIFFGetField(s->tiff.tiff_file, TIFFTAG_IMAGEWIDTH, &this_image_width);
+#endif
     }
     s->image_size = 0;
     s->tx_bitstream = 0;
@@ -2019,8 +2091,10 @@ SPAN_DECLARE(int) t4_tx_more_pages(t4_state_t *s)
     {
         if (s->row_read_handler == NULL)
         {
+#if defined(HAVE_LIBTIFF)
             if (!TIFFSetDirectory(s->tiff.tiff_file, (tdir_t) s->pages_transferred + 1))
                 return -1;
+#endif
         }
     }
     return 0;
@@ -2089,7 +2163,7 @@ SPAN_DECLARE(int) t4_tx_check_bit(t4_state_t *s)
 }
 /*- End of function --------------------------------------------------------*/
 
-SPAN_DECLARE(int) t4_tx_end(t4_state_t *s)
+SPAN_DECLARE(int) t4_tx_release(t4_state_t *s)
 {
     if (s->rx)
         return -1;
@@ -2102,10 +2176,11 @@ SPAN_DECLARE(int) t4_tx_end(t4_state_t *s)
 
 SPAN_DECLARE(int) t4_tx_free(t4_state_t *s)
 {
-    if (t4_tx_end(s))
-        return -1;
+    int ret;
+
+    ret = t4_tx_release(s);
     free(s);
-    return 0;
+    return ret;
 }
 /*- End of function --------------------------------------------------------*/
 
@@ -2157,19 +2232,11 @@ SPAN_DECLARE(int) t4_tx_get_pages_in_file(t4_state_t *s)
 {
     int max;
 
-    /* Each page *should* contain the total number of pages, but can this be
-       trusted? Some files say 0. Actually searching for the last page is
-       more reliable. */
     max = 0;
     if (s->row_write_handler == NULL)
-    {
-        while (TIFFSetDirectory(s->tiff.tiff_file, (tdir_t) max))
-            max++;
-        /* Back to the previous page */
-        if (!TIFFSetDirectory(s->tiff.tiff_file, (tdir_t) s->pages_transferred))
-            return -1;
-    }
-    s->pages_in_file = max;
+        max = get_tiff_total_pages(s);
+    if (max >= 0)
+        s->pages_in_file = max;
     return max;
 }
 /*- End of function --------------------------------------------------------*/
index e968f95badf5d19537707d23e5656af5d929d3a8..cd3f7d028a8cf56b6041bcea1b88f48558f0d511 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: time_scale.c,v 1.29 2009/02/03 16:28:40 steveu Exp $
+ * $Id: time_scale.c,v 1.30 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -158,6 +158,12 @@ SPAN_DECLARE(time_scale_state_t *) time_scale_init(time_scale_state_t *s, int sa
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) time_scale_release(time_scale_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) time_scale_free(time_scale_state_t *s)
 {
     free(s);
index db2141d7334e93f7809ff733db6892cfccee6294..51266e57f39222896c3632389fed2fe670f54d2b 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: tone_detect.c,v 1.50 2009/02/03 16:28:40 steveu Exp $
+ * $Id: tone_detect.c,v 1.51 2009/02/10 13:06:47 steveu Exp $
  */
  
 /*! \file tone_detect.h */
@@ -91,6 +91,20 @@ SPAN_DECLARE(goertzel_state_t *) goertzel_init(goertzel_state_t *s,
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) goertzel_release(goertzel_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) goertzel_free(goertzel_state_t *s)
+{
+    if (s)
+        free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(void) goertzel_reset(goertzel_state_t *s)
 {
 #if defined(SPANDSP_USE_FIXED_POINT)
index d6e5658bda3b236ad1ebd4b3d571498dc4446776..19e60f397c515463de64344a514210fc4f3c6f50 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: tone_generate.c,v 1.49 2009/02/03 16:28:40 steveu Exp $
+ * $Id: tone_generate.c,v 1.50 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -129,6 +129,20 @@ SPAN_DECLARE(tone_gen_state_t *) tone_gen_init(tone_gen_state_t *s, tone_gen_des
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) tone_gen_release(tone_gen_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) tone_gen_free(tone_gen_state_t *s)
+{
+    if (s)
+        free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) tone_gen(tone_gen_state_t *s, int16_t amp[], int max_samples)
 {
     int samples;
index 5b6602f1dfa510783875f946ca869a3d9915c51a..4f060bbee4c62da35b7f4c6b5e1d79fba6307317 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.132 2009/02/03 16:28:40 steveu Exp $
+ * $Id: v17rx.c,v 1.133 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -1263,6 +1263,12 @@ SPAN_DECLARE(v17_rx_state_t *) v17_rx_init(v17_rx_state_t *s, int bit_rate, put_
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) v17_rx_release(v17_rx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) v17_rx_free(v17_rx_state_t *s)
 {
     free(s);
index 84b1cd266f8b52f620b1a97ffa552f801e45e7af..65f5e83600f258008bfca93d2e6c0cc281dbdc70 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: v17tx.c,v 1.70 2009/02/03 16:28:40 steveu Exp $
+ * $Id: v17tx.c,v 1.71 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -407,6 +407,12 @@ SPAN_DECLARE(v17_tx_state_t *) v17_tx_init(v17_tx_state_t *s, int bit_rate, int
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) v17_tx_release(v17_tx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) v17_tx_free(v17_tx_state_t *s)
 {
     free(s);
index 65a6ec2834de6121a2feec5016e71aba2f7ec3bd..eb1997f7c2d71c64942506a8a3f48176aaf50f45 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: v22bis_tx.c,v 1.50 2009/02/03 16:28:40 steveu Exp $
+ * $Id: v22bis_tx.c,v 1.51 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -673,6 +673,12 @@ SPAN_DECLARE(v22bis_state_t *) v22bis_init(v22bis_state_t *s,
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) v22bis_release(v22bis_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) v22bis_free(v22bis_state_t *s)
 {
     free(s);
index 760c2de934ed886b3b897e7a380e5fc336b099ab..52227758c6cd77dcea1313e3c0034379241af1e1 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.116 2009/02/03 16:28:40 steveu Exp $
+ * $Id: v27ter_rx.c,v 1.117 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -1115,6 +1115,12 @@ SPAN_DECLARE(v27ter_rx_state_t *) v27ter_rx_init(v27ter_rx_state_t *s, int bit_r
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) v27ter_rx_release(v27ter_rx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) v27ter_rx_free(v27ter_rx_state_t *s)
 {
     free(s);
index 1c0c9c054ff653e0b0dffc0cb4fd3aabbff22964..6013f3bd02e9d9e27ef4f1dfd284b0710ddbec5f 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_tx.c,v 1.72 2009/02/03 16:28:40 steveu Exp $
+ * $Id: v27ter_tx.c,v 1.73 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -421,6 +421,12 @@ SPAN_DECLARE(v27ter_tx_state_t *) v27ter_tx_init(v27ter_tx_state_t *s, int bit_r
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) v27ter_tx_release(v27ter_tx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) v27ter_tx_free(v27ter_tx_state_t *s)
 {
     free(s);
index cdd2f5e9a5a13f3cc7b21c63d6f50dc9d8fd0b8c..a1cc5dcd38901b11db2e48a67733b7c37dae8c11 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.153 2009/02/03 16:28:40 steveu Exp $
+ * $Id: v29rx.c,v 1.154 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -1141,6 +1141,12 @@ SPAN_DECLARE(v29_rx_state_t *) v29_rx_init(v29_rx_state_t *s, int rate, put_bit_
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) v29_rx_release(v29_rx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) v29_rx_free(v29_rx_state_t *s)
 {
     free(s);
index 573b2dfbd749dc6d0962f4afc1345e8d6adfd53d..a5094afdfb4765f020cd3f84d353c2764b3af061 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: v29tx.c,v 1.85 2009/02/03 16:28:40 steveu Exp $
+ * $Id: v29tx.c,v 1.86 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -377,6 +377,12 @@ SPAN_DECLARE(v29_tx_state_t *) v29_tx_init(v29_tx_state_t *s, int bit_rate, int
 }
 /*- End of function --------------------------------------------------------*/
 
+SPAN_DECLARE(int) v29_tx_release(v29_tx_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
 SPAN_DECLARE(int) v29_tx_free(v29_tx_state_t *s)
 {
     free(s);
index 07df72d10f39bb7e0e7f610878d31ee0096f91a5..718985b7c2f7f7236e7a0dc230c899dc44853734 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: v42.c,v 1.49 2009/02/04 13:18:53 steveu Exp $
+ * $Id: v42.c,v 1.50 2009/02/10 13:06:47 steveu Exp $
  */
 
 /* THIS IS A WORK IN PROGRESS. IT IS NOT FINISHED. */
@@ -1418,6 +1418,12 @@ SPAN_DECLARE(v42_state_t *) v42_init(v42_state_t *s, int caller, int detect, v42
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(int) v42_release(v42_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) v42_free(v42_state_t *s)
 {
     free(s);
     return 0;
index cc07c8d79194328177714405f899ddc7ea702acf..d8d3f3fde1bd52c6c61bb2cff59dd21cb04ef687 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: v42bis.c,v 1.36 2009/02/03 16:28:40 steveu Exp $
+ * $Id: v42bis.c,v 1.37 2009/02/10 13:06:47 steveu Exp $
  */
 
 /* THIS IS A WORK IN PROGRESS. IT IS NOT FINISHED. 
@@ -688,6 +688,12 @@ SPAN_DECLARE(v42bis_state_t *) v42bis_init(v42bis_state_t *s,
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(int) v42bis_release(v42bis_state_t *s)
+{
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) v42bis_free(v42bis_state_t *s)
 {
     free(s);
     return 0;
index e1c085d0a0ce9c34ca54a17fa9593247182f5492..b08f3f27c1a285a904a2c426b1560c7908bf4439 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: vector_float.c,v 1.20 2009/02/03 16:28:40 steveu Exp $
+ * $Id: vector_float.c,v 1.21 2009/02/05 15:57:27 steveu Exp $
  */
 
 /*! \file */
@@ -132,8 +132,8 @@ SPAN_DECLARE(void) vec_copyl(long double z[], const long double x[], int n)
 SPAN_DECLARE(void) vec_negatef(float z[], const float x[], int n)
 {
     int i;
-    static const uint32_t mask = 0x80000000;
-    static const float *fmask = (float *)&mask;
+       static const uint32_t mask = 0x80000000;
+       static const float *fmask = (float *) &mask;
     __m128 n1;
     __m128 n2;
  
index b69199de1b8d9ab00381886b2eafa11427326e44..b3b8e222482f846e9c6d8aa01133a325a65c8570 100644 (file)
@@ -25,7 +25,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: echo_tests.c,v 1.37 2008/11/30 10:17:31 steveu Exp $
+ * $Id: echo_tests.c,v 1.38 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \page echo_can_tests_page Line echo cancellation for voice tests
@@ -654,7 +654,7 @@ static int perform_test_sanity(void)
     //int coeff_index;
 
     print_test_title("Performing basic sanity test\n");
-    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    ctx = echo_can_init(TEST_EC_TAPS, 0);
 
     local_cur = 0;
     far_cur = 0;
@@ -779,7 +779,7 @@ static int perform_test_2a(void)
     /* Test 2 - Convergence and steady state residual and returned echo level test */
     /* Test 2A - Convergence and reconvergence test with NLP enabled */
     print_test_title("Performing test 2A - Convergence and reconvergence test with NLP enabled\n");
-    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    ctx = echo_can_init(TEST_EC_TAPS, 0);
 
     echo_can_flush(ctx);
     echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION | ECHO_CAN_USE_NLP);
@@ -828,7 +828,7 @@ static int perform_test_2b(void)
     /* Test 2 - Convergence and steady state residual and returned echo level test */
     /* Test 2B - Convergence and reconverge with NLP disabled */
     print_test_title("Performing test 2B - Convergence and reconverge with NLP disabled\n");
-    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    ctx = echo_can_init(TEST_EC_TAPS, 0);
 
     echo_can_flush(ctx);
     echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
@@ -882,7 +882,7 @@ static int perform_test_2ca(void)
     /* Test 2 - Convergence and steady state residual and returned echo level test */
     /* Test 2C(a) - Convergence with background noise present */
     print_test_title("Performing test 2C(a) - Convergence with background noise present\n");
-    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    ctx = echo_can_init(TEST_EC_TAPS, 0);
     awgn_init_dbm0(&far_noise_source, 7162534, -50.0f);
     
     echo_can_flush(ctx);
@@ -918,7 +918,7 @@ static int perform_test_3a(void)
     /* Test 3 - Performance under double talk conditions */
     /* Test 3A - Double talk test with low cancelled-end levels */
     print_test_title("Performing test 3A - Double talk test with low cancelled-end levels\n");
-    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    ctx = echo_can_init(TEST_EC_TAPS, 0);
 
     echo_can_flush(ctx);
     echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
@@ -956,7 +956,7 @@ static int perform_test_3ba(void)
     /* Test 3 - Performance under double talk conditions */
     /* Test 3B(a) - Double talk stability test with high cancelled-end levels */
     print_test_title("Performing test 3B(b) - Double talk stability test with high cancelled-end levels\n");
-    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    ctx = echo_can_init(TEST_EC_TAPS, 0);
 
     echo_can_flush(ctx);
     echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
@@ -996,7 +996,7 @@ static int perform_test_3bb(void)
     /* Test 3 - Performance under double talk conditions */
     /* Test 3B(b) - Double talk stability test with low cancelled-end levels */
     print_test_title("Performing test 3B(b) - Double talk stability test with low cancelled-end levels\n");
-    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    ctx = echo_can_init(TEST_EC_TAPS, 0);
 
     echo_can_flush(ctx);
     echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
@@ -1036,7 +1036,7 @@ static int perform_test_3c(void)
     /* Test 3 - Performance under double talk conditions */
     /* Test 3C - Double talk test with simulated conversation */
     print_test_title("Performing test 3C - Double talk test with simulated conversation\n");
-    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    ctx = echo_can_init(TEST_EC_TAPS, 0);
 
     echo_can_flush(ctx);
     echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
@@ -1074,7 +1074,7 @@ static int perform_test_4(void)
 
     /* Test 4 - Leak rate test */
     print_test_title("Performing test 4 - Leak rate test\n");
-    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    ctx = echo_can_init(TEST_EC_TAPS, 0);
 
     echo_can_flush(ctx);
     echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
@@ -1106,7 +1106,7 @@ static int perform_test_5(void)
     
     /* Test 5 - Infinite return loss convergence test */
     print_test_title("Performing test 5 - Infinite return loss convergence test\n");
-    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    ctx = echo_can_init(TEST_EC_TAPS, 0);
 
     echo_can_flush(ctx);
     echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
@@ -1141,7 +1141,7 @@ static int perform_test_6(void)
 
     /* Test 6 - Non-divergence on narrow-band signals */
     print_test_title("Performing test 6 - Non-divergence on narrow-band signals\n");
-    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    ctx = echo_can_init(TEST_EC_TAPS, 0);
 
     echo_can_flush(ctx);
     echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
@@ -1210,7 +1210,7 @@ static int perform_test_7(void)
 
     /* Test 7 - Stability */
     print_test_title("Performing test 7 - Stability\n");
-    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    ctx = echo_can_init(TEST_EC_TAPS, 0);
 
     /* Put tones through an unconverged canceller, and check nothing unpleasant
        happens. */
@@ -1262,7 +1262,7 @@ static int perform_test_8(void)
 
     /* Test 8 - Non-convergence on No 5, 6, and 7 in-band signalling */
     print_test_title("Performing test 8 - Non-convergence on No 5, 6, and 7 in-band signalling\n");
-    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    ctx = echo_can_init(TEST_EC_TAPS, 0);
 
     fprintf(stderr, "Test 8 not yet implemented\n");
 
@@ -1279,7 +1279,7 @@ static int perform_test_9(void)
 
     /* Test 9 - Comfort noise test */
     print_test_title("Performing test 9 - Comfort noise test\n");
-    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    ctx = echo_can_init(TEST_EC_TAPS, 0);
     awgn_init_dbm0(&far_noise_source, 7162534, -50.0f);
 
     echo_can_flush(ctx);
@@ -1317,7 +1317,7 @@ static int perform_test_10a(void)
     /* Test 10 - FAX test during call establishment phase */
     /* Test 10A - Canceller operation on the calling station side */
     print_test_title("Performing test 10A - Canceller operation on the calling station side\n");
-    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    ctx = echo_can_init(TEST_EC_TAPS, 0);
 
     fprintf(stderr, "Test 10A not yet implemented\n");
 
@@ -1333,7 +1333,7 @@ static int perform_test_10b(void)
     /* Test 10 - FAX test during call establishment phase */
     /* Test 10B - Canceller operation on the called station side */
     print_test_title("Performing test 10B - Canceller operation on the called station side\n");
-    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    ctx = echo_can_init(TEST_EC_TAPS, 0);
 
     fprintf(stderr, "Test 10B not yet implemented\n");
 
@@ -1351,7 +1351,7 @@ static int perform_test_10c(void)
                   transmission and page breaks (for further study) */
     print_test_title("Performing test 10C - Canceller operation on the calling station side during page\n"
                      "transmission and page breaks (for further study)\n");
-    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    ctx = echo_can_init(TEST_EC_TAPS, 0);
 
     fprintf(stderr, "Test 10C not yet implemented\n");
 
@@ -1366,7 +1366,7 @@ static int perform_test_11(void)
 
     /* Test 11 - Tandem echo canceller test (for further study) */
     print_test_title("Performing test 11 - Tandem echo canceller test (for further study)\n");
-    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    ctx = echo_can_init(TEST_EC_TAPS, 0);
 
     fprintf(stderr, "Test 11 not yet implemented\n");
 
@@ -1381,7 +1381,7 @@ static int perform_test_12(void)
 
     /* Test 12 - Residual acoustic echo test (for further study) */
     print_test_title("Performing test 12 - Residual acoustic echo test (for further study)\n");
-    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    ctx = echo_can_init(TEST_EC_TAPS, 0);
 
     fprintf(stderr, "Test 12 not yet implemented\n");
 
@@ -1397,7 +1397,7 @@ static int perform_test_13(void)
     /* Test 13 - Performance with ITU-T low-bit rate coders in echo path
                  (Optional, under study) */
     print_test_title("Performing test 13 - Performance with ITU-T low-bit rate coders in echo path (Optional, under study)\n");
-    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    ctx = echo_can_init(TEST_EC_TAPS, 0);
 
     fprintf(stderr, "Test 13 not yet implemented\n");
 
@@ -1412,7 +1412,7 @@ static int perform_test_14(void)
 
     /* Test 14 - Performance with V-series low-speed data modems */
     print_test_title("Performing test 14 - Performance with V-series low-speed data modems\n");
-    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    ctx = echo_can_init(TEST_EC_TAPS, 0);
 
     fprintf(stderr, "Test 14 not yet implemented\n");
 
@@ -1427,7 +1427,7 @@ static int perform_test_15(void)
 
     /* Test 15 - PCM offset test (Optional) */
     print_test_title("Performing test 15 - PCM offset test (Optional)\n");
-    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    ctx = echo_can_init(TEST_EC_TAPS, 0);
 
     fprintf(stderr, "Test 15 not yet implemented\n");
 
@@ -1525,7 +1525,7 @@ static void simulate_ec(char *argv[], int two_channel_file, int mode)
         ecfile = afOpenFile_telephony_write(argv[1], 1);
     }
 
-    ctx = echo_can_create(TEST_EC_TAPS, 0);
+    ctx = echo_can_init(TEST_EC_TAPS, 0);
     echo_can_adaption_mode(ctx, mode);
     samples = 0;
     do
index 60160fc7ea082abec6f59bd0afea67d8bfa1df05..69e1d67bdf404eb68eb8a6ac574af30ad3e1dee6 100644 (file)
@@ -22,7 +22,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: fax_decode.c,v 1.53 2009/01/27 05:13:12 steveu Exp $
+ * $Id: fax_decode.c,v 1.54 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \page fax_decode_page FAX decoder
@@ -525,7 +525,7 @@ int main(int argc, char *argv[])
         v29_rx(v29, amp, len);
         //v27ter_rx(v27ter, amp, len);
     }
-    t4_rx_end(&t4_state);
+    t4_rx_release(&t4_state);
 
     if (afCloseFile(inhandle) != 0)
     {
index c57a4feaa1f2bb62767916b719525198415aca21..d13fa7d716cc6e09b9c267370ad2bce21dbeedc7 100644 (file)
@@ -22,7 +22,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: playout_tests.c,v 1.27 2008/11/15 14:27:29 steveu Exp $
+ * $Id: playout_tests.c,v 1.28 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \page playout_tests_page Playout (jitter buffering) tests
@@ -106,7 +106,7 @@ static void dynamic_buffer_tests(void)
     for (i = 0;  i < BLOCK_LEN;  i++)
         fill[i] = 32767;
 
-    if ((s = playout_new(2*BLOCK_LEN, 15*BLOCK_LEN)) == NULL)
+    if ((s = playout_init(2*BLOCK_LEN, 15*BLOCK_LEN)) == NULL)
         return;
     plc_init(&plc);
     time_scale_init(&ts, SAMPLE_RATE, 1.0);
@@ -270,7 +270,7 @@ static void static_buffer_tests(void)
     type = PLAYOUT_TYPE_SPEECH;
     len = BLOCK_LEN;
 
-    if ((s = playout_new(2*BLOCK_LEN, 2*BLOCK_LEN)) == NULL)
+    if ((s = playout_init(2*BLOCK_LEN, 2*BLOCK_LEN)) == NULL)
         return;
     for (i = 0;  i < 1000000;  i++)
     {
index 0e360d5f2800bff1e9c88fbb770984982e2ae211..ed1370afa02906f2faba3fa2007571deb19a3df2 100644 (file)
@@ -22,7 +22,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t4_tests.c,v 1.65 2009/01/05 13:48:32 steveu Exp $
+ * $Id: t4_tests.c,v 1.66 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -354,7 +354,7 @@ int main(int argc, char *argv[])
             dump_image_as_xxx(&receive_state);
         t4_rx_end_page(&receive_state);
         display_page_stats(&receive_state);
-        t4_rx_end(&receive_state);
+        t4_rx_release(&receive_state);
     }
     else
     {
@@ -501,8 +501,8 @@ int main(int argc, char *argv[])
             t4_rx_end_page(&receive_state);
             sends++;
         }
-        t4_tx_end(&send_state);
-        t4_rx_end(&receive_state);
+        t4_tx_release(&send_state);
+        t4_rx_release(&receive_state);
         /* And we should now have a matching received TIFF file. Note this will only match
            at the image level. TIFF files allow a lot of ways to express the same thing,
            so bit matching of the files is not the normal case. */
@@ -588,8 +588,8 @@ int main(int argc, char *argv[])
             t4_rx_end_page(&receive_state);
             break;
         }
-        t4_tx_end(&send_state);
-        t4_rx_end(&receive_state);
+        t4_tx_release(&send_state);
+        t4_rx_release(&receive_state);
 #endif
 
         printf("Tests passed\n");
index 38487b9e61a556dcae243b5555cc5367bcd93760..b06c8e4a773fa4fd9bca4c250d334e53df30c62e 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: tsb85_tests.c,v 1.28 2009/01/28 03:41:27 steveu Exp $
+ * $Id: tsb85_tests.c,v 1.29 2009/02/10 13:06:47 steveu Exp $
  */
 
 /*! \file */
@@ -1019,7 +1019,7 @@ printf("Push '%s'\n", next_tx_file);
                 span_log(&s->logging, SPAN_LOG_FLOW, "We need to corrupt the image\n");
                 corrupt_image(s, image, len, (const char *) bad_rows);
             }
-            t4_tx_end(&t4_state);
+            t4_tx_release(&t4_state);
             span_log(&s->logging, SPAN_LOG_FLOW, "Non-ECM image is %d bytes\n", len);
             faxtester_set_non_ecm_image_buffer(s, image, len);
         }
@@ -1059,7 +1059,7 @@ printf("Push '%s'\n", next_tx_file);
                 corrupt_image(s, image, len, (const char *) bad_rows);
             }
             /*endif*/
-            t4_tx_end(&t4_state);
+            t4_tx_release(&t4_state);
             span_log(&s->logging, SPAN_LOG_FLOW, "ECM image is %d bytes\n", len);
             faxtester_set_ecm_image_buffer(s, image, len, ecm_block, ecm_frame_size, i);
         }