[Freeswitch-svn] [commit] r11600 - in freeswitch/trunk/libs/spandsp: . config spandsp-sim spandsp-sim/spandsp src src/msvc src/spandsp src/spandsp/private

FreeSWITCH SVN mikej at freeswitch.org
Mon Feb 2 09:40:52 PST 2009


Author: mikej
Date: Mon Feb  2 11:40:52 2009
New Revision: 11600

Log:
update to snapshot spandsp-20090131

Added:
   freeswitch/trunk/libs/spandsp/config/ax_check_export_capability.m4
Modified:
   freeswitch/trunk/libs/spandsp/config-h.in
   freeswitch/trunk/libs/spandsp/config/ax_c99_features.m4
   freeswitch/trunk/libs/spandsp/config/ax_compiler_vendor.m4
   freeswitch/trunk/libs/spandsp/configure.ac
   freeswitch/trunk/libs/spandsp/spandsp-sim/g1050.c
   freeswitch/trunk/libs/spandsp/spandsp-sim/spandsp/g1050.h
   freeswitch/trunk/libs/spandsp/spandsp-sim/spandsp/line_model.h
   freeswitch/trunk/libs/spandsp/spandsp-sim/spandsp/rfc2198_sim.h
   freeswitch/trunk/libs/spandsp/spandsp-sim/spandsp/test_utils.h
   freeswitch/trunk/libs/spandsp/spandsp-sim/test_utils.c
   freeswitch/trunk/libs/spandsp/src/Makefile.am
   freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c
   freeswitch/trunk/libs/spandsp/src/complex_filters.c
   freeswitch/trunk/libs/spandsp/src/dtmf.c
   freeswitch/trunk/libs/spandsp/src/hdlc.c
   freeswitch/trunk/libs/spandsp/src/libspandsp.dsp
   freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj
   freeswitch/trunk/libs/spandsp/src/msvc/msvcproj.foot
   freeswitch/trunk/libs/spandsp/src/msvc/msvcproj.head
   freeswitch/trunk/libs/spandsp/src/msvc/spandsp.h
   freeswitch/trunk/libs/spandsp/src/msvc/vc8proj.foot
   freeswitch/trunk/libs/spandsp/src/msvc/vc8proj.head
   freeswitch/trunk/libs/spandsp/src/noise.c
   freeswitch/trunk/libs/spandsp/src/queue.c
   freeswitch/trunk/libs/spandsp/src/spandsp.h.in
   freeswitch/trunk/libs/spandsp/src/spandsp/adsi.h
   freeswitch/trunk/libs/spandsp/src/spandsp/async.h
   freeswitch/trunk/libs/spandsp/src/spandsp/at_interpreter.h
   freeswitch/trunk/libs/spandsp/src/spandsp/awgn.h
   freeswitch/trunk/libs/spandsp/src/spandsp/bell_r2_mf.h
   freeswitch/trunk/libs/spandsp/src/spandsp/bert.h
   freeswitch/trunk/libs/spandsp/src/spandsp/bit_operations.h
   freeswitch/trunk/libs/spandsp/src/spandsp/complex_filters.h
   freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_float.h
   freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_int.h
   freeswitch/trunk/libs/spandsp/src/spandsp/crc.h
   freeswitch/trunk/libs/spandsp/src/spandsp/dds.h
   freeswitch/trunk/libs/spandsp/src/spandsp/dtmf.h
   freeswitch/trunk/libs/spandsp/src/spandsp/echo.h
   freeswitch/trunk/libs/spandsp/src/spandsp/fax.h
   freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h
   freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h
   freeswitch/trunk/libs/spandsp/src/spandsp/g711.h
   freeswitch/trunk/libs/spandsp/src/spandsp/g722.h
   freeswitch/trunk/libs/spandsp/src/spandsp/g726.h
   freeswitch/trunk/libs/spandsp/src/spandsp/gsm0610.h
   freeswitch/trunk/libs/spandsp/src/spandsp/hdlc.h
   freeswitch/trunk/libs/spandsp/src/spandsp/ima_adpcm.h
   freeswitch/trunk/libs/spandsp/src/spandsp/logging.h
   freeswitch/trunk/libs/spandsp/src/spandsp/lpc10.h
   freeswitch/trunk/libs/spandsp/src/spandsp/modem_connect_tones.h
   freeswitch/trunk/libs/spandsp/src/spandsp/modem_echo.h
   freeswitch/trunk/libs/spandsp/src/spandsp/noise.h
   freeswitch/trunk/libs/spandsp/src/spandsp/oki_adpcm.h
   freeswitch/trunk/libs/spandsp/src/spandsp/playout.h
   freeswitch/trunk/libs/spandsp/src/spandsp/plc.h
   freeswitch/trunk/libs/spandsp/src/spandsp/power_meter.h
   freeswitch/trunk/libs/spandsp/src/spandsp/private/hdlc.h
   freeswitch/trunk/libs/spandsp/src/spandsp/private/queue.h
   freeswitch/trunk/libs/spandsp/src/spandsp/queue.h
   freeswitch/trunk/libs/spandsp/src/spandsp/schedule.h
   freeswitch/trunk/libs/spandsp/src/spandsp/sig_tone.h
   freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h
   freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_rx.h
   freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_tx.h
   freeswitch/trunk/libs/spandsp/src/spandsp/t30.h
   freeswitch/trunk/libs/spandsp/src/spandsp/t30_api.h
   freeswitch/trunk/libs/spandsp/src/spandsp/t30_logging.h
   freeswitch/trunk/libs/spandsp/src/spandsp/t31.h
   freeswitch/trunk/libs/spandsp/src/spandsp/t35.h
   freeswitch/trunk/libs/spandsp/src/spandsp/t38_core.h
   freeswitch/trunk/libs/spandsp/src/spandsp/t38_gateway.h
   freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h
   freeswitch/trunk/libs/spandsp/src/spandsp/t38_terminal.h
   freeswitch/trunk/libs/spandsp/src/spandsp/t4.h
   freeswitch/trunk/libs/spandsp/src/spandsp/telephony.h
   freeswitch/trunk/libs/spandsp/src/spandsp/time_scale.h
   freeswitch/trunk/libs/spandsp/src/spandsp/tone_detect.h
   freeswitch/trunk/libs/spandsp/src/spandsp/tone_generate.h
   freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h
   freeswitch/trunk/libs/spandsp/src/spandsp/v17tx.h
   freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h
   freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h
   freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_tx.h
   freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h
   freeswitch/trunk/libs/spandsp/src/spandsp/v29tx.h
   freeswitch/trunk/libs/spandsp/src/spandsp/v42.h
   freeswitch/trunk/libs/spandsp/src/spandsp/v42bis.h
   freeswitch/trunk/libs/spandsp/src/spandsp/v8.h
   freeswitch/trunk/libs/spandsp/src/spandsp/vector_float.h
   freeswitch/trunk/libs/spandsp/src/spandsp/vector_int.h
   freeswitch/trunk/libs/spandsp/src/spandsp/version.h
   freeswitch/trunk/libs/spandsp/src/t30.c
   freeswitch/trunk/libs/spandsp/src/t4.c

Modified: freeswitch/trunk/libs/spandsp/config-h.in
==============================================================================
--- freeswitch/trunk/libs/spandsp/config-h.in	(original)
+++ freeswitch/trunk/libs/spandsp/config-h.in	Mon Feb  2 11:40:52 2009
@@ -254,6 +254,9 @@
 /* Do not expect a misaligned memory access to work correctly */
 #undef SPANDSP_MISALIGNED_ACCESS_FAILS
 
+/* Use the library symbol export capability of the compiler */
+#undef SPANDSP_USE_EXPORT_CAPABILITY
+
 /* Enable fixed point processing, where possible, instead of floating point */
 #undef SPANDSP_USE_FIXED_POINT
 

Modified: freeswitch/trunk/libs/spandsp/config/ax_c99_features.m4
==============================================================================
--- freeswitch/trunk/libs/spandsp/config/ax_c99_features.m4	(original)
+++ freeswitch/trunk/libs/spandsp/config/ax_c99_features.m4	Mon Feb  2 11:40:52 2009
@@ -11,7 +11,7 @@
 # provided "as is" without express or implied warranty.
 
 AC_DEFUN([AX_C99_FLEXIBLE_ARRAY],
-[AC_CACHE_CHECK(C99 struct flexible array support, 
+[AC_CACHE_CHECK(if have C99 struct flexible array support, 
     ac_cv_c99_flexible_array,
 
 # Initialize to unknown

Added: freeswitch/trunk/libs/spandsp/config/ax_check_export_capability.m4
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/config/ax_check_export_capability.m4	Mon Feb  2 11:40:52 2009
@@ -0,0 +1,61 @@
+# @synopsis AX_CHECK_EXPORT_CAPABILITY
+#
+# Does the compiler support the exporting of library symbols?
+# @version 1.0    Jan 31 2009
+# @author Steve Underwood
+#
+# Permission to use, copy, modify, distribute, and sell this file for any 
+# purpose is hereby granted without fee, provided that the above copyright 
+# and this permission notice appear in all copies.  No representations are
+# made about the suitability of this software for any purpose.  It is 
+# provided "as is" without express or implied warranty.
+
+AC_DEFUN([AX_CHECK_EXPORT_CAPABILITY],
+[AC_CACHE_CHECK([if $1 supports library symbol export], 
+    ac_cv_symbol_export_capability,
+
+[# Initialize to unknown
+ac_cv_symbol_export_capability="no"
+
+case "${ax_cv_c_compiler_vendor}" in
+gnu)
+    save_CFLAGS="${CFLAGS}"
+    CFLAGS="${CFLAGS} -fvisibility=hidden"
+    AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM(
+            [int foo __attribute__ ((visibility("default")));],
+            [;]
+        )],
+
+        [AC_MSG_RESULT([yes])
+         COMP_VENDOR_CFLAGS="-fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 $COMP_VENDOR_CFLAGS"
+         COMP_VENDOR_CXXFLAGS="-fvisibility=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 $COMP_VENDOR_CXXFLAGS"
+         ac_cv_symbol_export_capability="yes"],
+
+        [AC_MSG_RESULT([no])]
+    )
+    CFLAGS="${save_CFLAGS}"
+    ;;
+
+sun)
+    save_CFLAGS="${CFLAGS}"
+    CFLAGS="${CFLAGS} -xldscope=hidden"
+    AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM(
+            [int foo __attribute__ ((visibility("default")));],
+            [;]
+        )],
+
+        [AC_MSG_RESULT([yes])
+         COMP_VENDOR_CFLAGS="-xldscope=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 $COMP_VENDOR_CFLAGS"
+         COMP_VENDOR_CXXFLAGS="-xldscope=hidden -DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 $COMP_VENDOR_CXXFLAGS"
+         ac_cv_symbol_export_capability="yes"],
+
+        [AC_MSG_RESULT([no])]
+    )
+    CFLAGS="${save_CFLAGS}"
+    ;;
+
+esac])
+AS_IF([test AS_VAR_GET(ac_cv_symbol_export_capability) = yes], [$2], [$3])[]dnl
+]) # AX_CHECK_EXPORT_CAPABILITY

Modified: freeswitch/trunk/libs/spandsp/config/ax_compiler_vendor.m4
==============================================================================
--- freeswitch/trunk/libs/spandsp/config/ax_compiler_vendor.m4	(original)
+++ freeswitch/trunk/libs/spandsp/config/ax_compiler_vendor.m4	Mon Feb  2 11:40:52 2009
@@ -49,8 +49,7 @@
 #   special exception to the GPL to apply to your modified version as well.
 
 AC_DEFUN([AX_COMPILER_VENDOR],
-[
-AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
+[AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
  [ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown
   # note: don't check for gcc first since some other compilers define __GNUC__
   for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ pathscale:__PATHCC__,__PATHSCALE__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do

Modified: freeswitch/trunk/libs/spandsp/configure.ac
==============================================================================
--- freeswitch/trunk/libs/spandsp/configure.ac	(original)
+++ freeswitch/trunk/libs/spandsp/configure.ac	Mon Feb  2 11:40:52 2009
@@ -16,7 +16,7 @@
 # License along with this program; if not, write to the Free Software
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 #
-# $Id: configure.ac,v 1.64 2009/01/17 08:16:08 steveu Exp $
+# $Id: configure.ac,v 1.65 2009/01/31 08:48:10 steveu Exp $
 
 # @start 1
 
@@ -27,6 +27,7 @@
 m4_include(config/ax_fixed_point_machine.m4)
 m4_include(config/ax_misaligned_access_fails.m4)
 m4_include(config/ax_c99_features.m4)
+m4_include(config/ax_check_export_capability.m4)
 
 SPANDSP_MAJOR_VERSION=0
 SPANDSP_MINOR_VERSION=0
@@ -283,9 +284,14 @@
     AC_LANG([C])
 fi
 
+AX_CHECK_EXPORT_CAPABILITY([$host],
+    [AC_DEFINE([SPANDSP_USE_EXPORT_CAPABILITY], [1], [Use the library symbol export capability of the compiler])
+    SPANDSP_USE_EXPORT_CAPABILITY="#define SPANDSP_USE_EXPORT_CAPABILITY 1"],
+    [SPANDSP_USE_EXPORT_CAPABILITY="#undef SPANDSP_USE_EXPORT_CAPABILITY"])
+
 case "${ax_cv_c_compiler_vendor}" in
 gnu)
-    COMP_VENDOR_CFLAGS="-std=gnu99 -ffast-math -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
+    COMP_VENDOR_CFLAGS="-std=gnu99 -ffast-math -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes $COMP_VENDOR_CFLAGS"
     if test "$enable_sse5" = "yes" ; then
         COMP_VENDOR_CFLAGS="-msse5 $COMP_VENDOR_CFLAGS"
     fi
@@ -320,7 +326,7 @@
     esac
     ;;
 sun)
-    COMP_VENDOR_CFLAGS="-xc99=all -mt -xCC -errwarn=%all -xvpara"
+    COMP_VENDOR_CFLAGS="-xc99=all -mt -xCC -errwarn=%all -xvpara $COMP_VENDOR_CFLAGS"
     if test "$enable_sse3" = "yes" ; then
         COMP_VENDOR_CFLAGS="-native -fast $COMP_VENDOR_CFLAGS"
     fi
@@ -336,7 +342,7 @@
     COMP_VENDOR_LDFLAGS=
     ;;
 *)
-    COMP_VENDOR_CFLAGS="-std=c99 -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
+    COMP_VENDOR_CFLAGS="-std=c99 -Wall -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes $COMP_VENDOR_CFLAGS"
     COMP_VENDOR_LDFLAGS=
     ;;
 esac
@@ -407,6 +413,7 @@
 AC_SUBST(TESTLIBS)
 AC_SUBST(SPANDSP_USE_FIXED_POINT)
 AC_SUBST(SPANDSP_MISALIGNED_ACCESS_FAILS)
+AC_SUBST(SPANDSP_USE_EXPORT_CAPABILITY)
 AC_SUBST(INSERT_INTTYPES_HEADER)
 AC_SUBST(INSERT_STDINT_HEADER)
 AC_SUBST(INSERT_TGMATH_HEADER)

Modified: freeswitch/trunk/libs/spandsp/spandsp-sim/g1050.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/spandsp-sim/g1050.c	(original)
+++ freeswitch/trunk/libs/spandsp/spandsp-sim/g1050.c	Mon Feb  2 11:40:52 2009
@@ -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: g1050.c,v 1.11 2009/01/16 15:13:16 steveu Exp $
+ * $Id: g1050.c,v 1.12 2009/01/31 08:48:10 steveu Exp $
  */
 
 #if defined(HAVE_CONFIG_H)
@@ -1070,10 +1070,10 @@
 }
 /*- End of function --------------------------------------------------------*/
 
-g1050_state_t *g1050_init(int model,
-                          int speed_pattern,
-                          int packet_size,
-                          int packet_rate)
+SPAN_DECLARE(g1050_state_t) *g1050_init(int model,
+                                        int speed_pattern,
+                                        int packet_size,
+                                        int packet_rate)
 {
     g1050_state_t *s;
     g1050_constants_t *constants;
@@ -1169,7 +1169,7 @@
 }
 /*- End of function --------------------------------------------------------*/
 
-void g1050_dump_parms(int model, int speed_pattern)
+SPAN_DECLARE(void) g1050_dump_parms(int model, int speed_pattern)
 {
     g1050_channel_speeds_t *sp;
     g1050_model_t *mo;
@@ -1189,7 +1189,7 @@
 }
 /*- End of function --------------------------------------------------------*/
 
-int g1050_put(g1050_state_t *s, const uint8_t buf[], int len, int seq_no, double departure_time)
+SPAN_DECLARE(int) g1050_put(g1050_state_t *s, const uint8_t buf[], int len, int seq_no, double departure_time)
 {
     g1050_queue_element_t *element;
     g1050_queue_element_t *e;
@@ -1247,7 +1247,7 @@
 }
 /*- End of function --------------------------------------------------------*/
 
-int g1050_get(g1050_state_t *s, uint8_t buf[], int max_len, double current_time, int *seq_no, double *departure_time, double *arrival_time)
+SPAN_DECLARE(int) g1050_get(g1050_state_t *s, uint8_t buf[], int max_len, double current_time, int *seq_no, double *departure_time, double *arrival_time)
 {
     int len;
     g1050_queue_element_t *element;
@@ -1295,7 +1295,7 @@
 }
 /*- End of function --------------------------------------------------------*/
 
-void g1050_queue_dump(g1050_state_t *s)
+SPAN_DECLARE(void) g1050_queue_dump(g1050_state_t *s)
 {
     g1050_queue_element_t *e;
 

Modified: freeswitch/trunk/libs/spandsp/spandsp-sim/spandsp/g1050.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/spandsp-sim/spandsp/g1050.h	(original)
+++ freeswitch/trunk/libs/spandsp/spandsp-sim/spandsp/g1050.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: g1050.h,v 1.9 2009/01/16 15:13:16 steveu Exp $
+ * $Id: g1050.h,v 1.10 2009/01/31 08:48:10 steveu Exp $
  */
 
 /*! \file */
@@ -269,26 +269,26 @@
 {
 #endif
 
-g1050_state_t *g1050_init(int model,
-                          int speed_pattern,
-                          int packet_size,
-                          int packet_rate);
+SPAN_DECLARE(g1050_state_t) *g1050_init(int model,
+                                        int speed_pattern,
+                                        int packet_size,
+                                        int packet_rate);
 
 void g1050_dump_parms(int model, int speed_pattern);
 
-int g1050_put(g1050_state_t *s,
-              const uint8_t buf[],
-              int len,
-              int seq_no,
-              double departure_time);
-
-int g1050_get(g1050_state_t *s,
-              uint8_t buf[],
-              int max_len,
-              double current_time,
-              int *seq_no,
-              double *departure_time,
-              double *arrival_time);
+SPAN_DECLARE(int) g1050_put(g1050_state_t *s,
+                            const uint8_t buf[],
+                            int len,
+                            int seq_no,
+                            double departure_time);
+
+SPAN_DECLARE(int) g1050_get(g1050_state_t *s,
+                            uint8_t buf[],
+                            int max_len,
+                            double current_time,
+                            int *seq_no,
+                            double *departure_time,
+                            double *arrival_time);
 
 void g1050_queue_dump(g1050_state_t *s);
 

Modified: freeswitch/trunk/libs/spandsp/spandsp-sim/spandsp/line_model.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/spandsp-sim/spandsp/line_model.h	(original)
+++ freeswitch/trunk/libs/spandsp/spandsp-sim/spandsp/line_model.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: line_model.h,v 1.4 2009/01/07 13:28:10 steveu Exp $
+ * $Id: line_model.h,v 1.5 2009/01/31 08:48:10 steveu Exp $
  */
 
 /*! \file */
@@ -132,38 +132,38 @@
 {
 #endif
 
-void both_ways_line_model(both_ways_line_model_state_t *s, 
-                          int16_t output1[],
-                          const int16_t input1[],
-                          int16_t output2[],
-                          const int16_t input2[],
-                          int samples);
+SPAN_DECLARE(void) both_ways_line_model(both_ways_line_model_state_t *s, 
+                                        int16_t output1[],
+                                        const int16_t input1[],
+                                        int16_t output2[],
+                                        const int16_t input2[],
+                                        int samples);
 
-void both_ways_line_model_set_dc(both_ways_line_model_state_t *s, float dc1, float dc2);
+SPAN_DECLARE(void) both_ways_line_model_set_dc(both_ways_line_model_state_t *s, float dc1, float dc2);
 
-void both_ways_line_model_set_mains_pickup(both_ways_line_model_state_t *s, int f, float level1, float level2);
+SPAN_DECLARE(void) both_ways_line_model_set_mains_pickup(both_ways_line_model_state_t *s, int f, float level1, float level2);
     
-both_ways_line_model_state_t *both_ways_line_model_init(int model1,
-                                                        float noise1,
-                                                        int model2,
-                                                        float noise2,
-                                                        int codec,
-                                                        int rbs_pattern);
+SPAN_DECLARE(both_ways_line_model_state_t) *both_ways_line_model_init(int model1,
+                                                                      float noise1,
+                                                                      int model2,
+                                                                      float noise2,
+                                                                      int codec,
+                                                                      int rbs_pattern);
 
-int both_ways_line_model_release(both_ways_line_model_state_t *s);
+SPAN_DECLARE(int) both_ways_line_model_release(both_ways_line_model_state_t *s);
 
-void one_way_line_model(one_way_line_model_state_t *s, 
-                        int16_t output[],
-                        const int16_t input[],
-                        int samples);
+SPAN_DECLARE(void) one_way_line_model(one_way_line_model_state_t *s, 
+                                      int16_t output[],
+                                      const int16_t input[],
+                                      int samples);
 
-void one_way_line_model_set_dc(one_way_line_model_state_t *s, float dc);
+SPAN_DECLARE(void) one_way_line_model_set_dc(one_way_line_model_state_t *s, float dc);
 
-void one_way_line_model_set_mains_pickup(one_way_line_model_state_t *s, int f, float level);
+SPAN_DECLARE(void) one_way_line_model_set_mains_pickup(one_way_line_model_state_t *s, int f, float level);
 
-one_way_line_model_state_t *one_way_line_model_init(int model, float noise, int codec, int rbs_pattern);
+SPAN_DECLARE(one_way_line_model_state_t) *one_way_line_model_init(int model, float noise, int codec, int rbs_pattern);
 
-int one_way_line_model_release(one_way_line_model_state_t *s);
+SPAN_DECLARE(int) one_way_line_model_release(one_way_line_model_state_t *s);
 
 #ifdef __cplusplus
 }

Modified: freeswitch/trunk/libs/spandsp/spandsp-sim/spandsp/rfc2198_sim.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/spandsp-sim/spandsp/rfc2198_sim.h	(original)
+++ freeswitch/trunk/libs/spandsp/spandsp-sim/spandsp/rfc2198_sim.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: rfc2198_sim.h,v 1.4 2008/09/09 16:13:12 steveu Exp $
+ * $Id: rfc2198_sim.h,v 1.5 2009/01/31 08:48:10 steveu Exp $
  */
 
 /*! \file */
@@ -69,25 +69,25 @@
 {
 #endif
 
-rfc2198_sim_state_t *rfc2198_sim_init(int model,
-                                      int speed_pattern,
-                                      int packet_size,
-                                      int packet_rate,
-                                      int redundancy_depth);
-
-int rfc2198_sim_put(rfc2198_sim_state_t *s,
-                    const uint8_t buf[],
-                    int len,
-                    int seq_no,
-                    double departure_time);
-
-int rfc2198_sim_get(rfc2198_sim_state_t *s,
-                    uint8_t buf[],
-                    int max_len,
-                    double current_time,
-                    int *seq_no,
-                    double *departure_time,
-                    double *arrival_time);
+SPAN_DECLARE(rfc2198_sim_state_t) *rfc2198_sim_init(int model,
+                                                    int speed_pattern,
+                                                    int packet_size,
+                                                    int packet_rate,
+                                                    int redundancy_depth);
+
+SPAN_DECLARE(int) rfc2198_sim_put(rfc2198_sim_state_t *s,
+                                  const uint8_t buf[],
+                                  int len,
+                                  int seq_no,
+                                  double departure_time);
+
+SPAN_DECLARE(int) rfc2198_sim_get(rfc2198_sim_state_t *s,
+                                  uint8_t buf[],
+                                  int max_len,
+                                  double current_time,
+                                  int *seq_no,
+                                  double *departure_time,
+                                  double *arrival_time);
 
 #ifdef  __cplusplus
 }

Modified: freeswitch/trunk/libs/spandsp/spandsp-sim/spandsp/test_utils.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/spandsp-sim/spandsp/test_utils.h	(original)
+++ freeswitch/trunk/libs/spandsp/spandsp-sim/spandsp/test_utils.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: test_utils.h,v 1.6 2009/01/07 13:28:10 steveu Exp $
+ * $Id: test_utils.h,v 1.7 2009/01/31 08:48:10 steveu Exp $
  */
 
 /*! \file */
@@ -51,25 +51,25 @@
 extern "C" {
 #endif
 
-complexify_state_t *complexify_init(void);
+SPAN_DECLARE(complexify_state_t) *complexify_init(void);
 
-void complexify_release(complexify_state_t *s);
+SPAN_DECLARE(void) complexify_release(complexify_state_t *s);
 
-complexf_t complexify(complexify_state_t *s, int16_t amp);
+SPAN_DECLARE(complexf_t) complexify(complexify_state_t *s, int16_t amp);
 
-void fft(complex_t data[], int len);
+SPAN_DECLARE(void) fft(complex_t data[], int len);
 
-void ifft(complex_t data[], int len);
+SPAN_DECLARE(void) ifft(complex_t data[], int len);
 
-codec_munge_state_t *codec_munge_init(int codec, int info);
+SPAN_DECLARE(codec_munge_state_t) *codec_munge_init(int codec, int info);
 
-void codec_munge_release(codec_munge_state_t *s);
+SPAN_DECLARE(void) codec_munge_release(codec_munge_state_t *s);
 
-void codec_munge(codec_munge_state_t *s, int16_t amp[], int len);
+SPAN_DECLARE(void) codec_munge(codec_munge_state_t *s, int16_t amp[], int len);
 
-AFfilehandle afOpenFile_telephony_read(const char *name, int channels);
+SPAN_DECLARE(AFfilehandle) afOpenFile_telephony_read(const char *name, int channels);
 
-AFfilehandle afOpenFile_telephony_write(const char *name, int channels);
+SPAN_DECLARE(AFfilehandle) afOpenFile_telephony_write(const char *name, int channels);
 
 #ifdef __cplusplus
 }

Modified: freeswitch/trunk/libs/spandsp/spandsp-sim/test_utils.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/spandsp-sim/test_utils.c	(original)
+++ freeswitch/trunk/libs/spandsp/spandsp-sim/test_utils.c	Mon Feb  2 11:40:52 2009
@@ -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: test_utils.c,v 1.10 2008/11/30 10:17:30 steveu Exp $
+ * $Id: test_utils.c,v 1.11 2009/01/31 08:48:10 steveu Exp $
  */
 
 /*! \file */
@@ -72,7 +72,7 @@
 static complex_t icircle[MAX_FFT_LEN/2];
 static int icircle_init = FALSE;
 
-complexify_state_t *complexify_init(void)
+SPAN_DECLARE(complexify_state_t) *complexify_init(void)
 {
     complexify_state_t *s;
     int i;
@@ -87,13 +87,13 @@
 }
 /*- End of function --------------------------------------------------------*/
 
-void complexify_release(complexify_state_t *s)
+SPAN_DECLARE(void) complexify_release(complexify_state_t *s)
 {
     free(s);
 }
 /*- End of function --------------------------------------------------------*/
 
-complexf_t complexify(complexify_state_t *s, int16_t amp)
+SPAN_DECLARE(complexf_t) complexify(complexify_state_t *s, int16_t amp)
 {
 #define HILBERT_GAIN    1.569546344
     static const float hilbert_coeffs[] =
@@ -221,7 +221,7 @@
 }
 /*- End of function --------------------------------------------------------*/
 
-void fft(complex_t data[], int len)
+SPAN_DECLARE(void) fft(complex_t data[], int len)
 {
     int i;
     double x;
@@ -241,7 +241,7 @@
 }
 /*- End of function --------------------------------------------------------*/
 
-void ifft(complex_t data[], int len)
+SPAN_DECLARE(void) ifft(complex_t data[], int len)
 {
     int i;
     double x;
@@ -261,7 +261,7 @@
 }
 /*- End of function --------------------------------------------------------*/
 
-codec_munge_state_t *codec_munge_init(int codec, int info)
+SPAN_DECLARE(codec_munge_state_t) *codec_munge_init(int codec, int info)
 {
     codec_munge_state_t *s;
     
@@ -300,13 +300,13 @@
 }
 /*- End of function --------------------------------------------------------*/
 
-void codec_munge_release(codec_munge_state_t *s)
+SPAN_DECLARE(void) codec_munge_release(codec_munge_state_t *s)
 {
     free(s);
 }
 /*- End of function --------------------------------------------------------*/
 
-void codec_munge(codec_munge_state_t *s, int16_t amp[], int len)
+SPAN_DECLARE(void) codec_munge(codec_munge_state_t *s, int16_t amp[], int len)
 {
     uint8_t law;
     uint8_t adpcmdata[160];
@@ -351,7 +351,7 @@
 }
 /*- End of function --------------------------------------------------------*/
 
-AFfilehandle afOpenFile_telephony_read(const char *name, int channels)
+SPAN_DECLARE(AFfilehandle) afOpenFile_telephony_read(const char *name, int channels)
 {
     float x;
     AFfilehandle handle;
@@ -381,7 +381,7 @@
 }
 /*- End of function --------------------------------------------------------*/
 
-AFfilehandle afOpenFile_telephony_write(const char *name, int channels)
+SPAN_DECLARE(AFfilehandle) afOpenFile_telephony_write(const char *name, int channels)
 {
     AFfilesetup setup;
     AFfilehandle handle;

Modified: freeswitch/trunk/libs/spandsp/src/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/Makefile.am	(original)
+++ freeswitch/trunk/libs/spandsp/src/Makefile.am	Mon Feb  2 11:40:52 2009
@@ -16,7 +16,7 @@
 ## License along with this program; if not, write to the Free Software
 ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 ##
-## $Id: Makefile.am,v 1.118 2009/01/30 05:35:18 steveu Exp $
+## $Id: Makefile.am,v 1.121 2009/01/31 12:24:11 steveu Exp $
 
 AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
 AM_LDFLAGS = $(COMP_VENDOR_LDFLAGS)
@@ -33,8 +33,8 @@
              msvc/inttypes.h \
              msvc/tgmath.h \
              msvc/unistd.h \
+             msvc/spandsp.h \
              msvc/sys/time.h \
-             msvc/spandsp.def \
              msvc/msvcproj.head \
              msvc/msvcproj.foot \
              msvc/vc8proj.head \
@@ -434,6 +434,15 @@
 	done; \
 	cat $(srcdir)/msvc/vc8proj.foot $(VCPROJOUT) )
 
+$(srcdir)/msvc/spandsp.h: spandsp.h.in
+	echo "creating $(srcdir)/msvc/spandsp.h"
+	@cp $(srcdir)/spandsp.h.in $(srcdir)/msvc/spandsp.h
+	@sed -i -e "s/\@SPANDSP_USE_FIXED_POINT\@/#undef SPANDSP_USE_FIXED_POINT/" $(srcdir)/msvc/spandsp.h
+	@sed -i -e "s/\@SPANDSP_MISALIGNED_ACCESS_FAILS\@/#undef SPANDSP_MISALIGNED_ACCESS_FAILS/" $(srcdir)/msvc/spandsp.h
+	@sed -i -e "s/\@SPANDSP_USE_EXPORT_CAPABILITY\@/#define SPANDSP_USE_EXPORT_CAPABILITY 1/" $(srcdir)/msvc/spandsp.h
+	@sed -i -e "s/\@INSERT_INTTYPES_HEADER\@/#include <inttypes.h>/" $(srcdir)/msvc/spandsp.h
+	@sed -i -e "s/\@INSERT_MATH_HEADER\@/#include <math.h>/" $(srcdir)/msvc/spandsp.h
+
 spandsp/version.h:
 	NOWDATE=`date --utc +"%Y%m%d"` ; \
 	NOWTIME=`date --utc +"%H%M%S"` ; \

Modified: freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: bell_r2_mf.c,v 1.35 2009/01/29 18:30:14 steveu Exp $
+ * $Id: bell_r2_mf.c,v 1.36 2009/01/31 08:48:10 steveu Exp $
  */
 
 /*! \file */
@@ -300,7 +300,7 @@
 }
 /*- End of function --------------------------------------------------------*/
 
-size_t bell_mf_tx_put(bell_mf_tx_state_t *s, const char *digits, int len)
+int bell_mf_tx_put(bell_mf_tx_state_t *s, const char *digits, int len)
 {
     size_t space;
 
@@ -313,7 +313,7 @@
             return 0;
     }
     if ((space = queue_free_space(&s->queue.queue)) < (size_t) len)
-        return len - space;
+        return len - (int) space;
     if (queue_write(&s->queue.queue, (const uint8_t *) digits, len) >= 0)
         return 0;
     return -1;

Modified: freeswitch/trunk/libs/spandsp/src/complex_filters.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/complex_filters.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/complex_filters.c	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: complex_filters.c,v 1.14 2009/01/05 13:48:31 steveu Exp $
+ * $Id: complex_filters.c,v 1.15 2009/01/31 08:48:10 steveu Exp $
  */
 
 #if defined(HAVE_CONFIG_H)
@@ -33,6 +33,7 @@
 #include <stdio.h>
 #include <inttypes.h>
 
+#include "spandsp/telephony.h"
 #include "spandsp/complex.h"
 #include "spandsp/complex_filters.h"
 

Modified: freeswitch/trunk/libs/spandsp/src/dtmf.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/dtmf.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/dtmf.c	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: dtmf.c,v 1.48 2009/01/29 18:30:14 steveu Exp $
+ * $Id: dtmf.c,v 1.49 2009/01/31 08:48:10 steveu Exp $
  */
  
 /*! \file dtmf.h */
@@ -473,7 +473,7 @@
 }
 /*- End of function --------------------------------------------------------*/
 
-size_t dtmf_tx_put(dtmf_tx_state_t *s, const char *digits, int len)
+int dtmf_tx_put(dtmf_tx_state_t *s, const char *digits, int len)
 {
     size_t space;
 
@@ -486,7 +486,7 @@
             return 0;
     }
     if ((space = queue_free_space(&s->queue.queue)) < (size_t) len)
-        return len - space;
+        return len - (int) space;
     if (queue_write(&s->queue.queue, (const uint8_t *) digits, len) >= 0)
         return 0;
     return -1;

Modified: freeswitch/trunk/libs/spandsp/src/hdlc.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/hdlc.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/hdlc.c	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: hdlc.c,v 1.66 2009/01/30 07:19:25 steveu Exp $
+ * $Id: hdlc.c,v 1.68 2009/01/31 09:47:59 steveu Exp $
  */
 
 /*! \file */
@@ -138,7 +138,7 @@
             /* We may have a frame, or we may have back to back flags */
             if (s->len)
             {
-                if (s->num_bits == 7  &&  s->len >= s->crc_bytes  &&  s->len <= s->max_frame_len)
+                if (s->num_bits == 7  &&  s->len >= (size_t) s->crc_bytes  &&  s->len <= s->max_frame_len)
                 {
                     if ((s->crc_bytes == 2  &&  crc_itu16_check(s->buffer, s->len))
                         ||
@@ -166,7 +166,7 @@
                     {
                         /* Don't let the length go below zero, or it will be confused
                            with one of the special conditions. */
-                        if (s->len >= s->crc_bytes)
+                        if (s->len >= (size_t) s->crc_bytes)
                             s->len -= s->crc_bytes;
                         else
                             s->len = 0;
@@ -452,7 +452,7 @@
                 }
                 s->pos = HDLC_MAXFRAME_LEN;
             }
-            else if (s->pos == HDLC_MAXFRAME_LEN + s->crc_bytes)
+            else if (s->pos == (size_t) (HDLC_MAXFRAME_LEN + s->crc_bytes))
             {
                 /* Finish off the current byte with some flag bits. If we are at the
                    start of a byte we need a at least one whole byte of flag to ensure

Modified: freeswitch/trunk/libs/spandsp/src/libspandsp.dsp
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/libspandsp.dsp	(original)
+++ freeswitch/trunk/libs/spandsp/src/libspandsp.dsp	Mon Feb  2 11:40:52 2009
@@ -1,95 +1,95 @@
-# Microsoft Developer Studio Project File - Name="spandsp" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=spandsp - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "spandsp.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "spandsp.mak" CFG="spandsp - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "spandsp - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "spandsp - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "spandsp - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /D "_WINDLL" /FR /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib ws2_32.lib winmm.lib /nologo /dll /map /debug /machine:I386 /out:"Release/libspandsp.dll"
-
-!ELSEIF  "$(CFG)" == "spandsp - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /FR /FD /GZ /c
-# SUBTRACT CPP /WX /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib ws2_32.lib winmm.lib /nologo /dll /incremental:no /map /debug /machine:I386 /out:"Debug/libspandsp.dll" /pdbtype:sept
-# SUBTRACT LINK32 /nodefaultlib
-
-!ENDIF 
-
-# Begin Target
-
-# Name "spandsp - Win32 Release"
-# Name "spandsp - Win32 Debug"
+# Microsoft Developer Studio Project File - Name="spandsp" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=spandsp - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "spandsp.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "spandsp.mak" CFG="spandsp - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "spandsp - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "spandsp - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "spandsp - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /D "_WINDLL" /FR /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib ws2_32.lib winmm.lib /nologo /dll /map /debug /machine:I386 /out:"Release/libspandsp.dll"
+
+!ELSEIF  "$(CFG)" == "spandsp - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /FR /FD /GZ /c
+# SUBTRACT CPP /WX /YX
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib ws2_32.lib winmm.lib /nologo /dll /incremental:no /map /debug /machine:I386 /out:"Debug/libspandsp.dll" /pdbtype:sept
+# SUBTRACT LINK32 /nodefaultlib
+
+!ENDIF 
+
+# Begin Target
+
+# Name "spandsp - Win32 Release"
+# Name "spandsp - Win32 Debug"
 # Begin Group "Source Files"
 # Begin Source File
 
@@ -898,10 +898,10 @@
 SOURCE=.\spandsp.h
 # End Source File
 # End Group
-
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
+

+# Begin Group "Resource Files"

+

+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"

+# End Group

+# End Target

+# End Project


Modified: freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj	(original)
+++ freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj	Mon Feb  2 11:40:52 2009
@@ -64,7 +64,6 @@
 			<Tool
 				Name="VCLinkerTool"
 				LinkIncremental="2"
-				ModuleDefinitionFile="./msvc/spandsp.def"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				RandomizedBaseAddress="1"
@@ -138,7 +137,6 @@
 			<Tool
 				Name="VCLinkerTool"
 				LinkIncremental="1"
-				ModuleDefinitionFile="./msvc/spandsp.def"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
@@ -178,826 +176,208 @@
 			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
 			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
 			>
-			<File
-				RelativePath="adsi.c"
-				>
-			</File>
-			<File
-				RelativePath="async.c"
-				>
-			</File>
-			<File
-				RelativePath="at_interpreter.c"
-				>
-			</File>
-			<File
-				RelativePath="awgn.c"
-				>
-			</File>
-			<File
-				RelativePath="bell_r2_mf.c"
-				>
-			</File>
-			<File
-				RelativePath="bert.c"
-				>
-			</File>
-			<File
-				RelativePath="bit_operations.c"
-				>
-			</File>
-			<File
-				RelativePath="bitstream.c"
-				>
-			</File>
-			<File
-				RelativePath="complex_filters.c"
-				>
-			</File>
-			<File
-				RelativePath="complex_vector_float.c"
-				>
-			</File>
-			<File
-				RelativePath="complex_vector_int.c"
-				>
-			</File>
-			<File
-				RelativePath="crc.c"
-				>
-			</File>
-			<File
-				RelativePath="dds_float.c"
-				>
-			</File>
-			<File
-				RelativePath="dds_int.c"
-				>
-			</File>
-			<File
-				RelativePath="dtmf.c"
-				>
-			</File>
-			<File
-				RelativePath="echo.c"
-				>
-			</File>
-			<File
-				RelativePath="fax.c"
-				>
-			</File>
-			<File
-				RelativePath="fsk.c"
-				>
-			</File>
-			<File
-				RelativePath="g711.c"
-				>
-			</File>
-			<File
-				RelativePath="g722.c"
-				>
-			</File>
-			<File
-				RelativePath="g726.c"
-				>
-			</File>
-			<File
-				RelativePath=".\msvc\gettimeofday.c"
-				>
-			</File>
-			<File
-				RelativePath="gsm0610_decode.c"
-				>
-			</File>
-			<File
-				RelativePath="gsm0610_encode.c"
-				>
-			</File>
-			<File
-				RelativePath="gsm0610_long_term.c"
-				>
-			</File>
-			<File
-				RelativePath="gsm0610_lpc.c"
-				>
-			</File>
-			<File
-				RelativePath="gsm0610_preprocess.c"
-				>
-			</File>
-			<File
-				RelativePath="gsm0610_rpe.c"
-				>
-			</File>
-			<File
-				RelativePath="gsm0610_short_term.c"
-				>
-			</File>
-			<File
-				RelativePath="hdlc.c"
-				>
-			</File>
-			<File
-				RelativePath="ima_adpcm.c"
-				>
-			</File>
-			<File
-				RelativePath="logging.c"
-				>
-			</File>
-			<File
-				RelativePath="lpc10_analyse.c"
-				>
-			</File>
-			<File
-				RelativePath="lpc10_decode.c"
-				>
-			</File>
-			<File
-				RelativePath="lpc10_encode.c"
-				>
-			</File>
-			<File
-				RelativePath="lpc10_placev.c"
-				>
-			</File>
-			<File
-				RelativePath="lpc10_voicing.c"
-				>
-			</File>
-			<File
-				RelativePath="modem_connect_tones.c"
-				>
-			</File>
-			<File
-				RelativePath="modem_echo.c"
-				>
-			</File>
-			<File
-				RelativePath="noise.c"
-				>
-			</File>
-			<File
-				RelativePath="oki_adpcm.c"
-				>
-			</File>
-			<File
-				RelativePath="playout.c"
-				>
-			</File>
-			<File
-				RelativePath="plc.c"
-				>
-			</File>
-			<File
-				RelativePath="power_meter.c"
-				>
-			</File>
-			<File
-				RelativePath="queue.c"
-				>
-			</File>
-			<File
-				RelativePath="schedule.c"
-				>
-			</File>
-			<File
-				RelativePath="sig_tone.c"
-				>
-			</File>
-			<File
-				RelativePath="silence_gen.c"
-				>
-			</File>
-			<File
-				RelativePath="super_tone_rx.c"
-				>
-			</File>
-			<File
-				RelativePath="super_tone_tx.c"
-				>
-			</File>
-			<File
-				RelativePath="t30.c"
-				>
-			</File>
-			<File
-				RelativePath="t30_api.c"
-				>
-			</File>
-			<File
-				RelativePath="t30_logging.c"
-				>
-			</File>
-			<File
-				RelativePath="t31.c"
-				>
-			</File>
-			<File
-				RelativePath="t35.c"
-				>
-			</File>
-			<File
-				RelativePath="t38_core.c"
-				>
-			</File>
-			<File
-				RelativePath="t38_gateway.c"
-				>
-			</File>
-			<File
-				RelativePath="t38_non_ecm_buffer.c"
-				>
-			</File>
-			<File
-				RelativePath="t38_terminal.c"
-				>
-			</File>
-			<File
-				RelativePath="t4.c"
-				>
-			</File>
-			<File
-				RelativePath="testcpuid.c"
-				>
-			</File>
-			<File
-				RelativePath="time_scale.c"
-				>
-			</File>
-			<File
-				RelativePath="tone_detect.c"
-				>
-			</File>
-			<File
-				RelativePath="tone_generate.c"
-				>
-			</File>
-			<File
-				RelativePath="v17rx.c"
-				>
-			</File>
-			<File
-				RelativePath="v17tx.c"
-				>
-			</File>
-			<File
-				RelativePath="v22bis_rx.c"
-				>
-			</File>
-			<File
-				RelativePath="v22bis_tx.c"
-				>
-			</File>
-			<File
-				RelativePath="v27ter_rx.c"
-				>
-			</File>
-			<File
-				RelativePath="v27ter_tx.c"
-				>
-			</File>
-			<File
-				RelativePath="v29rx.c"
-				>
-			</File>
-			<File
-				RelativePath="v29tx.c"
-				>
-			</File>
-			<File
-				RelativePath="v42.c"
-				>
-			</File>
-			<File
-				RelativePath="v42bis.c"
-				>
-			</File>
-			<File
-				RelativePath="v8.c"
-				>
-			</File>
-			<File
-				RelativePath="vector_float.c"
-				>
-			</File>
-			<File
-				RelativePath="vector_int.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			>
-			<File
-				RelativePath="spandsp.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/adsi.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/arctan2.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/async.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/at_interpreter.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/awgn.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/bell_r2_mf.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/bert.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/biquad.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/bit_operations.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/bitstream.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/complex.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/complex_filters.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/complex_vector_float.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/complex_vector_int.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/crc.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/dc_restore.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/dds.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/dtmf.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/echo.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/expose.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/fax.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/fax_modems.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/fir.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/fsk.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/g168models.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/g711.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/g722.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/g726.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/gsm0610.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/hdlc.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/ima_adpcm.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/logging.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/lpc10.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/modem_connect_tones.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/modem_echo.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/noise.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/oki_adpcm.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/playout.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/plc.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/power_meter.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/adsi.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/async.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/at_interpreter.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/awgn.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/bell_r2_mf.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/bert.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/bitstream.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/dtmf.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/fax.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/fax_modems.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/fsk.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/g711.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/g722.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/g726.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/gsm0610.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/hdlc.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/ima_adpcm.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/logging.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/lpc10.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/modem_connect_tones.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/noise.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/oki_adpcm.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/queue.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/schedule.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/sig_tone.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/super_tone_rx.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/super_tone_tx.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/t30.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/t31.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/t38_core.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/t38_gateway.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/t38_non_ecm_buffer.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/t38_terminal.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/t4.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/time_scale.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/tone_detect.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/tone_generate.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/v17rx.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/v17tx.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/v22bis.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/v27ter_rx.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/v27ter_tx.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/v29rx.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/v29tx.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/v42.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/v42bis.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/private/v8.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/queue.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/saturated.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/schedule.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/sig_tone.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/silence_gen.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/super_tone_rx.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/super_tone_tx.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/t30.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/t30_api.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/t30_fcf.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/t30_logging.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/t31.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/t35.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/t38_core.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/t38_gateway.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/t38_non_ecm_buffer.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/t38_terminal.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/t4.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/telephony.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/time_scale.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/timing.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/tone_detect.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/tone_generate.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/v17rx.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/v17tx.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/v22bis.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/v27ter_rx.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/v27ter_tx.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/v29rx.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/v29tx.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/v42.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/v42bis.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/v8.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/vector_float.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/vector_int.h"
-				>
-			</File>
-			<File
-				RelativePath="spandsp/version.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-			>
-		</Filter>
-		<File
-			RelativePath=".\msvc\spandsp.def"
-			>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
+<File RelativePath="adsi.c"></File>
+<File RelativePath="async.c"></File>
+<File RelativePath="at_interpreter.c"></File>
+<File RelativePath="awgn.c"></File>
+<File RelativePath="bell_r2_mf.c"></File>
+<File RelativePath="bert.c"></File>
+<File RelativePath="bit_operations.c"></File>
+<File RelativePath="bitstream.c"></File>
+<File RelativePath="complex_filters.c"></File>
+<File RelativePath="complex_vector_float.c"></File>
+<File RelativePath="complex_vector_int.c"></File>
+<File RelativePath="crc.c"></File>
+<File RelativePath="dds_float.c"></File>
+<File RelativePath="dds_int.c"></File>
+<File RelativePath="dtmf.c"></File>
+<File RelativePath="echo.c"></File>
+<File RelativePath="fax.c"></File>
+<File RelativePath="fsk.c"></File>
+<File RelativePath="g711.c"></File>
+<File RelativePath="g722.c"></File>
+<File RelativePath="g726.c"></File>
+<File RelativePath="gsm0610_decode.c"></File>
+<File RelativePath="gsm0610_encode.c"></File>
+<File RelativePath="gsm0610_long_term.c"></File>
+<File RelativePath="gsm0610_lpc.c"></File>
+<File RelativePath="gsm0610_preprocess.c"></File>
+<File RelativePath="gsm0610_rpe.c"></File>
+<File RelativePath="gsm0610_short_term.c"></File>
+<File RelativePath="hdlc.c"></File>
+<File RelativePath="ima_adpcm.c"></File>
+<File RelativePath="logging.c"></File>
+<File RelativePath="lpc10_analyse.c"></File>
+<File RelativePath="lpc10_decode.c"></File>
+<File RelativePath="lpc10_encode.c"></File>
+<File RelativePath="lpc10_placev.c"></File>
+<File RelativePath="lpc10_voicing.c"></File>
+<File RelativePath="modem_echo.c"></File>
+<File RelativePath="modem_connect_tones.c"></File>
+<File RelativePath="noise.c"></File>
+<File RelativePath="oki_adpcm.c"></File>
+<File RelativePath="playout.c"></File>
+<File RelativePath="plc.c"></File>
+<File RelativePath="power_meter.c"></File>
+<File RelativePath="queue.c"></File>
+<File RelativePath="schedule.c"></File>
+<File RelativePath="sig_tone.c"></File>
+<File RelativePath="silence_gen.c"></File>
+<File RelativePath="super_tone_rx.c"></File>
+<File RelativePath="super_tone_tx.c"></File>
+<File RelativePath="t4.c"></File>
+<File RelativePath="t30.c"></File>
+<File RelativePath="t30_api.c"></File>
+<File RelativePath="t30_logging.c"></File>
+<File RelativePath="t31.c"></File>
+<File RelativePath="t35.c"></File>
+<File RelativePath="t38_core.c"></File>
+<File RelativePath="t38_gateway.c"></File>
+<File RelativePath="t38_non_ecm_buffer.c"></File>
+<File RelativePath="t38_terminal.c"></File>
+<File RelativePath="testcpuid.c"></File>
+<File RelativePath="time_scale.c"></File>
+<File RelativePath="tone_detect.c"></File>
+<File RelativePath="tone_generate.c"></File>
+<File RelativePath="v17rx.c"></File>
+<File RelativePath="v17tx.c"></File>
+<File RelativePath="v22bis_rx.c"></File>
+<File RelativePath="v22bis_tx.c"></File>
+<File RelativePath="v27ter_rx.c"></File>
+<File RelativePath="v27ter_tx.c"></File>
+<File RelativePath="v29rx.c"></File>
+<File RelativePath="v29tx.c"></File>
+<File RelativePath="v42.c"></File>
+<File RelativePath="v42bis.c"></File>
+<File RelativePath="v8.c"></File>
+<File RelativePath="vector_float.c"></File>
+<File RelativePath="vector_int.c"></File>
+<File RelativePath=".\msvc\gettimeofday.c"></File>
+</Filter><Filter  Name="Header Files">
+<File RelativePath="spandsp/adsi.h"></File>
+<File RelativePath="spandsp/async.h"></File>
+<File RelativePath="spandsp/arctan2.h"></File>
+<File RelativePath="spandsp/at_interpreter.h"></File>
+<File RelativePath="spandsp/awgn.h"></File>
+<File RelativePath="spandsp/bell_r2_mf.h"></File>
+<File RelativePath="spandsp/bert.h"></File>
+<File RelativePath="spandsp/biquad.h"></File>
+<File RelativePath="spandsp/bit_operations.h"></File>
+<File RelativePath="spandsp/bitstream.h"></File>
+<File RelativePath="spandsp/crc.h"></File>
+<File RelativePath="spandsp/complex.h"></File>
+<File RelativePath="spandsp/complex_filters.h"></File>
+<File RelativePath="spandsp/complex_vector_float.h"></File>
+<File RelativePath="spandsp/complex_vector_int.h"></File>
+<File RelativePath="spandsp/dc_restore.h"></File>
+<File RelativePath="spandsp/dds.h"></File>
+<File RelativePath="spandsp/dtmf.h"></File>
+<File RelativePath="spandsp/echo.h"></File>
+<File RelativePath="spandsp/fax.h"></File>
+<File RelativePath="spandsp/fax_modems.h"></File>
+<File RelativePath="spandsp/fir.h"></File>
+<File RelativePath="spandsp/fsk.h"></File>
+<File RelativePath="spandsp/g168models.h"></File>
+<File RelativePath="spandsp/g711.h"></File>
+<File RelativePath="spandsp/g722.h"></File>
+<File RelativePath="spandsp/g726.h"></File>
+<File RelativePath="spandsp/gsm0610.h"></File>
+<File RelativePath="spandsp/hdlc.h"></File>
+<File RelativePath="spandsp/ima_adpcm.h"></File>
+<File RelativePath="spandsp/logging.h"></File>
+<File RelativePath="spandsp/lpc10.h"></File>
+<File RelativePath="spandsp/modem_echo.h"></File>
+<File RelativePath="spandsp/modem_connect_tones.h"></File>
+<File RelativePath="spandsp/noise.h"></File>
+<File RelativePath="spandsp/oki_adpcm.h"></File>
+<File RelativePath="spandsp/playout.h"></File>
+<File RelativePath="spandsp/plc.h"></File>
+<File RelativePath="spandsp/power_meter.h"></File>
+<File RelativePath="spandsp/queue.h"></File>
+<File RelativePath="spandsp/saturated.h"></File>
+<File RelativePath="spandsp/schedule.h"></File>
+<File RelativePath="spandsp/sig_tone.h"></File>
+<File RelativePath="spandsp/silence_gen.h"></File>
+<File RelativePath="spandsp/super_tone_rx.h"></File>
+<File RelativePath="spandsp/super_tone_tx.h"></File>
+<File RelativePath="spandsp/t4.h"></File>
+<File RelativePath="spandsp/t30.h"></File>
+<File RelativePath="spandsp/t30_api.h"></File>
+<File RelativePath="spandsp/t30_fcf.h"></File>
+<File RelativePath="spandsp/t30_logging.h"></File>
+<File RelativePath="spandsp/t31.h"></File>
+<File RelativePath="spandsp/t35.h"></File>
+<File RelativePath="spandsp/t38_core.h"></File>
+<File RelativePath="spandsp/t38_gateway.h"></File>
+<File RelativePath="spandsp/t38_non_ecm_buffer.h"></File>
+<File RelativePath="spandsp/t38_terminal.h"></File>
+<File RelativePath="spandsp/telephony.h"></File>
+<File RelativePath="spandsp/time_scale.h"></File>
+<File RelativePath="spandsp/timing.h"></File>
+<File RelativePath="spandsp/tone_detect.h"></File>
+<File RelativePath="spandsp/tone_generate.h"></File>
+<File RelativePath="spandsp/v17rx.h"></File>
+<File RelativePath="spandsp/v17tx.h"></File>
+<File RelativePath="spandsp/v22bis.h"></File>
+<File RelativePath="spandsp/v27ter_rx.h"></File>
+<File RelativePath="spandsp/v27ter_tx.h"></File>
+<File RelativePath="spandsp/v29rx.h"></File>
+<File RelativePath="spandsp/v29tx.h"></File>
+<File RelativePath="spandsp/v42.h"></File>
+<File RelativePath="spandsp/v42bis.h"></File>
+<File RelativePath="spandsp/v8.h"></File>
+<File RelativePath="spandsp/vector_float.h"></File>
+<File RelativePath="spandsp/vector_int.h"></File>
+<File RelativePath="spandsp/version.h"></File>
+<File RelativePath="spandsp/private/adsi.h"></File>
+<File RelativePath="spandsp/private/async.h"></File>
+<File RelativePath="spandsp/private/at_interpreter.h"></File>
+<File RelativePath="spandsp/private/awgn.h"></File>
+<File RelativePath="spandsp/private/bell_r2_mf.h"></File>
+<File RelativePath="spandsp/private/bert.h"></File>
+<File RelativePath="spandsp/private/bitstream.h"></File>
+<File RelativePath="spandsp/private/dtmf.h"></File>
+<File RelativePath="spandsp/private/fax.h"></File>
+<File RelativePath="spandsp/private/fax_modems.h"></File>
+<File RelativePath="spandsp/private/fsk.h"></File>
+<File RelativePath="spandsp/private/g711.h"></File>
+<File RelativePath="spandsp/private/g722.h"></File>
+<File RelativePath="spandsp/private/g726.h"></File>
+<File RelativePath="spandsp/private/gsm0610.h"></File>
+<File RelativePath="spandsp/private/hdlc.h"></File>
+<File RelativePath="spandsp/private/ima_adpcm.h"></File>
+<File RelativePath="spandsp/private/logging.h"></File>
+<File RelativePath="spandsp/private/lpc10.h"></File>
+<File RelativePath="spandsp/private/modem_connect_tones.h"></File>
+<File RelativePath="spandsp/private/noise.h"></File>
+<File RelativePath="spandsp/private/oki_adpcm.h"></File>
+<File RelativePath="spandsp/private/queue.h"></File>
+<File RelativePath="spandsp/private/schedule.h"></File>
+<File RelativePath="spandsp/private/sig_tone.h"></File>
+<File RelativePath="spandsp/private/super_tone_rx.h"></File>
+<File RelativePath="spandsp/private/super_tone_tx.h"></File>
+<File RelativePath="spandsp/private/t30.h"></File>
+<File RelativePath="spandsp/private/t31.h"></File>
+<File RelativePath="spandsp/private/t38_core.h"></File>
+<File RelativePath="spandsp/private/t38_gateway.h"></File>
+<File RelativePath="spandsp/private/t38_non_ecm_buffer.h"></File>
+<File RelativePath="spandsp/private/t38_terminal.h"></File>
+<File RelativePath="spandsp/private/t4.h"></File>
+<File RelativePath="spandsp/private/time_scale.h"></File>
+<File RelativePath="spandsp/private/tone_detect.h"></File>
+<File RelativePath="spandsp/private/tone_generate.h"></File>
+<File RelativePath="spandsp/private/v17rx.h"></File>
+<File RelativePath="spandsp/private/v17tx.h"></File>
+<File RelativePath="spandsp/private/v22bis.h"></File>
+<File RelativePath="spandsp/private/v27ter_rx.h"></File>
+<File RelativePath="spandsp/private/v27ter_tx.h"></File>
+<File RelativePath="spandsp/private/v29rx.h"></File>
+<File RelativePath="spandsp/private/v29tx.h"></File>
+<File RelativePath="spandsp/private/v42.h"></File>
+<File RelativePath="spandsp/private/v42bis.h"></File>
+<File RelativePath="spandsp/private/v8.h"></File>
+<File RelativePath="spandsp/expose.h"></File>
+<File RelativePath="spandsp.h"></File>
+		</Filter>
		<Filter

+			Name="Resource Files"
			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
			>
		</Filter>

+	</Files>
	<Globals>
	</Globals>
</VisualStudioProject>


Modified: freeswitch/trunk/libs/spandsp/src/msvc/msvcproj.foot
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/msvc/msvcproj.foot	(original)
+++ freeswitch/trunk/libs/spandsp/src/msvc/msvcproj.foot	Mon Feb  2 11:40:52 2009
@@ -1,7 +1,7 @@
-
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
+
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project

Modified: freeswitch/trunk/libs/spandsp/src/msvc/msvcproj.head
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/msvc/msvcproj.head	(original)
+++ freeswitch/trunk/libs/spandsp/src/msvc/msvcproj.head	Mon Feb  2 11:40:52 2009
@@ -1,92 +1,92 @@
-# Microsoft Developer Studio Project File - Name="spandsp" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=spandsp - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "spandsp.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "spandsp.mak" CFG="spandsp - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "spandsp - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "spandsp - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "spandsp - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /D "_WINDLL" /FR /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib ws2_32.lib winmm.lib /nologo /dll /map /debug /machine:I386 /out:"Release/libspandsp.dll"
-
-!ELSEIF  "$(CFG)" == "spandsp - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /FR /FD /GZ /c
-# SUBTRACT CPP /WX /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib ws2_32.lib winmm.lib /nologo /dll /incremental:no /map /debug /machine:I386 /out:"Debug/libspandsp.dll" /pdbtype:sept
-# SUBTRACT LINK32 /nodefaultlib
-
-!ENDIF 
-
-# Begin Target
-
-# Name "spandsp - Win32 Release"
-# Name "spandsp - Win32 Debug"
+# Microsoft Developer Studio Project File - Name="spandsp" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=spandsp - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "spandsp.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "spandsp.mak" CFG="spandsp - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "spandsp - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "spandsp - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "spandsp - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "." /I "..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /D "_WINDLL" /FR /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib ws2_32.lib winmm.lib /nologo /dll /map /debug /machine:I386 /out:"Release/libspandsp.dll"
+
+!ELSEIF  "$(CFG)" == "spandsp - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "." /I "..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D HAVE_TGMATH_H /FR /FD /GZ /c
+# SUBTRACT CPP /WX /YX
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib ws2_32.lib winmm.lib /nologo /dll /incremental:no /map /debug /machine:I386 /out:"Debug/libspandsp.dll" /pdbtype:sept
+# SUBTRACT LINK32 /nodefaultlib
+
+!ENDIF 
+
+# Begin Target
+
+# Name "spandsp - Win32 Release"
+# Name "spandsp - Win32 Debug"

Modified: freeswitch/trunk/libs/spandsp/src/msvc/spandsp.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/msvc/spandsp.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/msvc/spandsp.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: spandsp.h.in,v 1.14 2009/01/07 13:31:53 steveu Exp $
+ * $Id: spandsp.h.in,v 1.15 2009/01/31 08:48:10 steveu Exp $
  */
 
 /*! \file */
@@ -33,6 +33,8 @@
 #undef SPANDSP_USE_FIXED_POINT
 #undef SPANDSP_MISALIGNED_ACCESS_FAILS
 
+#define SPANDSP_USE_EXPORT_CAPABILITY 1
+
 #include <stdlib.h>
 #include <inttypes.h>
 #include <string.h>

Modified: freeswitch/trunk/libs/spandsp/src/msvc/vc8proj.foot
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/msvc/vc8proj.foot	(original)
+++ freeswitch/trunk/libs/spandsp/src/msvc/vc8proj.foot	Mon Feb  2 11:40:52 2009
@@ -5,10 +5,6 @@
 			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
 			>
 		</Filter>
-		<File
-			RelativePath=".\msvc\spandsp.def"
-			>
-		</File>
 	</Files>
 	<Globals>
 	</Globals>

Modified: freeswitch/trunk/libs/spandsp/src/msvc/vc8proj.head
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/msvc/vc8proj.head	(original)
+++ freeswitch/trunk/libs/spandsp/src/msvc/vc8proj.head	Mon Feb  2 11:40:52 2009
@@ -64,7 +64,6 @@
 			<Tool
 				Name="VCLinkerTool"
 				LinkIncremental="2"
-				ModuleDefinitionFile="./msvc/spandsp.def"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				RandomizedBaseAddress="1"
@@ -138,7 +137,6 @@
 			<Tool
 				Name="VCLinkerTool"
 				LinkIncremental="1"
-				ModuleDefinitionFile="./msvc/spandsp.def"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"

Modified: freeswitch/trunk/libs/spandsp/src/noise.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/noise.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/noise.c	Mon Feb  2 11:40:52 2009
@@ -23,7 +23,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: noise.c,v 1.28 2009/01/28 03:41:27 steveu Exp $
+ * $Id: noise.c,v 1.29 2009/01/31 08:48:10 steveu Exp $
  */
 
 /*! \file */
@@ -113,4 +113,11 @@
     return s;
 }
 /*- End of function --------------------------------------------------------*/
+
+int noise_free(noise_state_t *s)
+{
+    free(s);
+    return 0;
+}
+/*- End of function --------------------------------------------------------*/
 /*- End of file ------------------------------------------------------------*/

Modified: freeswitch/trunk/libs/spandsp/src/queue.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/queue.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/queue.c	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: queue.c,v 1.26 2009/01/29 01:41:06 steveu Exp $
+ * $Id: queue.c,v 1.27 2009/01/31 08:48:10 steveu Exp $
  */
 
 /*! \file */
@@ -39,7 +39,8 @@
 #include <inttypes.h>
 #include <sys/types.h>
 
-#define FULLY_DEFINE_QUEUE_STATE_T
+#define SPANDSP_FULLY_DEFINE_QUEUE_STATE_T
+#include "spandsp/telephony.h"
 #include "spandsp/queue.h"
 
 #include "spandsp/private/queue.h"

Modified: freeswitch/trunk/libs/spandsp/src/spandsp.h.in
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp.h.in	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp.h.in	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: spandsp.h.in,v 1.14 2009/01/07 13:31:53 steveu Exp $
+ * $Id: spandsp.h.in,v 1.15 2009/01/31 08:48:10 steveu Exp $
  */
 
 /*! \file */
@@ -33,6 +33,8 @@
 @SPANDSP_USE_FIXED_POINT@
 @SPANDSP_MISALIGNED_ACCESS_FAILS@
 
+ at SPANDSP_USE_EXPORT_CAPABILITY@
+
 #include <stdlib.h>
 @INSERT_INTTYPES_HEADER@
 #include <string.h>

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/adsi.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/adsi.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/adsi.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: adsi.h,v 1.33 2008/10/13 14:19:18 steveu Exp $
+ * $Id: adsi.h,v 1.34 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -392,9 +392,9 @@
     \param user_data An opaque pointer for the callback routine.
     \return A pointer to the initialised context, or NULL if there was a problem.
 */
-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(adsi_rx_state_t) *adsi_rx_init(adsi_rx_state_t *s, int standard, put_msg_func_t put_msg, void *user_data);
 
-int adsi_rx_free(adsi_rx_state_t *s);
+SPAN_DECLARE(int) adsi_rx_free(adsi_rx_state_t *s);
 
 /*! \brief Receive a chunk of ADSI audio.
     \param s The ADSI receive context.
@@ -402,16 +402,16 @@
     \param len The number of samples in the buffer.
     \return The number of samples unprocessed.
 */
-int adsi_rx(adsi_rx_state_t *s, const int16_t *amp, int len);
+SPAN_DECLARE(int) adsi_rx(adsi_rx_state_t *s, const int16_t *amp, int len);
 
 /*! \brief Initialise an ADSI transmit context.
     \param s The ADSI transmit context.
     \param standard The code for the ADSI standard to be used.
     \return A pointer to the initialised context, or NULL if there was a problem.
 */
-adsi_tx_state_t *adsi_tx_init(adsi_tx_state_t *s, int standard);
+SPAN_DECLARE(adsi_tx_state_t) *adsi_tx_init(adsi_tx_state_t *s, int standard);
 
-int adsi_tx_free(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.
     \param s The ADSI transmit context.
@@ -420,11 +420,11 @@
     \param postamble_ones_len The number of bits of continuous one after a message.
     \param stop_bits The number of stop bits per character.
 */
-void adsi_tx_set_preamble(adsi_tx_state_t *s,
-                          int preamble_len,
-                          int preamble_ones_len,
-                          int postamble_ones_len,
-                          int stop_bits);
+SPAN_DECLARE(void) adsi_tx_set_preamble(adsi_tx_state_t *s,
+                                        int preamble_len,
+                                        int preamble_ones_len,
+                                        int postamble_ones_len,
+                                        int stop_bits);
 
 /*! \brief Generate a block of ADSI audio samples.
     \param s The ADSI transmit context.
@@ -432,12 +432,12 @@
     \param max_len The number of samples to be generated.
     \return The number of samples actually generated.
 */
-int adsi_tx(adsi_tx_state_t *s, int16_t *amp, int max_len);
+SPAN_DECLARE(int) adsi_tx(adsi_tx_state_t *s, int16_t *amp, int max_len);
 
 /*! \brief Request generation of an ADSI alert tone.
     \param s The ADSI transmit context.
 */
-void adsi_tx_send_alert_tone(adsi_tx_state_t *s);
+SPAN_DECLARE(void) adsi_tx_send_alert_tone(adsi_tx_state_t *s);
 
 /*! \brief Put a message into the input buffer of an ADSI transmit context.
     \param s The ADSI transmit context.
@@ -447,7 +447,7 @@
             in the transmitter, this function will return zero, as it will
             not successfully add the message to the buffer.
 */
-int adsi_tx_put_message(adsi_tx_state_t *s, const uint8_t *msg, int len);
+SPAN_DECLARE(int) adsi_tx_put_message(adsi_tx_state_t *s, const uint8_t *msg, int len);
 
 /*! \brief Get a field from an ADSI message.
     \param s The ADSI receive context.
@@ -458,7 +458,7 @@
     \param field_body Pointer to the body of the field.
     \param field_len The length of the field, or -1 for no more fields, or -2 for message structure corrupt.
 */
-int adsi_next_field(adsi_rx_state_t *s, const uint8_t *msg, int msg_len, int pos, uint8_t *field_type, uint8_t const **field_body, int *field_len);
+SPAN_DECLARE(int) adsi_next_field(adsi_rx_state_t *s, const uint8_t *msg, int msg_len, int pos, uint8_t *field_type, uint8_t const **field_body, int *field_len);
 
 /*! \brief Insert the header or a field into an ADSI message.
     \param s The ADSI transmit context.
@@ -468,13 +468,13 @@
     \param field_body Pointer to the body of the new field.
     \param field_len The length of the new field.
 */
-int adsi_add_field(adsi_tx_state_t *s, uint8_t *msg, int len, uint8_t field_type, uint8_t const *field_body, int field_len);
+SPAN_DECLARE(int) adsi_add_field(adsi_tx_state_t *s, uint8_t *msg, int len, uint8_t field_type, uint8_t const *field_body, int field_len);
 
 /*! \brief Return a short name for an ADSI standard
     \param standard The code for the standard.
     \return A pointer to the name.
 */
-const char *adsi_standard_to_str(int standard);
+SPAN_DECLARE(const char) *adsi_standard_to_str(int standard);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/async.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/async.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/async.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: async.h,v 1.19 2008/11/30 10:17:31 steveu Exp $
+ * $Id: async.h,v 1.20 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -138,7 +138,7 @@
     \brief Convert a signal status to a short text description.
     \param status The modem signal status.
     \return A pointer to the description. */
-const char *signal_status_to_str(int status);
+SPAN_DECLARE(const char) *signal_status_to_str(int status);
 
 /*! Initialise an asynchronous data transmit context.
     \brief Initialise an asynchronous data transmit context.
@@ -150,19 +150,19 @@
     \param get_byte The callback routine used to get the data to be transmitted.
     \param user_data An opaque pointer.
     \return A pointer to the initialised context, or NULL if there was a problem. */
-async_tx_state_t *async_tx_init(async_tx_state_t *s,
-                                int data_bits,
-                                int parity_bits,
-                                int stop_bits,
-                                int use_v14,
-                                get_byte_func_t get_byte,
-                                void *user_data);
+SPAN_DECLARE(async_tx_state_t) *async_tx_init(async_tx_state_t *s,
+                                              int data_bits,
+                                              int parity_bits,
+                                              int stop_bits,
+                                              int use_v14,
+                                              get_byte_func_t get_byte,
+                                              void *user_data);
 
 /*! 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.
     \return the next bit, or PUTBIT_END_OF_DATA to indicate the data stream has ended. */
-int async_tx_get_bit(void *user_data);
+SPAN_DECLARE(int) async_tx_get_bit(void *user_data);
 
 /*! Initialise an asynchronous data receiver context.
     \brief Initialise an asynchronous data receiver context.
@@ -174,13 +174,13 @@
     \param put_byte The callback routine used to put the received data.
     \param user_data An opaque pointer.
     \return A pointer to the initialised context, or NULL if there was a problem. */
-async_rx_state_t *async_rx_init(async_rx_state_t *s,
-                                int data_bits,
-                                int parity_bits,
-                                int stop_bits,
-                                int use_v14,
-                                put_byte_func_t put_byte,
-                                void *user_data);
+SPAN_DECLARE(async_rx_state_t) *async_rx_init(async_rx_state_t *s,
+                                              int data_bits,
+                                              int parity_bits,
+                                              int stop_bits,
+                                              int use_v14,
+                                              put_byte_func_t put_byte,
+                                              void *user_data);
 
 /*! Accept a bit from a received serial bit stream
     \brief Accept a bit from a received serial bit stream
@@ -191,7 +191,7 @@
         - SIG_STATUS_TRAINING_SUCCEEDED
         - SIG_STATUS_TRAINING_FAILED
         - SIG_STATUS_END_OF_DATA */
-void async_rx_put_bit(void *user_data, int bit);
+SPAN_DECLARE(void) async_rx_put_bit(void *user_data, int bit);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/at_interpreter.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/at_interpreter.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/at_interpreter.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: at_interpreter.h,v 1.20 2008/11/30 05:43:37 steveu Exp $
+ * $Id: at_interpreter.h,v 1.21 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -138,32 +138,32 @@
 {
 #endif
 
-void at_set_at_rx_mode(at_state_t *s, int new_mode);
+SPAN_DECLARE(void) at_set_at_rx_mode(at_state_t *s, int new_mode);
 
-void at_put_response(at_state_t *s, const char *t);
+SPAN_DECLARE(void) at_put_response(at_state_t *s, const char *t);
 
-void at_put_numeric_response(at_state_t *s, int val);
+SPAN_DECLARE(void) at_put_numeric_response(at_state_t *s, int val);
 
-void at_put_response_code(at_state_t *s, int code);
+SPAN_DECLARE(void) at_put_response_code(at_state_t *s, int code);
 
-void at_reset_call_info(at_state_t *s);
+SPAN_DECLARE(void) at_reset_call_info(at_state_t *s);
 
 /*! Set the call information for an AT interpreter.
     \brief Set the call information for an AT interpreter.
     \param s The AT interpreter context.
     \param id .
     \param value . */
-void at_set_call_info(at_state_t *s, char const *id, char const *value);
+SPAN_DECLARE(void) at_set_call_info(at_state_t *s, char const *id, char const *value);
 
-void at_display_call_info(at_state_t *s);
+SPAN_DECLARE(void) at_display_call_info(at_state_t *s);
 
-int at_modem_control(at_state_t *s, int op, const char *num);
+SPAN_DECLARE(int) at_modem_control(at_state_t *s, int op, const char *num);
 
-void at_call_event(at_state_t *s, int event);
+SPAN_DECLARE(void) at_call_event(at_state_t *s, int event);
 
-void at_interpreter(at_state_t *s, const char *cmd, int len);
+SPAN_DECLARE(void) at_interpreter(at_state_t *s, const char *cmd, int len);
 
-void at_set_class1_handler(at_state_t *s, at_class1_handler_t handler, void *user_data);
+SPAN_DECLARE(void) at_set_class1_handler(at_state_t *s, at_class1_handler_t handler, void *user_data);
 
 /*! Initialise an AT interpreter context.
     \brief Initialise an AT interpreter context.
@@ -173,17 +173,17 @@
     \param modem_control_handler x.
     \param modem_control_user_data x.
     \return A pointer to the AT context, or NULL if there was a problem. */
-at_state_t *at_init(at_state_t *s,
-                    at_tx_handler_t *at_tx_handler,
-                    void *at_tx_user_data,
-                    at_modem_control_handler_t *modem_control_handler,
-                    void *modem_control_user_data);
+SPAN_DECLARE(at_state_t) *at_init(at_state_t *s,
+                                  at_tx_handler_t *at_tx_handler,
+                                  void *at_tx_user_data,
+                                  at_modem_control_handler_t *modem_control_handler,
+                                  void *modem_control_user_data);
 
 /*! Free an AT interpreter context.
     \brief Free an AT interpreter context.
     \param s The AT context.
     \return 0 for OK */
-int at_free(at_state_t *s);
+SPAN_DECLARE(int) at_free(at_state_t *s);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/awgn.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/awgn.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/awgn.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: awgn.h,v 1.15 2008/11/30 12:38:27 steveu Exp $
+ * $Id: awgn.h,v 1.16 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -78,11 +78,11 @@
 {
 #endif
 
-awgn_state_t *awgn_init_dbm0(awgn_state_t *s, int idum, float level);
+SPAN_DECLARE(awgn_state_t) *awgn_init_dbm0(awgn_state_t *s, int idum, float level);
 
-awgn_state_t *awgn_init_dbov(awgn_state_t *s, int idum, float level);
+SPAN_DECLARE(awgn_state_t) *awgn_init_dbov(awgn_state_t *s, int idum, float level);
 
-int16_t awgn(awgn_state_t *s);
+SPAN_DECLARE(int16_t) awgn(awgn_state_t *s);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/bell_r2_mf.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/bell_r2_mf.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/bell_r2_mf.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: bell_r2_mf.h,v 1.21 2008/10/13 14:19:18 steveu Exp $
+ * $Id: bell_r2_mf.h,v 1.22 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -136,7 +136,7 @@
     \param max_samples The required number of generated samples.
     \return The number of samples actually generated. This may be less than 
             max_samples if the input buffer empties. */
-int bell_mf_tx(bell_mf_tx_state_t *s, int16_t amp[], int max_samples);
+SPAN_DECLARE(int) bell_mf_tx(bell_mf_tx_state_t *s, int16_t amp[], int max_samples);
 
 /*! \brief Put a string of digits in a Bell MF generator's input buffer.
     \param s The Bell MF generator context.
@@ -145,42 +145,42 @@
            assumed to be a NULL terminated string.
     \return The number of digits actually added. This may be less than the
             length of the digit string, if the buffer fills up. */
-size_t bell_mf_tx_put(bell_mf_tx_state_t *s, const char *digits, int len);
+SPAN_DECLARE(int) bell_mf_tx_put(bell_mf_tx_state_t *s, const char *digits, int len);
 
 /*! \brief Initialise a Bell MF generator context.
     \param s The Bell MF generator context.
     \return A pointer to the Bell MF generator context.*/
-bell_mf_tx_state_t *bell_mf_tx_init(bell_mf_tx_state_t *s);
+SPAN_DECLARE(bell_mf_tx_state_t) *bell_mf_tx_init(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. */
-int bell_mf_tx_free(bell_mf_tx_state_t *s);
+SPAN_DECLARE(int) bell_mf_tx_free(bell_mf_tx_state_t *s);
 
 /*! \brief Generate a block of R2 MF tones.
     \param s The R2 MF generator context.
     \param amp The buffer for the generated signal.
     \param samples The required number of generated samples.
     \return The number of samples actually generated. */
-int r2_mf_tx(r2_mf_tx_state_t *s, int16_t amp[], int samples);
+SPAN_DECLARE(int) r2_mf_tx(r2_mf_tx_state_t *s, int16_t amp[], int samples);
 
 /*! \brief Generate a block of R2 MF tones.
     \param s The R2 MF generator context.
     \param digit The digit to be generated.
     \return 0 for OK, or -1 for a bad request. */
-int r2_mf_tx_put(r2_mf_tx_state_t *s, char digit);
+SPAN_DECLARE(int) r2_mf_tx_put(r2_mf_tx_state_t *s, char digit);
 
 /*! \brief Initialise an R2 MF tone generator context.
     \param s The R2 MF generator context.
     \param fwd TRUE if the context is for forward signals. FALSE if the
            context is for backward signals.
     \return A pointer to the MFC/R2 generator context.*/
-r2_mf_tx_state_t *r2_mf_tx_init(r2_mf_tx_state_t *s, int fwd);
+SPAN_DECLARE(r2_mf_tx_state_t) *r2_mf_tx_init(r2_mf_tx_state_t *s, int fwd);
 
 /*! \brief Free an R2 MF tone generator context.
     \param s The R2 MF tone generator context.
     \return 0 for OK, else -1. */
-int r2_mf_tx_free(r2_mf_tx_state_t *s);
+SPAN_DECLARE(int) r2_mf_tx_free(r2_mf_tx_state_t *s);
 
 /*! Process a block of received Bell MF audio samples.
     \brief Process a block of received Bell MF audio samples.
@@ -188,14 +188,14 @@
     \param amp The audio sample buffer.
     \param samples The number of samples in the buffer.
     \return The number of samples unprocessed. */
-int bell_mf_rx(bell_mf_rx_state_t *s, const int16_t amp[], int samples);
+SPAN_DECLARE(int) bell_mf_rx(bell_mf_rx_state_t *s, const int16_t amp[], int samples);
 
 /*! \brief Get a string of digits from a Bell MF receiver's output buffer.
     \param s The Bell MF receiver context.
     \param buf The buffer for the received digits.
     \param max The maximum  number of digits to be returned,
     \return The number of digits actually returned. */
-size_t bell_mf_rx_get(bell_mf_rx_state_t *s, char *buf, int max);
+SPAN_DECLARE(size_t) bell_mf_rx_get(bell_mf_rx_state_t *s, char *buf, int max);
 
 /*! \brief Initialise a Bell MF receiver context.
     \param s The Bell MF receiver context.
@@ -205,14 +205,14 @@
     \param user_data An opaque pointer which is associated with the context,
            and supplied in callbacks.
     \return A pointer to the Bell MF receiver context.*/
-bell_mf_rx_state_t *bell_mf_rx_init(bell_mf_rx_state_t *s,
-                                    digits_rx_callback_t callback,
-                                    void *user_data);
+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 Free a Bell MF receiver context.
     \param s The Bell MF receiver context.
     \return 0 for OK, else -1. */
-int bell_mf_rx_free(bell_mf_rx_state_t *s);
+SPAN_DECLARE(int) bell_mf_rx_free(bell_mf_rx_state_t *s);
 
 /*! Process a block of received R2 MF audio samples.
     \brief Process a block of received R2 MF audio samples.
@@ -220,12 +220,12 @@
     \param amp The audio sample buffer.
     \param samples The number of samples in the buffer.
     \return The number of samples unprocessed. */
-int r2_mf_rx(r2_mf_rx_state_t *s, const int16_t amp[], int samples);
+SPAN_DECLARE(int) r2_mf_rx(r2_mf_rx_state_t *s, const int16_t amp[], int samples);
 
 /*! \brief Get the current digit from an R2 MF receiver.
     \param s The R2 MF receiver context.
     \return The number digits being received. */
-int r2_mf_rx_get(r2_mf_rx_state_t *s);
+SPAN_DECLARE(int) r2_mf_rx_get(r2_mf_rx_state_t *s);
 
 /*! \brief Initialise an R2 MF receiver context.
     \param s The R2 MF receiver context.
@@ -237,15 +237,15 @@
     \param user_data An opaque pointer which is associated with the context,
            and supplied in callbacks.
     \return A pointer to the R2 MF receiver context. */
-r2_mf_rx_state_t *r2_mf_rx_init(r2_mf_rx_state_t *s,
-                                int fwd,
-                                tone_report_func_t callback,
-                                void *user_data);
+SPAN_DECLARE(r2_mf_rx_state_t) *r2_mf_rx_init(r2_mf_rx_state_t *s,
+                                              int fwd,
+                                              tone_report_func_t callback,
+                                              void *user_data);
 
 /*! \brief Free an R2 MF receiver context.
     \param s The R2 MF receiver context.
     \return 0 for OK, else -1. */
-int r2_mf_rx_free(r2_mf_rx_state_t *s);
+SPAN_DECLARE(int) r2_mf_rx_free(r2_mf_rx_state_t *s);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/bert.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/bert.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/bert.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: bert.h,v 1.20 2008/11/30 12:38:27 steveu Exp $
+ * $Id: bert.h,v 1.21 2009/01/31 08:48:11 steveu Exp $
  */
 
 #if !defined(_SPANDSP_BERT_H_)
@@ -116,7 +116,7 @@
 /*! Return a short description of a BERT event.
     \param event The event type.
     \return A pointer to a short text string describing the event. */
-const char *bert_event_to_str(int event);
+SPAN_DECLARE(const char) *bert_event_to_str(int event);
 
 /*! Initialise a BERT context.
     \param s The BERT context.
@@ -125,30 +125,30 @@
     \param resync_len ???
     \param resync_percent The percentage of bad bits which will cause a resync.
     \return The BERT context. */
-bert_state_t *bert_init(bert_state_t *s, int limit, int pattern, int resync_len, int resync_percent);
+SPAN_DECLARE(bert_state_t) *bert_init(bert_state_t *s, int limit, int pattern, int resync_len, int resync_percent);
 
 /*! Get the next bit of the BERT sequence from the generator.
     \param s The BERT context.
     \return The bit. */
-int bert_get_bit(bert_state_t *s);
+SPAN_DECLARE(int) bert_get_bit(bert_state_t *s);
 
 /*! Put the next bit of the BERT sequence to the analyser.
     \param s The BERT context.
     \param bit The bit. */
-void bert_put_bit(bert_state_t *s, int bit);
+SPAN_DECLARE(void) bert_put_bit(bert_state_t *s, int bit);
 
 /*! Set the callback function for reporting the test status.
     \param s The BERT context.
     \param freq The required frequency of regular reports.
     \param reporter The callback function.
     \param user_data An opaque pointer passed to the reporter routine. */
-void bert_set_report(bert_state_t *s, int freq, bert_report_func_t reporter, void *user_data);
+SPAN_DECLARE(void) bert_set_report(bert_state_t *s, int freq, bert_report_func_t reporter, void *user_data);
 
 /*! Get the results of the BERT.
     \param s The BERT context.
     \param results The results.
     \return The size of the result structure. */
-int bert_result(bert_state_t *s, bert_results_t *results);
+SPAN_DECLARE(int) bert_result(bert_state_t *s, bert_results_t *results);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/bit_operations.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/bit_operations.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/bit_operations.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: bit_operations.h,v 1.23 2008/10/13 23:41:40 steveu Exp $
+ * $Id: bit_operations.h,v 1.24 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -167,45 +167,45 @@
 /*! \brief Bit reverse a 16 bit word.
     \param data The word to be reversed.
     \return The bit reversed version of data. */
-uint16_t bit_reverse16(uint16_t data);
+SPAN_DECLARE(uint16_t) bit_reverse16(uint16_t data);
 
 /*! \brief Bit reverse a 32 bit word.
     \param data The word to be reversed.
     \return The bit reversed version of data. */
-uint32_t bit_reverse32(uint32_t data);
+SPAN_DECLARE(uint32_t) bit_reverse32(uint32_t data);
 
 /*! \brief Bit reverse each of the four bytes in a 32 bit word.
     \param data The word to be reversed.
     \return The bit reversed version of data. */
-uint32_t bit_reverse_4bytes(uint32_t data);
+SPAN_DECLARE(uint32_t) bit_reverse_4bytes(uint32_t data);
 
 #if defined(__x86_64__)
 /*! \brief Bit reverse each of the eight bytes in a 64 bit word.
     \param data The word to be reversed.
     \return The bit reversed version of data. */
-uint64_t bit_reverse_8bytes(uint64_t data);
+SPAN_DECLARE(uint64_t) bit_reverse_8bytes(uint64_t data);
 #endif
 
 /*! \brief Bit reverse each bytes in a buffer.
     \param to The buffer to place the reversed data in.
     \param from The buffer containing the data to be reversed.
     \param len The length of the data in the buffer. */
-void bit_reverse(uint8_t to[], const uint8_t from[], int len);
+SPAN_DECLARE(void) bit_reverse(uint8_t to[], const uint8_t from[], int len);
 
 /*! \brief Find the number of set bits in a 32 bit word.
     \param x The word to be searched.
     \return The number of set bits. */
-int one_bits32(uint32_t x);
+SPAN_DECLARE(int) one_bits32(uint32_t x);
 
 /*! \brief Create a mask as wide as the number in a 32 bit word.
     \param x The word to be searched.
     \return The mask. */
-uint32_t make_mask32(uint32_t x);
+SPAN_DECLARE(uint32_t) make_mask32(uint32_t x);
 
 /*! \brief Create a mask as wide as the number in a 16 bit word.
     \param x The word to be searched.
     \return The mask. */
-uint16_t make_mask16(uint16_t x);
+SPAN_DECLARE(uint16_t) make_mask16(uint16_t x);
 
 /*! \brief Find the least significant one in a word, and return a word
            with just that bit set.

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/complex_filters.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/complex_filters.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/complex_filters.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: complex_filters.h,v 1.12 2008/04/17 14:27:00 steveu Exp $
+ * $Id: complex_filters.h,v 1.13 2009/01/31 08:48:11 steveu Exp $
  */
 
 #if !defined(_SPANDSP_COMPLEX_FILTERS_H_)
@@ -35,23 +35,23 @@
 /*! Filter state */
 typedef struct
 {
-    int                 nz;
-    int                 np;
-    filter_step_func_t  fsf;
+    int nz;
+    int np;
+    filter_step_func_t fsf;
 } fspec_t;
 
 struct filter_s
 {
-    fspec_t             *fs;
-    float               sum;
-    int                 ptr;		/* for moving average filters only */
-    float               v[];
+    fspec_t *fs;
+    float sum;
+    int ptr;            /* Only for moving average filters */
+    float v[];
 };
 
 typedef struct
 {
-    filter_t            *ref;
-    filter_t            *imf;
+    filter_t *ref;
+    filter_t *imf;
 } cfilter_t;
 
 #if defined(__cplusplus)
@@ -59,13 +59,13 @@
 {
 #endif
 
-filter_t *filter_create(fspec_t *fs);
-void filter_delete(filter_t *fi);
-float filter_step(filter_t *fi, float x);
-
-cfilter_t *cfilter_create(fspec_t *fs);
-void cfilter_delete(cfilter_t *cfi);
-complexf_t cfilter_step(cfilter_t *cfi, const complexf_t *z);
+SPAN_DECLARE(filter_t) *filter_create(fspec_t *fs);
+SPAN_DECLARE(void) filter_delete(filter_t *fi);
+SPAN_DECLARE(float) filter_step(filter_t *fi, float x);
+
+SPAN_DECLARE(cfilter_t) *cfilter_create(fspec_t *fs);
+SPAN_DECLARE(void) cfilter_delete(cfilter_t *cfi);
+SPAN_DECLARE(complexf_t) cfilter_step(cfilter_t *cfi, const complexf_t *z);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_float.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_float.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_float.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: complex_vector_float.h,v 1.11 2008/10/09 13:25:19 steveu Exp $
+ * $Id: complex_vector_float.h,v 1.12 2009/01/31 08:48:11 steveu Exp $
  */
 
 #if !defined(_SPANDSP_COMPLEX_VECTOR_FLOAT_H_)
@@ -120,9 +120,9 @@
 /*- End of function --------------------------------------------------------*/
 #endif
 
-void cvec_mulf(complexf_t z[], const complexf_t x[], const complexf_t y[], int n);
+SPAN_DECLARE(void) cvec_mulf(complexf_t z[], const complexf_t x[], const complexf_t y[], int n);
 
-void cvec_mul(complex_t z[], const complex_t x[], const complex_t y[], int n);
+SPAN_DECLARE(void) cvec_mul(complex_t z[], const complex_t x[], const complex_t y[], int n);
 
 #if defined(HAVE_LONG_DOUBLE)
 void cvec_mull(complexl_t z[], const complexl_t x[], const complexl_t y[], int n);
@@ -133,14 +133,14 @@
     \param y The first vector.
     \param n The number of elements in the vectors.
     \return The dot product of the two vectors. */
-complexf_t cvec_dot_prodf(const complexf_t x[], const complexf_t y[], int n);
+SPAN_DECLARE(complexf_t) cvec_dot_prodf(const complexf_t x[], const complexf_t y[], int n);
 
 /*! \brief Find the dot product of two complex double vectors.
     \param x The first vector.
     \param y The first vector.
     \param n The number of elements in the vectors.
     \return The dot product of the two vectors. */
-complex_t cvec_dot_prod(const complex_t x[], const complex_t y[], int n);
+SPAN_DECLARE(complex_t) cvec_dot_prod(const complex_t x[], const complex_t y[], int n);
 
 #if defined(HAVE_LONG_DOUBLE)
 /*! \brief Find the dot product of two complex long double vectors.
@@ -148,7 +148,7 @@
     \param y The first vector.
     \param n The number of elements in the vectors.
     \return The dot product of the two vectors. */
-complexl_t cvec_dot_prodl(const complexl_t x[], const complexl_t y[], int n);
+SPAN_DECLARE(complexl_t) cvec_dot_prodl(const complexl_t x[], const complexl_t y[], int n);
 #endif
 
 /*! \brief Find the dot product of two complex float vectors, where the first is a circular buffer
@@ -158,11 +158,11 @@
     \param n The number of elements in the vectors.
     \param pos The starting position in the x vector.
     \return The dot product of the two vectors. */
-complexf_t cvec_circular_dot_prodf(const complexf_t x[], const complexf_t y[], int n, int pos);
+SPAN_DECLARE(complexf_t) cvec_circular_dot_prodf(const complexf_t x[], const complexf_t y[], int n, int pos);
 
-void cvec_lmsf(const complexf_t x[], complexf_t y[], int n, const complexf_t *error);
+SPAN_DECLARE(void) cvec_lmsf(const complexf_t x[], complexf_t y[], int n, const complexf_t *error);
 
-void cvec_circular_lmsf(const complexf_t x[], complexf_t y[], int n, int pos, const complexf_t *error);
+SPAN_DECLARE(void) cvec_circular_lmsf(const complexf_t x[], complexf_t y[], int n, int pos, const complexf_t *error);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_int.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_int.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_int.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: complex_vector_int.h,v 1.3 2008/09/18 13:16:49 steveu Exp $
+ * $Id: complex_vector_int.h,v 1.4 2009/01/31 08:48:11 steveu Exp $
  */
 
 #if !defined(_SPANDSP_COMPLEX_VECTOR_INT_H_)
@@ -101,14 +101,14 @@
     \param y The first vector.
     \param n The number of elements in the vectors.
     \return The dot product of the two vectors. */
-complexi32_t cvec_dot_prodi16(const complexi16_t x[], const complexi16_t y[], int n);
+SPAN_DECLARE(complexi32_t) cvec_dot_prodi16(const complexi16_t x[], const complexi16_t y[], int n);
 
 /*! \brief Find the dot product of two complex int32_t vectors.
     \param x The first vector.
     \param y The first vector.
     \param n The number of elements in the vectors.
     \return The dot product of the two vectors. */
-complexi32_t cvec_dot_prodi32(const complexi32_t x[], const complexi32_t y[], int n);
+SPAN_DECLARE(complexi32_t) cvec_dot_prodi32(const complexi32_t x[], const complexi32_t y[], int n);
 
 /*! \brief Find the dot product of two complex int16_t vectors, where the first is a circular buffer
            with an offset for the starting position.
@@ -117,11 +117,11 @@
     \param n The number of elements in the vectors.
     \param pos The starting position in the x vector.
     \return The dot product of the two vectors. */
-complexi32_t cvec_circular_dot_prodi16(const complexi16_t x[], const complexi16_t y[], int n, int pos);
+SPAN_DECLARE(complexi32_t) cvec_circular_dot_prodi16(const complexi16_t x[], const complexi16_t y[], int n, int pos);
 
-void cvec_lmsi16(const complexi16_t x[], complexi16_t y[], int n, const complexi16_t *error);
+SPAN_DECLARE(void) cvec_lmsi16(const complexi16_t x[], complexi16_t y[], int n, const complexi16_t *error);
 
-void cvec_circular_lmsi16(const complexi16_t x[], complexi16_t y[], int n, int pos, const complexi16_t *error);
+SPAN_DECLARE(void) cvec_circular_lmsi16(const complexi16_t x[], complexi16_t y[], int n, int pos, const complexi16_t *error);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/crc.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/crc.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/crc.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: crc.h,v 1.4 2008/04/17 14:27:00 steveu Exp $
+ * $Id: crc.h,v 1.5 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -49,7 +49,7 @@
            the application). It is previous returned CRC value for the continuation of a block.
     \return The CRC value.
 */
-uint32_t crc_itu32_calc(const uint8_t *buf, int len, uint32_t crc);
+SPAN_DECLARE(uint32_t) crc_itu32_calc(const uint8_t *buf, int len, uint32_t crc);
 
 /*! \brief Append an ITU/CCITT CRC-32 value to a frame.
     \param buf The buffer containing the frame. This must be at least 2 bytes longer than
@@ -57,14 +57,14 @@
     \param len The length of the frame.
     \return The new length of the frame.
 */
-int crc_itu32_append(uint8_t *buf, int len);
+SPAN_DECLARE(int) crc_itu32_append(uint8_t *buf, int len);
 
 /*! \brief Check the ITU/CCITT CRC-32 value in a frame.
     \param buf The buffer containing the frame.
     \param len The length of the frame.
     \return TRUE if the CRC is OK, else FALSE.
 */
-int crc_itu32_check(const uint8_t *buf, int len);
+SPAN_DECLARE(int) crc_itu32_check(const uint8_t *buf, int len);
 
 /*! \brief Calculate the ITU/CCITT CRC-16 value in buffer.
     \param buf The buffer containing the data.
@@ -73,7 +73,7 @@
            the application). It is previous returned CRC value for the continuation of a block.
     \return The CRC value.
 */
-uint16_t crc_itu16_calc(const uint8_t *buf, int len, uint16_t crc);
+SPAN_DECLARE(uint16_t) crc_itu16_calc(const uint8_t *buf, int len, uint16_t crc);
 
 /*! \brief Append an ITU/CCITT CRC-16 value to a frame.
     \param buf The buffer containing the frame. This must be at least 2 bytes longer than
@@ -81,14 +81,14 @@
     \param len The length of the frame.
     \return The new length of the frame.
 */
-int crc_itu16_append(uint8_t *buf, int len);
+SPAN_DECLARE(int) crc_itu16_append(uint8_t *buf, int len);
 
 /*! \brief Check the ITU/CCITT CRC-16 value in a frame.
     \param buf The buffer containing the frame.
     \param len The length of the frame.
     \return TRUE if the CRC is OK, else FALSE.
 */
-int crc_itu16_check(const uint8_t *buf, int len);
+SPAN_DECLARE(int) crc_itu16_check(const uint8_t *buf, int len);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/dds.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/dds.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/dds.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: dds.h,v 1.22 2009/01/29 01:41:06 steveu Exp $
+ * $Id: dds.h,v 1.23 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -39,57 +39,57 @@
     \param frequency The desired frequency, in Hz.
     \return The phase rate which while achieve the desired frequency.
 */
-int32_t dds_phase_rate(float frequency);
+SPAN_DECLARE(int32_t) dds_phase_rate(float frequency);
 
 /*! \brief Find the frequency, in Hz, equivalent to a phase rate.
     \param phase_rate The phase rate.
     \return The equivalent frequency, in Hz.
 */
-float dds_frequency(int32_t phase_rate);
+SPAN_DECLARE(float) dds_frequency(int32_t phase_rate);
 
 /*! \brief Find the scaling factor needed to achieve a specified level in dBm0.
     \param level The desired signal level, in dBm0.
     \return The scaling factor.
 */
-int16_t dds_scaling_dbm0(float level);
+SPAN_DECLARE(int16_t) dds_scaling_dbm0(float level);
 
 /*! \brief Find the scaling factor needed to achieve a specified level in dBmov.
     \param level The desired signal level, in dBmov.
     \return The scaling factor.
 */
-int16_t dds_scaling_dbov(float level);
+SPAN_DECLARE(int16_t) dds_scaling_dbov(float level);
 
 /*! \brief Find the amplitude for a particular phase.
     \param phase The desired phase 32 bit phase.
     \return The signal amplitude.
 */
-int16_t dds_lookup(uint32_t phase);
+SPAN_DECLARE(int16_t) dds_lookup(uint32_t phase);
 
 /*! \brief Find the amplitude for a particular phase offset from an accumulated phase.
     \param phase_acc The accumulated phase.
     \param phase_offset The phase offset.
     \return The signal amplitude.
 */
-int16_t dds_offset(uint32_t phase_acc, int32_t phase_offset);
+SPAN_DECLARE(int16_t) dds_offset(uint32_t phase_acc, int32_t phase_offset);
 
 /*! \brief Advance the phase, without returning any new signal sample.
     \param phase_acc A pointer to a phase accumulator value.
     \param phase_rate The phase increment to be applied.
 */
-void dds_advance(uint32_t *phase_acc, int32_t phase_rate);
+SPAN_DECLARE(void) dds_advance(uint32_t *phase_acc, int32_t phase_rate);
 
 /*! \brief Generate an integer tone sample.
     \param phase_acc A pointer to a phase accumulator value.
     \param phase_rate The phase increment to be applied.
     \return The signal amplitude, between -32767 and 32767.
 */
-int16_t dds(uint32_t *phase_acc, int32_t phase_rate);
+SPAN_DECLARE(int16_t) dds(uint32_t *phase_acc, int32_t phase_rate);
 
 /*! \brief Lookup the integer value of a specified phase.
     \param phase The phase accumulator value to be looked up.
     \return The signal amplitude, between -32767 and 32767.
 */
-int16_t dds_lookup(uint32_t phase);
+SPAN_DECLARE(int16_t) dds_lookup(uint32_t phase);
 
 /*! \brief Generate an integer tone sample, with modulation.
     \param phase_acc A pointer to a phase accumulator value.
@@ -98,20 +98,20 @@
     \param phase The phase offset.
     \return The signal amplitude, between -32767 and 32767.
 */
-int16_t dds_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase);
+SPAN_DECLARE(int16_t) dds_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase);
 
 /*! \brief Lookup the complex integer value of a specified phase.
     \param phase The phase accumulator value to be looked up.
     \return The complex signal amplitude, between (-32767, -32767) and (32767, 32767).
 */
-complexi_t dds_lookup_complexi(uint32_t phase);
+SPAN_DECLARE(complexi_t) dds_lookup_complexi(uint32_t phase);
 
 /*! \brief Generate a complex integer tone sample.
     \param phase_acc A pointer to a phase accumulator value.
     \param phase_rate The phase increment to be applied.
     \return The complex signal amplitude, between (-32767, -32767) and (32767, 32767).
 */
-complexi_t dds_complexi(uint32_t *phase_acc, int32_t phase_rate);
+SPAN_DECLARE(complexi_t) dds_complexi(uint32_t *phase_acc, int32_t phase_rate);
 
 /*! \brief Generate a complex integer tone sample, with modulation.
     \param phase_acc A pointer to a phase accumulator value.
@@ -120,21 +120,21 @@
     \param phase The phase offset.
     \return The complex signal amplitude, between (-32767, -32767) and (32767, 32767).
 */
-complexi_t dds_complexi_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase);
+SPAN_DECLARE(complexi_t) dds_complexi_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase);
 
 /*! \brief Generate a complex 16 bit integer tone sample.
     \param phase_acc A pointer to a phase accumulator value.
     \param phase_rate The phase increment to be applied.
     \return The complex signal amplitude, between (-32767, -32767) and (32767, 32767).
 */
-complexi16_t dds_lookup_complexi16(uint32_t phase);
+SPAN_DECLARE(complexi16_t) dds_lookup_complexi16(uint32_t phase);
 
 /*! \brief Generate a complex 16 bit integer tone sample.
     \param phase_acc A pointer to a phase accumulator value.
     \param phase_rate The phase increment to be applied.
     \return The complex signal amplitude, between (-32767, -32767) and (32767, 32767).
 */
-complexi16_t dds_complexi16(uint32_t *phase_acc, int32_t phase_rate);
+SPAN_DECLARE(complexi16_t) dds_complexi16(uint32_t *phase_acc, int32_t phase_rate);
 
 /*! \brief Generate a complex 16bit integer tone sample, with modulation.
     \param phase_acc A pointer to a phase accumulator value.
@@ -143,7 +143,7 @@
     \param phase The phase offset.
     \return The complex signal amplitude, between (-32767, -32767) and (32767, 32767).
 */
-complexi16_t dds_complexi16_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase);
+SPAN_DECLARE(complexi16_t) dds_complexi16_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase);
 
 /*! \brief Generate a complex 32 bit integer tone sample, with modulation.
     \param phase_acc A pointer to a phase accumulator value.
@@ -152,21 +152,21 @@
     \param phase The phase offset.
     \return The complex signal amplitude, between (-32767, -32767) and (32767, 32767).
 */
-complexi32_t dds_complexi32_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase);
+SPAN_DECLARE(complexi32_t) dds_complexi32_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase);
 
 /*! \brief Generate a complex 32 bit integer tone sample.
     \param phase_acc A pointer to a phase accumulator value.
     \param phase_rate The phase increment to be applied.
     \return The complex signal amplitude, between (-32767, -32767) and (32767, 32767).
 */
-complexi32_t dds_lookup_complexi32(uint32_t phase);
+SPAN_DECLARE(complexi32_t) dds_lookup_complexi32(uint32_t phase);
 
 /*! \brief Generate a complex 32 bit integer tone sample.
     \param phase_acc A pointer to a phase accumulator value.
     \param phase_rate The phase increment to be applied.
     \return The complex signal amplitude, between (-32767, -32767) and (32767, 32767).
 */
-complexi32_t dds_complexi32(uint32_t *phase_acc, int32_t phase_rate);
+SPAN_DECLARE(complexi32_t) dds_complexi32(uint32_t *phase_acc, int32_t phase_rate);
 
 /*! \brief Generate a complex 32 bit integer tone sample, with modulation.
     \param phase_acc A pointer to a phase accumulator value.
@@ -175,50 +175,50 @@
     \param phase The phase offset.
     \return The complex signal amplitude, between (-32767, -32767) and (32767, 32767).
 */
-complexi32_t dds_complexi32_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase);
+SPAN_DECLARE(complexi32_t) dds_complexi32_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase);
 
 /*! \brief Find the phase rate equivalent to a frequency, in Hz.
     \param frequency The frequency, in Hz.
     \return The equivalent phase rate.
 */
-int32_t dds_phase_ratef(float frequency);
+SPAN_DECLARE(int32_t) dds_phase_ratef(float frequency);
 
 /*! \brief Find the frequency, in Hz, equivalent to a phase rate.
     \param phase_rate The phase rate.
     \return The equivalent frequency, in Hz.
 */
-float dds_frequencyf(int32_t phase_rate);
+SPAN_DECLARE(float) dds_frequencyf(int32_t phase_rate);
 
 /*! \brief Find the scaling factor equivalent to a dBm0 value.
     \param level The signal level in dBm0.
     \return The equivalent scaling factor.
 */
-float dds_scaling_dbm0f(float level);
+SPAN_DECLARE(float) dds_scaling_dbm0f(float level);
 
 /*! \brief Find the scaling factor equivalent to a dBmov value.
     \param level The signal level in dBmov.
     \return The equivalent scaling factor.
 */
-float dds_scaling_dbovf(float level);
+SPAN_DECLARE(float) dds_scaling_dbovf(float level);
 
 /*! \brief Advance the phase, without returning any new signal sample.
     \param phase_acc A pointer to a phase accumulator value.
     \param phase_rate The phase increment to be applied.
 */
-void dds_advancef(uint32_t *phase_acc, int32_t phase_rate);
+SPAN_DECLARE(void) dds_advancef(uint32_t *phase_acc, int32_t phase_rate);
 
 /*! \brief Generate a floating point tone sample.
     \param phase_acc A pointer to a phase accumulator value.
     \param phase_rate The phase increment to be applied.
     \return The signal amplitude, between -1.0 and 1.0.
 */
-float ddsf(uint32_t *phase_acc, int32_t phase_rate);
+SPAN_DECLARE(float) ddsf(uint32_t *phase_acc, int32_t phase_rate);
 
 /*! \brief Lookup the floating point value of a specified phase.
     \param phase The phase accumulator value to be looked up.
     \return The signal amplitude, between -1.0 and 1.0.
 */
-float dds_lookupf(uint32_t phase);
+SPAN_DECLARE(float) dds_lookupf(uint32_t phase);
 
 /*! \brief Generate a floating point tone sample, with modulation.
     \param phase_acc A pointer to a phase accumulator value.
@@ -227,20 +227,20 @@
     \param phase The phase offset.
     \return The signal amplitude, between -1.0 and 1.0.
 */
-float dds_modf(uint32_t *phase_acc, int32_t phase_rate, float scale, int32_t phase);
+SPAN_DECLARE(float) dds_modf(uint32_t *phase_acc, int32_t phase_rate, float scale, int32_t phase);
 
 /*! \brief Generate a complex floating point tone sample.
     \param phase_acc A pointer to a phase accumulator value.
     \param phase_rate The phase increment to be applied.
     \return The complex signal amplitude, between (-1.0, -1.0) and (1.0, 1.0).
 */
-complexf_t dds_complexf(uint32_t *phase_acc, int32_t phase_rate);
+SPAN_DECLARE(complexf_t) dds_complexf(uint32_t *phase_acc, int32_t phase_rate);
 
 /*! \brief Lookup the complex value of a specified phase.
     \param phase The phase accumulator value to be looked up.
     \return The complex signal amplitude, between (-1.0, -1.0) and (1.0, 1.0).
 */
-complexf_t dds_lookup_complexf(uint32_t phase_acc);
+SPAN_DECLARE(complexf_t) dds_lookup_complexf(uint32_t phase_acc);
 
 /*! \brief Generate a complex floating point tone sample, with modulation.
     \param phase_acc A pointer to a phase accumulator value.
@@ -249,7 +249,7 @@
     \param phase The phase offset.
     \return The complex signal amplitude, between (-1.0, -1.0) and (1.0, 1.0).
 */
-complexf_t dds_complex_modf(uint32_t *phase_acc, int32_t phase_rate, float scale, int32_t phase);
+SPAN_DECLARE(complexf_t) dds_complex_modf(uint32_t *phase_acc, int32_t phase_rate, float scale, int32_t phase);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/dtmf.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/dtmf.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/dtmf.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: dtmf.h,v 1.29 2008/10/13 13:14:00 steveu Exp $
+ * $Id: dtmf.h,v 1.30 2009/01/31 08:48:11 steveu Exp $
  */
 
 #if !defined(_SPANDSP_DTMF_H_)
@@ -99,7 +99,7 @@
     \param max_samples The required number of generated samples.
     \return The number of samples actually generated. This may be less than 
             max_samples if the input buffer empties. */
-int dtmf_tx(dtmf_tx_state_t *s, int16_t amp[], int max_samples);
+SPAN_DECLARE(int) dtmf_tx(dtmf_tx_state_t *s, int16_t amp[], int max_samples);
 
 /*! \brief Put a string of digits in a DTMF generator's input buffer.
     \param s The DTMF generator context.
@@ -108,29 +108,29 @@
            assumed to be a NULL terminated string.
     \return The number of digits actually added. This may be less than the
             length of the digit string, if the buffer fills up. */
-size_t dtmf_tx_put(dtmf_tx_state_t *s, const char *digits, int len);
+SPAN_DECLARE(int) dtmf_tx_put(dtmf_tx_state_t *s, const char *digits, int len);
 
 /*! \brief Change the transmit level for a DTMF tone generator context.
     \param s The DTMF generator context.
     \param level The level of the low tone, in dBm0.
     \param twist The twist, in dB. */
-void dtmf_tx_set_level(dtmf_tx_state_t *s, int level, int twist);
+SPAN_DECLARE(void) dtmf_tx_set_level(dtmf_tx_state_t *s, int level, int twist);
 
 /*! \brief Change the transmit on and off time for a DTMF tone generator context.
     \param s The DTMF generator context.
     \param on-time The on time, in ms.
     \param off_time The off time, in ms. */
-void dtmf_tx_set_timing(dtmf_tx_state_t *s, int on_time, int off_time);
+SPAN_DECLARE(void) dtmf_tx_set_timing(dtmf_tx_state_t *s, int on_time, int off_time);
 
 /*! \brief Initialise a DTMF tone generator context.
     \param s The DTMF generator context.
     \return A pointer to the DTMF generator context. */
-dtmf_tx_state_t *dtmf_tx_init(dtmf_tx_state_t *s);
+SPAN_DECLARE(dtmf_tx_state_t) *dtmf_tx_init(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. */
-int dtmf_tx_free(dtmf_tx_state_t *s);
+SPAN_DECLARE(int) dtmf_tx_free(dtmf_tx_state_t *s);
 
 /*! Set a optional realtime callback for a DTMF receiver context. This function
     is called immediately a confirmed state change occurs in the received DTMF. It
@@ -141,9 +141,9 @@
     \param callback Callback routine used to report the start and end of digits.
     \param user_data An opaque pointer which is associated with the context,
            and supplied in callbacks. */
-void dtmf_rx_set_realtime_callback(dtmf_rx_state_t *s,
-                                   tone_report_func_t callback,
-                                   void *user_data);
+SPAN_DECLARE(void) dtmf_rx_set_realtime_callback(dtmf_rx_state_t *s,
+                                                 tone_report_func_t callback,
+                                                 void *user_data);
 
 /*! \brief Adjust a DTMF receiver context.
     \param s The DTMF receiver context.
@@ -153,11 +153,11 @@
     \param reverse_twist Acceptable reverse twist, in dB. < 0 to leave unchanged.
     \param threshold The minimum acceptable tone level for detection, in dBm0.
            <= -99 to leave unchanged. */
-void dtmf_rx_parms(dtmf_rx_state_t *s,
-                   int filter_dialtone,
-                   int twist,
-                   int reverse_twist,
-                   int threshold);
+SPAN_DECLARE(void) dtmf_rx_parms(dtmf_rx_state_t *s,
+                                 int filter_dialtone,
+                                 int twist,
+                                 int reverse_twist,
+                                 int threshold);
 
 /*! Process a block of received DTMF audio samples.
     \brief Process a block of received DTMF audio samples.
@@ -165,7 +165,7 @@
     \param amp The audio sample buffer.
     \param samples The number of samples in the buffer.
     \return The number of samples unprocessed. */
-int dtmf_rx(dtmf_rx_state_t *s, const int16_t amp[], int samples);
+SPAN_DECLARE(int) dtmf_rx(dtmf_rx_state_t *s, const int16_t amp[], int samples);
 
 /*! Get the status of DTMF detection during processing of the last audio
     chunk.
@@ -174,14 +174,14 @@
     \param s The DTMF receiver context.
     \return The current digit status. Either 'x' for a "maybe" condition, or the
             digit being detected. */
-int dtmf_rx_status(dtmf_rx_state_t *s);
+SPAN_DECLARE(int) dtmf_rx_status(dtmf_rx_state_t *s);
 
 /*! \brief Get a string of digits from a DTMF receiver's output buffer.
     \param s The DTMF receiver context.
     \param digits The buffer for the received digits.
     \param max The maximum  number of digits to be returned,
     \return The number of digits actually returned. */
-size_t dtmf_rx_get(dtmf_rx_state_t *s, char *digits, int max);
+SPAN_DECLARE(size_t) dtmf_rx_get(dtmf_rx_state_t *s, char *digits, int max);
 
 /*! \brief Initialise a DTMF receiver context.
     \param s The DTMF receiver context.
@@ -191,14 +191,14 @@
     \param user_data An opaque pointer which is associated with the context,
            and supplied in callbacks.
     \return A pointer to the DTMF receiver context. */
-dtmf_rx_state_t *dtmf_rx_init(dtmf_rx_state_t *s,
-                              digits_rx_callback_t callback,
-                              void *user_data);
+SPAN_DECLARE(dtmf_rx_state_t) *dtmf_rx_init(dtmf_rx_state_t *s,
+                                            digits_rx_callback_t callback,
+                                            void *user_data);
 
 /*! \brief Free a DTMF receiver context.
     \param s The DTMF receiver context.
     \return 0 for OK, else -1. */
-int dtmf_rx_free(dtmf_rx_state_t *s);
+SPAN_DECLARE(int) dtmf_rx_free(dtmf_rx_state_t *s);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/echo.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/echo.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/echo.h	Mon Feb  2 11:40:52 2009
@@ -24,7 +24,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: echo.h,v 1.16 2008/09/04 14:40:05 steveu Exp $
+ * $Id: echo.h,v 1.17 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -196,23 +196,23 @@
     \param len The length of the canceller, in samples.
     \return The new canceller context, or NULL if the canceller could not be created.
 */
-echo_can_state_t *echo_can_create(int len, int adaption_mode);
+SPAN_DECLARE(echo_can_state_t) *echo_can_create(int len, int adaption_mode);
 
 /*! Free a voice echo canceller context.
     \param ec The echo canceller context.
 */
-void echo_can_free(echo_can_state_t *ec);
+SPAN_DECLARE(void) echo_can_free(echo_can_state_t *ec);
 
 /*! Flush (reinitialise) a voice echo canceller context.
     \param ec The echo canceller context.
 */
-void echo_can_flush(echo_can_state_t *ec);
+SPAN_DECLARE(void) echo_can_flush(echo_can_state_t *ec);
 
 /*! Set the adaption mode of a voice echo canceller context.
     \param ec The echo canceller context.
     \param adaption_mode The mode.
 */
-void echo_can_adaption_mode(echo_can_state_t *ec, int adaption_mode);
+SPAN_DECLARE(void) echo_can_adaption_mode(echo_can_state_t *ec, int adaption_mode);
 
 /*! Process a sample through a voice echo canceller.
     \param ec The echo canceller context.
@@ -220,16 +220,16 @@
     \param rx The received audio sample.
     \return The clean (echo cancelled) received sample.
 */
-int16_t echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t rx);
+SPAN_DECLARE(int16_t) echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t rx);
 
 /*! Process to high pass filter the tx signal.
     \param ec The echo canceller context.
     \param tx The transmitted auio sample.
     \return The HP filtered transmit sample, send this to your D/A.
 */
-int16_t echo_can_hpf_tx(echo_can_state_t *ec, int16_t tx);
+SPAN_DECLARE(int16_t) echo_can_hpf_tx(echo_can_state_t *ec, int16_t tx);
 
-void echo_can_snapshot(echo_can_state_t *ec);
+SPAN_DECLARE(void) echo_can_snapshot(echo_can_state_t *ec);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/fax.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/fax.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/fax.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: fax.h,v 1.36 2008/10/13 13:14:00 steveu Exp $
+ * $Id: fax.h,v 1.37 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -52,7 +52,7 @@
     \return The number of samples unprocessed. This should only be non-zero if
             the software has reached the end of the FAX call.
 */
-int fax_rx(fax_state_t *s, int16_t *amp, int len);
+SPAN_DECLARE(int) fax_rx(fax_state_t *s, int16_t *amp, int len);
 
 /*! Apply T.30 transmit processing to generate a block of audio samples.
     \brief Apply T.30 transmit processing to generate a block of audio samples.
@@ -62,7 +62,7 @@
     \return The number of samples actually generated. This will be zero when
             there is nothing to send.
 */
-int fax_tx(fax_state_t *s, int16_t *amp, int max_len);
+SPAN_DECLARE(int) fax_tx(fax_state_t *s, int16_t *amp, int max_len);
 
 /*! Select whether silent audio will be sent when FAX transmit is idle.
     \brief Select whether silent audio will be sent when FAX transmit is idle.
@@ -71,28 +71,28 @@
            idle. FALSE to transmit zero length audio when the FAX transmitter is idle. The default
            behaviour is FALSE.
 */
-void fax_set_transmit_on_idle(fax_state_t *s, int transmit_on_idle);
+SPAN_DECLARE(void) fax_set_transmit_on_idle(fax_state_t *s, int transmit_on_idle);
 
 /*! Select whether talker echo protection tone will be sent for the image modems.
     \brief Select whether TEP will be sent for the image modems.
     \param s The FAX context.
     \param use_tep TRUE if TEP should be sent.
 */
-void fax_set_tep_mode(fax_state_t *s, int use_tep);
+SPAN_DECLARE(void) fax_set_tep_mode(fax_state_t *s, int use_tep);
 
 /*! Get a pointer to the T.30 engine associated with a FAX context.
     \brief Get a pointer to the T.30 engine associated with a FAX context.
     \param s The FAX context.
     \return A pointer to the T.30 context, or NULL.
 */
-t30_state_t *fax_get_t30_state(fax_state_t *s);
+SPAN_DECLARE(t30_state_t) *fax_get_t30_state(fax_state_t *s);
 
 /*! Get a pointer to the logging context associated with a FAX context.
     \brief Get a pointer to the logging context associated with a FAX context.
     \param s The FAX context.
     \return A pointer to the logging context, or NULL.
 */
-logging_state_t *fax_get_logging_state(fax_state_t *s);
+SPAN_DECLARE(logging_state_t) *fax_get_logging_state(fax_state_t *s);
 
 /*! Initialise a FAX context.
     \brief Initialise a FAX context.
@@ -101,19 +101,19 @@
            context is for an answering party.
     \return A pointer to the FAX context, or NULL if there was a problem.
 */
-fax_state_t *fax_init(fax_state_t *s, int calling_party);
+SPAN_DECLARE(fax_state_t) *fax_init(fax_state_t *s, int calling_party);
 
 /*! Release a FAX context.
     \brief Release a FAX context.
     \param s The FAX context.
     \return 0 for OK, else -1. */
-int fax_release(fax_state_t *s);
+SPAN_DECLARE(int) fax_release(fax_state_t *s);
 
 /*! Free a FAX context.
     \brief Free a FAX context.
     \param s The FAX context.
     \return 0 for OK, else -1. */
-int fax_free(fax_state_t *s);
+SPAN_DECLARE(int) fax_free(fax_state_t *s);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: fax_modems.h,v 1.6 2008/10/13 13:14:00 steveu Exp $
+ * $Id: fax_modems.h,v 1.7 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -41,10 +41,10 @@
 #endif
 
 /* N.B. the following are currently a work in progress */
-int fax_modems_v17_v21_rx(void *user_data, const int16_t amp[], int len);
-int fax_modems_v27ter_v21_rx(void *user_data, const int16_t amp[], int len);
-int fax_modems_v29_v21_rx(void *user_data, const int16_t amp[], int len);
-fax_modems_state_t *fax_modems_init(fax_modems_state_t *s, void *user_data);
+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);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: fsk.h,v 1.33 2009/01/29 18:30:14 steveu Exp $
+ * $Id: fsk.h,v 1.34 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -114,7 +114,7 @@
     FSK_WEITBRECHT      /* Used for TDD (Telecom Device for the Deaf) */
 };
 
-extern const fsk_spec_t preset_fsk_specs[];
+SPAN_DECLARE_DATA extern const fsk_spec_t preset_fsk_specs[];
 
 /*!
     FSK modem transmit descriptor. This defines the state of a single working
@@ -143,25 +143,25 @@
     \param get_bit The callback routine used to get the data to be transmitted.
     \param user_data An opaque pointer.
     \return A pointer to the modem context, or NULL if there was a problem. */
-fsk_tx_state_t *fsk_tx_init(fsk_tx_state_t *s,
-                            const fsk_spec_t *spec,
-                            get_bit_func_t get_bit,
-                            void *user_data);
+SPAN_DECLARE(fsk_tx_state_t) *fsk_tx_init(fsk_tx_state_t *s,
+                                          const fsk_spec_t *spec,
+                                          get_bit_func_t get_bit,
+                                          void *user_data);
 
 /*! Adjust an FSK modem transmit context's power output.
     \brief Adjust an FSK modem transmit context's power output.
     \param s The modem context.
     \param power The power level, in dBm0 */
-void fsk_tx_power(fsk_tx_state_t *s, float power);
+SPAN_DECLARE(void) fsk_tx_power(fsk_tx_state_t *s, float power);
 
-void fsk_tx_set_get_bit(fsk_tx_state_t *s, get_bit_func_t get_bit, void *user_data);
+SPAN_DECLARE(void) fsk_tx_set_get_bit(fsk_tx_state_t *s, get_bit_func_t get_bit, void *user_data);
 
 /*! Change the modem status report function associated with an FSK modem transmit context.
     \brief Change the modem status report function associated with an FSK modem transmit context.
     \param s The modem context.
     \param handler The callback routine used to report modem status changes.
     \param user_data An opaque pointer. */
-void fsk_tx_set_modem_status_handler(fsk_tx_state_t *s, modem_tx_status_func_t handler, void *user_data);
+SPAN_DECLARE(void) fsk_tx_set_modem_status_handler(fsk_tx_state_t *s, modem_tx_status_func_t handler, void *user_data);
 
 /*! Generate a block of FSK modem audio samples.
     \brief Generate a block of FSK modem audio samples.
@@ -170,18 +170,18 @@
     \param len The number of samples to be generated.
     \return The number of samples actually generated.
 */
-int fsk_tx(fsk_tx_state_t *s, int16_t amp[], int len);
+SPAN_DECLARE(int) fsk_tx(fsk_tx_state_t *s, int16_t amp[], int len);
 
 /*! Get the current received signal power.
     \param s The modem context.
     \return The signal power, in dBm0. */
-float fsk_rx_signal_power(fsk_rx_state_t *s);
+SPAN_DECLARE(float) fsk_rx_signal_power(fsk_rx_state_t *s);
 
 /*! Adjust an FSK modem receive context's carrier detect power threshold.
     \brief Adjust an FSK modem receive context's carrier detect power threshold.
     \param s The modem context.
     \param cutoff The power level, in dBm0 */
-void fsk_rx_signal_cutoff(fsk_rx_state_t *s, float cutoff);
+SPAN_DECLARE(void) fsk_rx_signal_cutoff(fsk_rx_state_t *s, float cutoff);
 
 /*! Initialise an FSK modem receive context.
     \brief Initialise an FSK modem receive context.
@@ -191,11 +191,11 @@
     \param put_bit The callback routine used to put the received data.
     \param user_data An opaque pointer.
     \return A pointer to the modem context, or NULL if there was a problem. */
-fsk_rx_state_t *fsk_rx_init(fsk_rx_state_t *s,
-                            const fsk_spec_t *spec,
-                            int sync_mode,
-                            put_bit_func_t put_bit,
-                            void *user_data);
+SPAN_DECLARE(fsk_rx_state_t) *fsk_rx_init(fsk_rx_state_t *s,
+                                          const fsk_spec_t *spec,
+                                          int sync_mode,
+                                          put_bit_func_t put_bit,
+                                          void *user_data);
 
 /*! Process a block of received FSK modem audio samples.
     \brief Process a block of received FSK modem audio samples.
@@ -204,16 +204,16 @@
     \param len The number of samples in the buffer.
     \return The number of samples unprocessed.
 */
-int fsk_rx(fsk_rx_state_t *s, const int16_t *amp, int len);
+SPAN_DECLARE(int) fsk_rx(fsk_rx_state_t *s, const int16_t *amp, int len);
 
-void fsk_rx_set_put_bit(fsk_rx_state_t *s, put_bit_func_t put_bit, void *user_data);
+SPAN_DECLARE(void) fsk_rx_set_put_bit(fsk_rx_state_t *s, put_bit_func_t put_bit, void *user_data);
 
 /*! Change the modem status report function associated with an FSK modem receive context.
     \brief Change the modem status report function associated with an FSK modem receive context.
     \param s The modem context.
     \param handler The callback routine used to report modem status changes.
     \param user_data An opaque pointer. */
-void fsk_rx_set_modem_status_handler(fsk_rx_state_t *s, modem_rx_status_func_t handler, void *user_data);
+SPAN_DECLARE(void) fsk_rx_set_modem_status_handler(fsk_rx_state_t *s, modem_rx_status_func_t handler, void *user_data);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/g711.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/g711.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/g711.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: g711.h,v 1.15 2008/11/30 10:17:31 steveu Exp $
+ * $Id: g711.h,v 1.16 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -251,39 +251,39 @@
     \param alaw The A-law sample to transcode.
     \return The best matching u-law value.
 */
-uint8_t alaw_to_ulaw(uint8_t alaw);
+SPAN_DECLARE(uint8_t) alaw_to_ulaw(uint8_t alaw);
 
 /*! \brief Transcode from u-law to A-law, using the procedure defined in G.711.
     \param ulaw The u-law sample to transcode.
     \return The best matching A-law value.
 */
-uint8_t ulaw_to_alaw(uint8_t ulaw);
+SPAN_DECLARE(uint8_t) ulaw_to_alaw(uint8_t ulaw);
 
-int g711_decode(g711_state_t *s,
-                int16_t amp[],
-                const uint8_t g711_data[],
-                int g711_bytes);
-
-int g711_encode(g711_state_t *s,
-                uint8_t g711_data[],
-                const int16_t amp[],
-                int len);
-
-int g711_transcode(g711_state_t *s,
-                   uint8_t g711_out[],
-                   const uint8_t g711_in[],
-                   int g711_bytes);
+SPAN_DECLARE(int) g711_decode(g711_state_t *s,
+                              int16_t amp[],
+                              const uint8_t g711_data[],
+                              int g711_bytes);
+
+SPAN_DECLARE(int) g711_encode(g711_state_t *s,
+                              uint8_t g711_data[],
+                              const int16_t amp[],
+                              int len);
+
+SPAN_DECLARE(int) g711_transcode(g711_state_t *s,
+                                 uint8_t g711_out[],
+                                 const uint8_t g711_in[],
+                                 int g711_bytes);
 
 /*! Initialise a G.711 encode or decode context.
     \param s The G.711 context.
     \param mode The G.711 mode.
     \return A pointer to the G.711 context, or NULL for error. */
-g711_state_t *g711_init(g711_state_t *s, int mode);
+SPAN_DECLARE(g711_state_t) *g711_init(g711_state_t *s, int mode);
 
 /*! Free a G.711 encode or decode context.
     \param s The G.711 context.
     \return 0 for OK. */
-int g711_release(g711_state_t *s);
+SPAN_DECLARE(int) g711_release(g711_state_t *s);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/g722.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/g722.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/g722.h	Mon Feb  2 11:40:52 2009
@@ -28,7 +28,7 @@
  * Computer Science, Speech Group
  * Chengxiang Lu and Alex Hauptmann
  *
- * $Id: g722.h,v 1.22 2008/10/13 13:14:00 steveu Exp $
+ * $Id: g722.h,v 1.23 2009/01/31 08:48:11 steveu Exp $
  */
 
 
@@ -71,9 +71,9 @@
            The valid rates are 64000, 56000 and 48000.
     \param options
     \return A pointer to the G.722 encode context, or NULL for error. */
-g722_encode_state_t *g722_encode_init(g722_encode_state_t *s, int rate, int options);
+SPAN_DECLARE(g722_encode_state_t) *g722_encode_init(g722_encode_state_t *s, int rate, int options);
 
-int g722_encode_release(g722_encode_state_t *s);
+SPAN_DECLARE(int) g722_encode_release(g722_encode_state_t *s);
 
 /*! Encode a buffer of linear PCM data to G.722
     \param s The G.722 context.
@@ -81,7 +81,7 @@
     \param amp The audio sample buffer.
     \param len The number of samples in the buffer.
     \return The number of bytes of G.722 data produced. */
-int g722_encode(g722_encode_state_t *s, uint8_t g722_data[], const int16_t amp[], int len);
+SPAN_DECLARE(int) g722_encode(g722_encode_state_t *s, uint8_t g722_data[], const int16_t amp[], int len);
 
 /*! Initialise an G.722 decode context.
     \param s The G.722 decode context.
@@ -89,9 +89,9 @@
            The valid rates are 64000, 56000 and 48000.
     \param options
     \return A pointer to the G.722 decode context, or NULL for error. */
-g722_decode_state_t *g722_decode_init(g722_decode_state_t *s, int rate, int options);
+SPAN_DECLARE(g722_decode_state_t) *g722_decode_init(g722_decode_state_t *s, int rate, int options);
 
-int g722_decode_release(g722_decode_state_t *s);
+SPAN_DECLARE(int) g722_decode_release(g722_decode_state_t *s);
 
 /*! Decode a buffer of G.722 data to linear PCM.
     \param s The G.722 context.
@@ -99,7 +99,7 @@
     \param g722_data
     \param len
     \return The number of samples returned. */
-int g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[], int len);
+SPAN_DECLARE(int) g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[], int len);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/g726.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/g726.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/g726.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: g726.h,v 1.22 2008/10/13 13:14:00 steveu Exp $
+ * $Id: g726.h,v 1.23 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -77,12 +77,12 @@
     \param ext_coding The coding used outside G.726.
     \param packing One of the G.726_PACKING_xxx options.
     \return A pointer to the G.726 context, or NULL for error. */
-g726_state_t *g726_init(g726_state_t *s, int bit_rate, int ext_coding, int packing);
+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.
     \param s The G.726 context.
     \return 0 for OK. */
-int g726_release(g726_state_t *s);
+SPAN_DECLARE(int) g726_release(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.
@@ -90,10 +90,10 @@
     \param g726_data
     \param g726_bytes
     \return The number of samples returned. */
-int g726_decode(g726_state_t *s,
-                int16_t amp[],
-                const uint8_t g726_data[],
-                int g726_bytes);
+SPAN_DECLARE(int) g726_decode(g726_state_t *s,
+                              int16_t amp[],
+                              const uint8_t g726_data[],
+                              int g726_bytes);
 
 /*! Encode a buffer of linear PCM data to G.726 ADPCM.
     \param s The G.726 context.
@@ -101,10 +101,10 @@
     \param amp The audio sample buffer.
     \param len The number of samples in the buffer.
     \return The number of bytes of G.726 data produced. */
-int g726_encode(g726_state_t *s,
-                uint8_t g726_data[],
-                const int16_t amp[],
-                int len);
+SPAN_DECLARE(int) g726_encode(g726_state_t *s,
+                              uint8_t g726_data[],
+                              const int16_t amp[],
+                              int len);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/gsm0610.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/gsm0610.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/gsm0610.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: gsm0610.h,v 1.18 2008/11/15 14:17:46 steveu Exp $
+ * $Id: gsm0610.h,v 1.19 2009/01/31 08:48:11 steveu Exp $
  */
 
 #if !defined(_SPANDSP_GSM0610_H_)
@@ -83,18 +83,18 @@
     \param s The GSM 06.10 context
     \param packing One of the GSM0610_PACKING_xxx options.
     \return A pointer to the GSM 06.10 context, or NULL for error. */
-gsm0610_state_t *gsm0610_init(gsm0610_state_t *s, int packing);
+SPAN_DECLARE(gsm0610_state_t) *gsm0610_init(gsm0610_state_t *s, int packing);
 
 /*! Release a GSM 06.10 encode or decode context.
     \param s The GSM 06.10 context
     \return 0 for success, else -1. */
-int gsm0610_release(gsm0610_state_t *s);
+SPAN_DECLARE(int) gsm0610_release(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.
     \return 0 for success, else -1. */
-int gsm0610_set_packing(gsm0610_state_t *s, int packing);
+SPAN_DECLARE(int) gsm0610_set_packing(gsm0610_state_t *s, int packing);
 
 /*! Encode a buffer of linear PCM data to GSM 06.10.
     \param s The GSM 06.10 context.
@@ -102,7 +102,7 @@
     \param amp The audio sample buffer.
     \param len The number of samples in the buffer.
     \return The number of bytes of GSM 06.10 data produced. */
-int gsm0610_encode(gsm0610_state_t *s, uint8_t code[], const int16_t amp[], int len);
+SPAN_DECLARE(int) gsm0610_encode(gsm0610_state_t *s, uint8_t code[], const int16_t amp[], int len);
 
 /*! Decode a buffer of GSM 06.10 data to linear PCM.
     \param s The GSM 06.10 context.
@@ -110,35 +110,35 @@
     \param code The GSM 06.10 data.
     \param len The number of bytes of GSM 06.10 data to be decoded.
     \return The number of samples returned. */
-int gsm0610_decode(gsm0610_state_t *s, int16_t amp[], const uint8_t code[], int len);
+SPAN_DECLARE(int) gsm0610_decode(gsm0610_state_t *s, int16_t amp[], const uint8_t code[], int len);
 
-int gsm0610_pack_none(uint8_t c[], const gsm0610_frame_t *s);
+SPAN_DECLARE(int) gsm0610_pack_none(uint8_t c[], const gsm0610_frame_t *s);
 
 /*! Pack a pair of GSM 06.10 frames in the format used for wave files (wave type 49).
     \param c The buffer for the packed data. This must be at least 65 bytes long.
     \param s A pointer to the frames to be packed.
     \return The number of bytes generated. */
-int gsm0610_pack_wav49(uint8_t c[], const gsm0610_frame_t *s);
+SPAN_DECLARE(int) gsm0610_pack_wav49(uint8_t c[], const gsm0610_frame_t *s);
 
 /*! Pack a GSM 06.10 frames in the format used for VoIP.
     \param c The buffer for the packed data. This must be at least 33 bytes long.
     \param s A pointer to the frame to be packed.
     \return The number of bytes generated. */
-int gsm0610_pack_voip(uint8_t c[], const gsm0610_frame_t *s);
+SPAN_DECLARE(int) gsm0610_pack_voip(uint8_t c[], const gsm0610_frame_t *s);
 
-int gsm0610_unpack_none(gsm0610_frame_t *s, const uint8_t c[]);
+SPAN_DECLARE(int) gsm0610_unpack_none(gsm0610_frame_t *s, const uint8_t c[]);
 
 /*! Unpack a pair of GSM 06.10 frames from the format used for wave files (wave type 49).
     \param s A pointer to a buffer into which the frames will be packed.
     \param c The buffer containing the data to be unpacked. This must be at least 65 bytes long.
     \return The number of bytes absorbed. */
-int gsm0610_unpack_wav49(gsm0610_frame_t *s, const uint8_t c[]);
+SPAN_DECLARE(int) gsm0610_unpack_wav49(gsm0610_frame_t *s, const uint8_t c[]);
 
 /*! Unpack a GSM 06.10 frame from the format used for VoIP.
     \param s A pointer to a buffer into which the frame will be packed.
     \param c The buffer containing the data to be unpacked. This must be at least 33 bytes long.
     \return The number of bytes absorbed. */
-int gsm0610_unpack_voip(gsm0610_frame_t *s, const uint8_t c[]);
+SPAN_DECLARE(int) gsm0610_unpack_voip(gsm0610_frame_t *s, const uint8_t c[]);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/hdlc.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/hdlc.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/hdlc.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: hdlc.h,v 1.40 2008/11/30 05:43:37 steveu Exp $
+ * $Id: hdlc.h,v 1.41 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -94,51 +94,52 @@
     \param user_data An opaque parameter for the callback routine.
     \return A pointer to the HDLC receiver context.
 */
-hdlc_rx_state_t *hdlc_rx_init(hdlc_rx_state_t *s,
-                              int crc32,
-                              int report_bad_frames,
-                              int framing_ok_threshold,
-                              hdlc_frame_handler_t handler,
-                              void *user_data);
+SPAN_DECLARE(hdlc_rx_state_t) *hdlc_rx_init(hdlc_rx_state_t *s,
+                                            int crc32,
+                                            int report_bad_frames,
+                                            int framing_ok_threshold,
+                                            hdlc_frame_handler_t handler,
+                                            void *user_data);
 
 /*! \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.
 */
-void hdlc_rx_set_max_frame_len(hdlc_rx_state_t *s, size_t max_len);
+SPAN_DECLARE(void) hdlc_rx_set_max_frame_len(hdlc_rx_state_t *s, size_t max_len);
 
 /*! \brief Set the octet counting report interval.
     \param s A pointer to an HDLC receiver context.
     \param interval The interval, in octets.
 */
-void hdlc_rx_set_octet_counting_report_interval(hdlc_rx_state_t *s, int interval);
+SPAN_DECLARE(void) hdlc_rx_set_octet_counting_report_interval(hdlc_rx_state_t *s,
+                                                              int interval);
 
 /*! \brief Get the current receive statistics.
     \param s A pointer to an HDLC receiver context.
     \param t A pointer to the buffer for the statistics.
     \return 0 for OK, else -1.
 */
-int hdlc_rx_get_stats(hdlc_rx_state_t *s,
-                      hdlc_rx_stats_t *t);
+SPAN_DECLARE(int) hdlc_rx_get_stats(hdlc_rx_state_t *s,
+                                    hdlc_rx_stats_t *t);
 
 /*! \brief Put a single bit of data to an HDLC receiver.
     \param s A pointer to an HDLC receiver context.
     \param new_bit The bit.
 */
-void hdlc_rx_put_bit(hdlc_rx_state_t *s, int new_bit);
+SPAN_DECLARE(void) hdlc_rx_put_bit(hdlc_rx_state_t *s, int new_bit);
 
 /*! \brief Put a byte of data to an HDLC receiver.
     \param s A pointer to an HDLC receiver context.
     \param new_byte The byte of data.
 */
-void hdlc_rx_put_byte(hdlc_rx_state_t *s, int new_byte);
+SPAN_DECLARE(void) hdlc_rx_put_byte(hdlc_rx_state_t *s, int new_byte);
 
 /*! \brief Put a series of bytes of data to an HDLC receiver.
     \param s A pointer to an HDLC receiver context.
     \param buf The buffer of data.
     \param len The length of the data in the buffer.
 */
-void hdlc_rx_put(hdlc_rx_state_t *s, const uint8_t buf[], int len);
+SPAN_DECLARE(void) hdlc_rx_put(hdlc_rx_state_t *s, const uint8_t buf[], int len);
 
 /*! \brief Initialise an HDLC transmitter context.
     \param s A pointer to an HDLC transmitter context.
@@ -149,18 +150,18 @@
     \param user_data An opaque parameter for the callback routine.
     \return A pointer to the HDLC transmitter context.
 */
-hdlc_tx_state_t *hdlc_tx_init(hdlc_tx_state_t *s,
-                              int crc32,
-                              int inter_frame_flags,
-                              int progressive,
-                              hdlc_underflow_handler_t handler,
-                              void *user_data);
+SPAN_DECLARE(hdlc_tx_state_t) *hdlc_tx_init(hdlc_tx_state_t *s,
+                                            int crc32,
+                                            int inter_frame_flags,
+                                            int progressive,
+                                            hdlc_underflow_handler_t handler,
+                                            void *user_data);
 
 /*! \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.
 */
-void hdlc_tx_set_max_frame_len(hdlc_tx_state_t *s, size_t max_len);
+SPAN_DECLARE(void) hdlc_tx_set_max_frame_len(hdlc_tx_state_t *s, size_t max_len);
 
 /*! \brief Transmit a frame.
     \param s A pointer to an HDLC transmitter context.
@@ -168,13 +169,13 @@
     \param len The length of the frame to be transmitted.
     \return 0 if the frame was accepted for transmission, else -1.
 */
-int hdlc_tx_frame(hdlc_tx_state_t *s, const uint8_t *frame, size_t len);
+SPAN_DECLARE(int) hdlc_tx_frame(hdlc_tx_state_t *s, const uint8_t *frame, size_t len);
 
 /*! \brief Corrupt the frame currently being transmitted, by giving it the wrong CRC.
     \param s A pointer to an HDLC transmitter context.
     \return 0 if the frame was corrupted, else -1.
 */
-int hdlc_tx_corrupt_frame(hdlc_tx_state_t *s);
+SPAN_DECLARE(int) hdlc_tx_corrupt_frame(hdlc_tx_state_t *s);
 
 /*! \brief Transmit a specified quantity of flag octets, typically as a preamble.
     \param s A pointer to an HDLC transmitter context.
@@ -183,25 +184,25 @@
            drained.
     \return 0 if the flags were accepted for transmission, else -1.
 */
-int hdlc_tx_flags(hdlc_tx_state_t *s, int len);
+SPAN_DECLARE(int) hdlc_tx_flags(hdlc_tx_state_t *s, int len);
 
 /*! \brief Send an abort.
     \param s A pointer to an HDLC transmitter context.
     \return 0 if the frame was aborted, else -1.
 */
-int hdlc_tx_abort(hdlc_tx_state_t *s);
+SPAN_DECLARE(int) hdlc_tx_abort(hdlc_tx_state_t *s);
 
 /*! \brief Get the next bit for transmission.
     \param s A pointer to an HDLC transmitter context.
     \return The next bit for transmission.
 */
-int hdlc_tx_get_bit(hdlc_tx_state_t *s);
+SPAN_DECLARE(int) hdlc_tx_get_bit(hdlc_tx_state_t *s);
 
 /*! \brief Get the next byte for transmission.
     \param s A pointer to an HDLC transmitter context.
     \return The next byte for transmission.
 */
-int hdlc_tx_get_byte(hdlc_tx_state_t *s);
+SPAN_DECLARE(int) hdlc_tx_get_byte(hdlc_tx_state_t *s);
 
 /*! \brief Get the next sequence of bytes for transmission.
     \param s A pointer to an HDLC transmitter context.
@@ -209,7 +210,7 @@
     \param max_len The number of bytes to get.
     \return The number of bytes actually got.
 */
-int hdlc_tx_get(hdlc_tx_state_t *s, uint8_t buf[], size_t max_len);
+SPAN_DECLARE(int) hdlc_tx_get(hdlc_tx_state_t *s, uint8_t buf[], size_t max_len);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/ima_adpcm.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/ima_adpcm.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/ima_adpcm.h	Mon Feb  2 11:40:52 2009
@@ -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.21 2008/11/30 10:17:31 steveu Exp $
+ * $Id: ima_adpcm.h,v 1.22 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -73,12 +73,14 @@
            zero sample samples means treat each encode or decode operation
            as a chunk.
     \return A pointer to the IMA ADPCM context, or NULL for error. */
-ima_adpcm_state_t *ima_adpcm_init(ima_adpcm_state_t *s, int variant, int chunk_size);
+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.
     \param s The IMA ADPCM context.
     \return 0 for OK. */
-int ima_adpcm_release(ima_adpcm_state_t *s);
+SPAN_DECLARE(int) ima_adpcm_release(ima_adpcm_state_t *s);
 
 /*! Encode a buffer of linear PCM data to IMA ADPCM.
     \param s The IMA ADPCM context.
@@ -86,10 +88,10 @@
     \param amp The audio sample buffer.
     \param len The number of samples in the buffer.
     \return The number of bytes of IMA ADPCM data produced. */
-int ima_adpcm_encode(ima_adpcm_state_t *s,
-                     uint8_t ima_data[],
-                     const int16_t amp[],
-                     int len);
+SPAN_DECLARE(int) ima_adpcm_encode(ima_adpcm_state_t *s,
+                                   uint8_t ima_data[],
+                                   const int16_t amp[],
+                                   int len);
 
 /*! Decode a buffer of IMA ADPCM data to linear PCM.
     \param s The IMA ADPCM context.
@@ -97,10 +99,10 @@
     \param ima_data
     \param ima_bytes
     \return The number of samples returned. */
-int ima_adpcm_decode(ima_adpcm_state_t *s,
-                     int16_t amp[],
-                     const uint8_t ima_data[],
-                     int ima_bytes);
+SPAN_DECLARE(int) ima_adpcm_decode(ima_adpcm_state_t *s,
+                                   int16_t amp[],
+                                   const uint8_t ima_data[],
+                                   int ima_bytes);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/logging.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/logging.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/logging.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: logging.h,v 1.17 2008/11/30 13:44:35 steveu Exp $
+ * $Id: logging.h,v 1.18 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -87,7 +87,7 @@
     \param level The severity level to be tested.
     \return TRUE if logging is enable, else FALSE.
 */
-int span_log_test(logging_state_t *s, int level);
+SPAN_DECLARE(int) span_log_test(logging_state_t *s, int level);
 
 /*! Generate a log entry.
     \brief Generate a log entry.
@@ -96,7 +96,7 @@
     \param format ???
     \return 0 if no output generated, else 1.
 */
-int span_log(logging_state_t *s, int level, const char *format, ...);
+SPAN_DECLARE(int) span_log(logging_state_t *s, int level, const char *format, ...);
 
 /*! Generate a log entry displaying the contents of a buffer.
     \brief Generate a log entry displaying the contents of a buffer
@@ -107,27 +107,27 @@
     \param len The length of buf.
     \return 0 if no output generated, else 1.
 */
-int span_log_buf(logging_state_t *s, int level, const char *tag, const uint8_t *buf, int len);
+SPAN_DECLARE(int) span_log_buf(logging_state_t *s, int level, const char *tag, const uint8_t *buf, int len);
 
-int span_log_init(logging_state_t *s, int level, const char *tag);
+SPAN_DECLARE(int) span_log_init(logging_state_t *s, int level, const char *tag);
 
-int span_log_set_level(logging_state_t *s, int level);
+SPAN_DECLARE(int) span_log_set_level(logging_state_t *s, int level);
 
-int span_log_set_tag(logging_state_t *s, const char *tag);
+SPAN_DECLARE(int) span_log_set_tag(logging_state_t *s, const char *tag);
 
-int span_log_set_protocol(logging_state_t *s, const char *protocol);
+SPAN_DECLARE(int) span_log_set_protocol(logging_state_t *s, const char *protocol);
 
-int span_log_set_sample_rate(logging_state_t *s, int samples_per_second);
+SPAN_DECLARE(int) span_log_set_sample_rate(logging_state_t *s, int samples_per_second);
 
-int span_log_bump_samples(logging_state_t *s, int samples);
+SPAN_DECLARE(int) span_log_bump_samples(logging_state_t *s, int samples);
 
-void span_log_set_message_handler(logging_state_t *s, message_handler_func_t func);
+SPAN_DECLARE(void) span_log_set_message_handler(logging_state_t *s, message_handler_func_t func);
 
-void span_log_set_error_handler(logging_state_t *s, error_handler_func_t func);
+SPAN_DECLARE(void) span_log_set_error_handler(logging_state_t *s, error_handler_func_t func);
 
-void span_set_message_handler(message_handler_func_t func);
+SPAN_DECLARE(void) span_set_message_handler(message_handler_func_t func);
 
-void span_set_error_handler(error_handler_func_t func);
+SPAN_DECLARE(void) span_set_error_handler(error_handler_func_t func);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/lpc10.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/lpc10.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/lpc10.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: lpc10.h,v 1.18 2008/11/30 05:43:37 steveu Exp $
+ * $Id: lpc10.h,v 1.19 2009/01/31 08:48:11 steveu Exp $
  */
 
 #if !defined(_SPANDSP_LPC10_H_)
@@ -74,9 +74,9 @@
     \param s The LPC10e context
     \param error_correction ???
     \return A pointer to the LPC10e context, or NULL for error. */
-lpc10_encode_state_t *lpc10_encode_init(lpc10_encode_state_t *s, int error_correction);
+SPAN_DECLARE(lpc10_encode_state_t) *lpc10_encode_init(lpc10_encode_state_t *s, int error_correction);
 
-int lpc10_encode_release(lpc10_encode_state_t *s);
+SPAN_DECLARE(int) lpc10_encode_release(lpc10_encode_state_t *s);
 
 /*! Encode a buffer of linear PCM data to LPC10e.
     \param s The LPC10e context.
@@ -85,15 +85,15 @@
     \param len The number of samples in the buffer. This must be a multiple of 180, as
            this is the number of samples on a frame.
     \return The number of bytes of LPC10e data produced. */
-int lpc10_encode(lpc10_encode_state_t *s, uint8_t code[], const int16_t amp[], int len);
+SPAN_DECLARE(int) lpc10_encode(lpc10_encode_state_t *s, uint8_t code[], const int16_t amp[], int len);
 
 /*! Initialise an LPC10e decode context.
     \param s The LPC10e context
     \param error_correction ???
     \return A pointer to the LPC10e context, or NULL for error. */
-lpc10_decode_state_t *lpc10_decode_init(lpc10_decode_state_t *st, int error_correction);
+SPAN_DECLARE(lpc10_decode_state_t) *lpc10_decode_init(lpc10_decode_state_t *st, int error_correction);
 
-int lpc10_decode_release(lpc10_decode_state_t *s);
+SPAN_DECLARE(int) lpc10_decode_release(lpc10_decode_state_t *s);
 
 /*! Decode a buffer of LPC10e data to linear PCM.
     \param s The LPC10e context.
@@ -102,7 +102,7 @@
     \param len The number of bytes of LPC10e data to be decoded. This must be a multiple of 7,
            as each frame is packed into 7 bytes.
     \return The number of samples returned. */
-int lpc10_decode(lpc10_decode_state_t *s, int16_t amp[], const uint8_t code[], int len);
+SPAN_DECLARE(int) lpc10_decode(lpc10_decode_state_t *s, int16_t amp[], const uint8_t code[], int len);
 
 
 #if defined(__cplusplus)

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/modem_connect_tones.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/modem_connect_tones.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/modem_connect_tones.h	Mon Feb  2 11:40:52 2009
@@ -24,7 +24,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: modem_connect_tones.h,v 1.19 2008/10/13 13:14:00 steveu Exp $
+ * $Id: modem_connect_tones.h,v 1.20 2009/01/31 08:48:11 steveu Exp $
  */
  
 /*! \file */
@@ -104,14 +104,14 @@
 /*! \brief Initialise an instance of the modem connect tones generator.
     \param s The context.
 */
-modem_connect_tones_tx_state_t *modem_connect_tones_tx_init(modem_connect_tones_tx_state_t *s,
-                                                            int tone_type);
+SPAN_DECLARE(modem_connect_tones_tx_state_t) *modem_connect_tones_tx_init(modem_connect_tones_tx_state_t *s,
+                                                                          int tone_type);
 
 /*! \brief Free an instance of the modem connect tones generator.
     \param s The context.
     \return 0 for OK, else -1.
 */
-int modem_connect_tones_tx_free(modem_connect_tones_tx_state_t *s);
+SPAN_DECLARE(int) modem_connect_tones_tx_free(modem_connect_tones_tx_state_t *s);
 
 /*! \brief Generate a block of modem connect tones samples.
     \param s The context.
@@ -119,9 +119,9 @@
     \param len The number of samples to generate.
     \return The number of samples generated.
 */
-int modem_connect_tones_tx(modem_connect_tones_tx_state_t *s,
-                           int16_t amp[],
-                           int len);
+SPAN_DECLARE(int) modem_connect_tones_tx(modem_connect_tones_tx_state_t *s,
+                                         int16_t amp[],
+                                         int len);
 
 /*! \brief Process a block of samples through an instance of the modem connect
            tones detector.
@@ -130,15 +130,15 @@
     \param len The number of samples in the array.
     \return The number of unprocessed samples.
 */
-int modem_connect_tones_rx(modem_connect_tones_rx_state_t *s,
-                           const int16_t amp[],
-                           int len);
+SPAN_DECLARE(int) modem_connect_tones_rx(modem_connect_tones_rx_state_t *s,
+                                         const int16_t amp[],
+                                         int len);
                              
 /*! \brief Test if a modem_connect tone has been detected.
     \param s The context.
     \return TRUE if tone is detected, else FALSE.
 */
-int modem_connect_tones_rx_get(modem_connect_tones_rx_state_t *s);
+SPAN_DECLARE(int) modem_connect_tones_rx_get(modem_connect_tones_rx_state_t *s);
 
 /*! \brief Initialise an instance of the modem connect tones detector.
     \param s The context.
@@ -147,17 +147,17 @@
     \param user_data An opaque pointer passed to the callback routine,
     \return A pointer to the context.
 */
-modem_connect_tones_rx_state_t *modem_connect_tones_rx_init(modem_connect_tones_rx_state_t *s,
-                                                            int tone_type,
-                                                            tone_report_func_t tone_callback,
-                                                            void *user_data);
+SPAN_DECLARE(modem_connect_tones_rx_state_t) *modem_connect_tones_rx_init(modem_connect_tones_rx_state_t *s,
+                                                                          int tone_type,
+                                                                          tone_report_func_t tone_callback,
+                                                                          void *user_data);
 
 /*! \brief Free an instance of the modem connect tones detector.
     \param s The context.
     \return 0 for OK, else -1. */
-int modem_connect_tones_rx_free(modem_connect_tones_rx_state_t *s);
+SPAN_DECLARE(int) modem_connect_tones_rx_free(modem_connect_tones_rx_state_t *s);
 
-const char *modem_connect_tone_to_str(int tone);
+SPAN_DECLARE(const char) *modem_connect_tone_to_str(int tone);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/modem_echo.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/modem_echo.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/modem_echo.h	Mon Feb  2 11:40:52 2009
@@ -25,7 +25,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: modem_echo.h,v 1.11 2008/04/17 14:27:00 steveu Exp $
+ * $Id: modem_echo.h,v 1.12 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -110,23 +110,23 @@
     \param len The length of the canceller, in samples.
     eturn The new canceller context, or NULL if the canceller could not be created.
 */
-modem_echo_can_state_t *modem_echo_can_create(int len);
+SPAN_DECLARE(modem_echo_can_state_t) *modem_echo_can_create(int len);
 
 /*! Free a modem echo canceller context.
     \param ec The echo canceller context.
 */
-void modem_echo_can_free(modem_echo_can_state_t *ec);
+SPAN_DECLARE(void) modem_echo_can_free(modem_echo_can_state_t *ec);
 
 /*! Flush (reinitialise) a modem echo canceller context.
     \param ec The echo canceller context.
 */
-void modem_echo_can_flush(modem_echo_can_state_t *ec);
+SPAN_DECLARE(void) modem_echo_can_flush(modem_echo_can_state_t *ec);
 
 /*! Set the adaption mode of a modem echo canceller context.
     \param ec The echo canceller context.
     \param adapt The mode.
 */
-void modem_echo_can_adaption_mode(modem_echo_can_state_t *ec, int adapt);
+SPAN_DECLARE(void) modem_echo_can_adaption_mode(modem_echo_can_state_t *ec, int adapt);
 
 /*! Process a sample through a modem echo canceller.
     \param ec The echo canceller context.
@@ -134,7 +134,7 @@
     \param rx The received audio sample.
     eturn The clean (echo cancelled) received sample.
 */
-int16_t modem_echo_can_update(modem_echo_can_state_t *ec, int16_t tx, int16_t rx);
+SPAN_DECLARE(int16_t) modem_echo_can_update(modem_echo_can_state_t *ec, int16_t tx, int16_t rx);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/noise.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/noise.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/noise.h	Mon Feb  2 11:40:52 2009
@@ -23,7 +23,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: noise.h,v 1.14 2008/11/30 12:38:27 steveu Exp $
+ * $Id: noise.h,v 1.15 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -108,16 +108,18 @@
            generation to be adjusted.
     \return A pointer to the noise generator context.
 */
-noise_state_t *noise_init_dbm0(noise_state_t *s, int seed, float level, int class_of_noise, int quality);
+SPAN_DECLARE(noise_state_t) *noise_init_dbm0(noise_state_t *s, int seed, float level, int class_of_noise, int quality);
 
-noise_state_t *noise_init_dbov(noise_state_t *s, int seed, float level, int class_of_noise, int quality);
+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_free(noise_state_t *s);
 
 /*! Generate a sample of audio noise.
     \brief Generate a sample of audio noise.
     \param s The noise generator context.
     \return The generated sample.
 */
-int16_t noise(noise_state_t *s);
+SPAN_DECLARE(int16_t) noise(noise_state_t *s);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/oki_adpcm.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/oki_adpcm.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/oki_adpcm.h	Mon Feb  2 11:40:52 2009
@@ -23,7 +23,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: oki_adpcm.h,v 1.21 2008/11/30 10:17:31 steveu Exp $
+ * $Id: oki_adpcm.h,v 1.22 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -61,12 +61,13 @@
     \param bit_rate The required bit rate for the ADPCM data.
            The valid rates are 24000 and 32000.
     \return A pointer to the Oki ADPCM context, or NULL for error. */
-oki_adpcm_state_t *oki_adpcm_init(oki_adpcm_state_t *s, int bit_rate);
+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.
     \param s The Oki ADPCM context.
     \return 0 for OK. */
-int oki_adpcm_release(oki_adpcm_state_t *s);
+SPAN_DECLARE(int) oki_adpcm_release(oki_adpcm_state_t *s);
 
 /*! Decode a buffer of Oki ADPCM data to linear PCM.
     \param s The Oki ADPCM context.
@@ -74,10 +75,10 @@
     \param oki_data
     \param oki_bytes
     \return The number of samples returned. */
-int oki_adpcm_decode(oki_adpcm_state_t *s,
-                     int16_t amp[],
-                     const uint8_t oki_data[],
-                     int oki_bytes);
+SPAN_DECLARE(int) oki_adpcm_decode(oki_adpcm_state_t *s,
+                                   int16_t amp[],
+                                   const uint8_t oki_data[],
+                                   int oki_bytes);
 
 /*! Encode a buffer of linear PCM data to Oki ADPCM.
     \param s The Oki ADPCM context.
@@ -85,10 +86,10 @@
     \param amp The audio sample buffer.
     \param len The number of samples in the buffer.
     \return The number of bytes of Oki ADPCM data produced. */
-int oki_adpcm_encode(oki_adpcm_state_t *s,
-                     uint8_t oki_data[],
-                     const int16_t amp[],
-                     int len);
+SPAN_DECLARE(int) oki_adpcm_encode(oki_adpcm_state_t *s,
+                                   uint8_t oki_data[],
+                                   const int16_t amp[],
+                                   int len);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/playout.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/playout.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/playout.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: playout.h,v 1.11 2008/04/17 14:27:00 steveu Exp $
+ * $Id: playout.h,v 1.12 2009/01/31 08:48:11 steveu Exp $
  */
 
 #if !defined(_SPANDSP_PLAYOUT_H_)
@@ -147,7 +147,7 @@
     \return One of
         PLAYOUT_OK:  Frame queued OK.
         PLAYOUT_ERROR: Some problem occured - e.g. out of memory. */
-int playout_put(playout_state_t *s, void *data, int type, timestamp_t sender_len, timestamp_t sender_stamp, timestamp_t receiver_stamp);
+SPAN_DECLARE(int) playout_put(playout_state_t *s, void *data, int type, timestamp_t sender_len, timestamp_t sender_stamp, timestamp_t receiver_stamp);
 
 /*! Get the next frame.
     \param s The play-out context.
@@ -162,36 +162,36 @@
                         this time (either we need to grow, or there was a lost frame).
         PLAYOUT_EMPTY: The buffer is empty.
  */
-int	playout_get(playout_state_t *s, playout_frame_t *frame, timestamp_t sender_stamp);
+SPAN_DECLARE(int) playout_get(playout_state_t *s, playout_frame_t *frame, timestamp_t sender_stamp);
 
 /*! Unconditionally get the first buffered frame. This may be used to clear out the queue, and free
     all its contents, before the context is freed.
     \param s The play-out context.
     \return The frame, or NULL is the queue is empty. */
-playout_frame_t *playout_get_unconditional(playout_state_t *s);
+SPAN_DECLARE(playout_frame_t) *playout_get_unconditional(playout_state_t *s);
 
 /*! Find the current length of the buffer.
     \param s The play-out context.
     \return The length of the buffer. */
-timestamp_t playout_current_length(playout_state_t *s);
+SPAN_DECLARE(timestamp_t) playout_current_length(playout_state_t *s);
 
 /*! Find the time at which the next queued frame is due to play.
     Note: This value may change backwards as freshly received out of order frames are
           added to the buffer.
     \param s The play-out context.
     \return The next timestamp. */
-timestamp_t playout_next_due(playout_state_t *s);
+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 */
-playout_state_t *playout_new(int min_length, int max_length);
+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 */
-void playout_free(playout_state_t *s);
+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
@@ -200,7 +200,7 @@
     \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. */
-void playout_restart(playout_state_t *s, int min_length, int max_length);
+SPAN_DECLARE(void) playout_restart(playout_state_t *s, int min_length, int max_length);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/plc.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/plc.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/plc.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: plc.h,v 1.18 2008/04/17 14:27:00 steveu Exp $
+ * $Id: plc.h,v 1.19 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -139,7 +139,7 @@
     \param amp The audio sample buffer.
     \param len The number of samples in the buffer.
     \return The number of samples in the buffer. */
-int plc_rx(plc_state_t *s, int16_t amp[], int len);
+SPAN_DECLARE(int) plc_rx(plc_state_t *s, int16_t amp[], int len);
 
 /*! Fill-in a block of missing audio samples.
     \brief Fill-in a block of missing audio samples.
@@ -147,18 +147,18 @@
     \param amp The audio sample buffer.
     \param len The number of samples to be synthesised.
     \return The number of samples synthesized. */
-int plc_fillin(plc_state_t *s, int16_t amp[], int len);
+SPAN_DECLARE(int) plc_fillin(plc_state_t *s, int16_t amp[], int len);
 
 /*! Initialise a packet loss concealer context.
     \brief Initialise a PLC context.
     \param s The packet loss concealer context.
     \return A pointer to the the packet loss concealer context. */
-plc_state_t *plc_init(plc_state_t *s);
+SPAN_DECLARE(plc_state_t) *plc_init(plc_state_t *s);
 
 /*! Free a packet loss concealer context.
     \param s The packet loss concealer context.
     \return 0 for OK. */
-int plc_free(plc_state_t *s);
+SPAN_DECLARE(int) plc_free(plc_state_t *s);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/power_meter.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/power_meter.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/power_meter.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: power_meter.h,v 1.15 2008/04/17 14:27:00 steveu Exp $
+ * $Id: power_meter.h,v 1.16 2009/01/31 08:48:11 steveu Exp $
  */
 
 #if !defined(_POWER_METER_H_)
@@ -66,51 +66,51 @@
     \param s The power meter context.
     \param shift The shift to be used by the IIR filter.
     \return The power meter context. */
-power_meter_t *power_meter_init(power_meter_t *s, int shift);
+SPAN_DECLARE(power_meter_t) *power_meter_init(power_meter_t *s, int shift);
 
 /*! 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.
     \param shift The new shift to be used by the IIR filter.
     \return The power meter context. */
-power_meter_t *power_meter_damping(power_meter_t *s, int shift);
+SPAN_DECLARE(power_meter_t) *power_meter_damping(power_meter_t *s, int shift);
 
 /*! Update a power meter.
     \brief Update a power meter.
     \param s The power meter context.
     \param amp The amplitude of the new audio sample.
     \return The current power meter reading. */
-int32_t power_meter_update(power_meter_t *s, int16_t amp);
+SPAN_DECLARE(int32_t) power_meter_update(power_meter_t *s, int16_t amp);
 
 /*! Get the current power meter reading.
     \brief Get the current power meter reading.
     \param s The power meter context.
     \return The current power meter reading. */
-int32_t power_meter_current(power_meter_t *s);
+SPAN_DECLARE(int32_t) power_meter_current(power_meter_t *s);
 
 /*! Get the current power meter reading, in dBm0.
     \brief Get the current power meter reading, in dBm0.
     \param s The power meter context.
     \return The current power meter reading, in dBm0. */
-float power_meter_current_dbm0(power_meter_t *s);
+SPAN_DECLARE(float) power_meter_current_dbm0(power_meter_t *s);
 
 /*! Get the current power meter reading, in dBOv.
     \brief Get the current power meter reading, in dBOv.
     \param s The power meter context.
     \return The current power meter reading, in dBOv. */
-float power_meter_current_dbov(power_meter_t *s);
+SPAN_DECLARE(float) power_meter_current_dbov(power_meter_t *s);
 
 /*! Get the power meter reading which represents a specified power level in dBm0.
     \brief Get the current power meter reading, in dBm0.
     \param level A power level, in dB0m.
     \return The equivalent power meter reading. */
-int32_t power_meter_level_dbm0(float level);
+SPAN_DECLARE(int32_t) power_meter_level_dbm0(float level);
 
 /*! Get the power meter reading which represents a specified power level in dBOv.
     \brief Get the current power meter reading, in dBOv.
     \param level A power level, in dBOv.
     \return The equivalent power meter reading. */
-int32_t power_meter_level_dbov(float level);
+SPAN_DECLARE(int32_t) power_meter_level_dbov(float level);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/private/hdlc.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/private/hdlc.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/private/hdlc.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: hdlc.h,v 1.1 2008/11/30 05:43:37 steveu Exp $
+ * $Id: hdlc.h,v 1.2 2009/01/31 08:48:11 steveu Exp $
  */
 
 #if !defined(_SPANDSP_PRIVATE_HDLC_H_)
@@ -119,7 +119,7 @@
     /*! \brief The length of the message in the buffer. */
     size_t len;
     /*! \brief The current send position within the buffer. */
-    int pos;
+    size_t pos;
     /*! \brief The running CRC, as data fills the frame buffer. */
     uint32_t crc;
 

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/private/queue.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/private/queue.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/private/queue.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: queue.h,v 1.1 2008/11/30 13:08:42 steveu Exp $
+ * $Id: queue.h,v 1.2 2009/01/31 08:48:11 steveu Exp $
  */
 
 #if !defined(_SPANDSP_PRIVATE_QUEUE_H_)
@@ -42,7 +42,7 @@
     volatile int iptr;
     /*! \brief The buffer output pointer. */
     volatile int optr;
-#if defined(FULLY_DEFINE_QUEUE_STATE_T)
+#if defined(SPANDSP_FULLY_DEFINE_QUEUE_STATE_T)
     /*! \brief The data buffer, sized at the time the structure is created. */
     uint8_t data[];
 #endif

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/queue.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/queue.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/queue.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: queue.h,v 1.18 2008/11/30 13:08:42 steveu Exp $
+ * $Id: queue.h,v 1.19 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -66,24 +66,24 @@
     \brief Check if a queue is empty.
     \param s The queue context.
     \return TRUE if empty, else FALSE. */
-int queue_empty(queue_state_t *s);
+SPAN_DECLARE(int) queue_empty(queue_state_t *s);
 
 /*! Check the available free space in a queue's buffer.
     \brief Check available free space.
     \param s The queue context.
     \return The number of bytes of free space. */
-int queue_free_space(queue_state_t *s);
+SPAN_DECLARE(int) queue_free_space(queue_state_t *s);
 
 /*! Check the contents of a queue.
     \brief Check the contents of a queue.
     \param s The queue context.
     \return The number of bytes in the queue. */
-int queue_contents(queue_state_t *s);
+SPAN_DECLARE(int) queue_contents(queue_state_t *s);
 
 /*! Flush the contents of a queue.
     \brief Flush the contents of a queue.
     \param s The queue context. */
-void queue_flush(queue_state_t *s);
+SPAN_DECLARE(void) queue_flush(queue_state_t *s);
 
 /*! Copy bytes from a queue. This is similar to queue_read, but
     the data remains in the queue.
@@ -92,7 +92,7 @@
     \param buf The buffer into which the bytes will be read.
     \param len The length of the buffer.
     \return the number of bytes returned. */
-int queue_view(queue_state_t *s, uint8_t *buf, int len);
+SPAN_DECLARE(int) queue_view(queue_state_t *s, uint8_t *buf, int len);
 
 /*! Read bytes from a queue.
     \brief Read bytes from a queue.
@@ -100,13 +100,13 @@
     \param buf The buffer into which the bytes will be read.
     \param len The length of the buffer.
     \return the number of bytes returned. */
-int queue_read(queue_state_t *s, uint8_t *buf, int len);
+SPAN_DECLARE(int) queue_read(queue_state_t *s, uint8_t *buf, int len);
 
 /*! Read a byte from a queue.
     \brief Read a byte from a queue.
     \param s The queue context.
     \return the byte, or -1 if the queue is empty. */
-int queue_read_byte(queue_state_t *s);
+SPAN_DECLARE(int) queue_read_byte(queue_state_t *s);
 
 /*! Write bytes to a queue.
     \brief Write bytes to a queue.
@@ -114,21 +114,21 @@
     \param buf The buffer containing the bytes to be written.
     \param len The length of the buffer.
     \return the number of bytes actually written. */
-int queue_write(queue_state_t *s, const uint8_t *buf, int len);
+SPAN_DECLARE(int) queue_write(queue_state_t *s, const uint8_t *buf, int len);
 
 /*! Write a byte to a queue.
     \brief Write a byte to a queue.
     \param s The queue context.
     \param byte The byte to be written.
     \return the number of bytes actually written. */
-int queue_write_byte(queue_state_t *s, uint8_t byte);
+SPAN_DECLARE(int) queue_write_byte(queue_state_t *s, uint8_t byte);
 
 /*! Test the length of the message at the head of a queue.
     \brief Test message length.
     \param s The queue context.
     \return The length of the next message, in byte. If there are
             no messages in the queue, -1 is returned. */
-int queue_state_test_msg(queue_state_t *s);
+SPAN_DECLARE(int) queue_state_test_msg(queue_state_t *s);
 
 /*! Read a message from a queue. If the message is longer than the buffer
     provided, only the first len bytes of the message will be returned. The
@@ -139,7 +139,7 @@
     \param len The length of the buffer.
     \return The number of bytes returned. If there are
             no messages in the queue, -1 is returned. */
-int queue_read_msg(queue_state_t *s, uint8_t *buf, int len);
+SPAN_DECLARE(int) queue_read_msg(queue_state_t *s, uint8_t *buf, int len);
 
 /*! Write a message to a queue.
     \brief Write a message to a queue.
@@ -147,7 +147,7 @@
     \param buf The buffer from which the message will be written.
     \param len The length of the message.
     \return The number of bytes actually written. */
-int queue_write_msg(queue_state_t *s, const uint8_t *buf, int len);
+SPAN_DECLARE(int) queue_write_msg(queue_state_t *s, const uint8_t *buf, int len);
 
 /*! Initialise a queue.
     \brief Initialise a queue.
@@ -158,13 +158,13 @@
     \param flags Flags controlling the operation of the queue.
            Valid flags are QUEUE_READ_ATOMIC and QUEUE_WRITE_ATOMIC.
     \return A pointer to the context if OK, else NULL. */
-queue_state_t *queue_init(queue_state_t *s, int len, int flags);
+SPAN_DECLARE(queue_state_t) *queue_init(queue_state_t *s, int len, int flags);
 
 /*! Delete a queue.
     \brief Delete a queue.
     \param s The queue context.
     \return 0 if deleted OK, else -1. */
-int queue_free(queue_state_t *s);
+SPAN_DECLARE(int) queue_free(queue_state_t *s);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/schedule.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/schedule.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/schedule.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: schedule.h,v 1.17 2008/11/30 05:43:37 steveu Exp $
+ * $Id: schedule.h,v 1.18 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -51,15 +51,15 @@
 {
 #endif
 
-uint64_t span_schedule_next(span_sched_state_t *s);
-uint64_t span_schedule_time(span_sched_state_t *s);
+SPAN_DECLARE(uint64_t) span_schedule_next(span_sched_state_t *s);
+SPAN_DECLARE(uint64_t) span_schedule_time(span_sched_state_t *s);
 
-int span_schedule_event(span_sched_state_t *s, int us, span_sched_callback_func_t function, void *user_data);
-void span_schedule_update(span_sched_state_t *s, int us);
-void span_schedule_del(span_sched_state_t *s, int id);
+SPAN_DECLARE(int) span_schedule_event(span_sched_state_t *s, int us, span_sched_callback_func_t function, void *user_data);
+SPAN_DECLARE(void) span_schedule_update(span_sched_state_t *s, int us);
+SPAN_DECLARE(void) span_schedule_del(span_sched_state_t *s, int id);
 
-span_sched_state_t *span_schedule_init(span_sched_state_t *s);
-int span_schedule_release(span_sched_state_t *s);
+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);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/sig_tone.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/sig_tone.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/sig_tone.h	Mon Feb  2 11:40:52 2009
@@ -23,7 +23,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: sig_tone.h,v 1.15 2008/11/30 13:08:42 steveu Exp $
+ * $Id: sig_tone.h,v 1.16 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -104,7 +104,7 @@
     \param amp The audio sample buffer.
     \param len The number of samples in the buffer.
     \return The number of samples unprocessed. */
-int sig_tone_rx(sig_tone_rx_state_t *s, int16_t amp[], int len);
+SPAN_DECLARE(int) sig_tone_rx(sig_tone_rx_state_t *s, int16_t amp[], int len);
 
 /*! Initialise a signaling tone receiver context.
     \brief Initialise a signaling tone context.
@@ -113,7 +113,7 @@
     \param sig_update Callback function to handle signaling updates.
     \param user_data An opaque pointer.
     \return A pointer to the signalling tone context, or NULL if there was a problem. */
-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(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);
 
 /*! Generate a block of signaling tone audio samples.
     \brief Generate a block of signaling tone audio samples.
@@ -121,13 +121,13 @@
     \param amp The audio sample buffer.
     \param len The number of samples to be generated.
     \return The number of samples actually generated. */
-int sig_tone_tx(sig_tone_tx_state_t *s, int16_t amp[], int len);
+SPAN_DECLARE(int) sig_tone_tx(sig_tone_tx_state_t *s, int16_t amp[], int len);
 
 /*! Set the tone mode.
     \brief Set the tone mode.
     \param s The signaling tone context.
     \param mode The new mode for the transmitted tones. */
-void sig_tone_tx_set_mode(sig_tone_tx_state_t *s, int mode);
+SPAN_DECLARE(void) sig_tone_tx_set_mode(sig_tone_tx_state_t *s, int mode);
 
 /*! Initialise a signaling tone transmitter context.
     \brief Initialise a signaling tone context.
@@ -136,7 +136,7 @@
     \param sig_update Callback function to handle signaling updates.
     \param user_data An opaque pointer.
     \return A pointer to the signalling tone context, or NULL if there was a problem. */
-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(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);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: silence_gen.h,v 1.12 2008/07/26 04:53:00 steveu Exp $
+ * $Id: silence_gen.h,v 1.13 2009/01/31 08:48:11 steveu Exp $
  */
 
 #if !defined(_SPANDSP_SILENCE_GEN_H_)
@@ -52,20 +52,20 @@
     \return The number of samples actually generated. This will be zero when
             there is nothing to send.
 */
-int silence_gen(silence_gen_state_t *s, int16_t *amp, int max_len);
+SPAN_DECLARE(int) silence_gen(silence_gen_state_t *s, int16_t *amp, int max_len);
 
 /*! Set a silence generator context to output continuous silence.
     \brief Set a silence generator context to output continuous silence.
     \param s The silence generator context.
 */
-void silence_gen_always(silence_gen_state_t *s);
+SPAN_DECLARE(void) silence_gen_always(silence_gen_state_t *s);
 
 /*! Set a silence generator context to output a specified period of silence.
     \brief Set a silence generator context to output a specified period of silence.
     \param s The silence generator context.
     \param silent_samples The number of samples to be generated.
 */
-void silence_gen_set(silence_gen_state_t *s, int silent_samples);
+SPAN_DECLARE(void) silence_gen_set(silence_gen_state_t *s, int silent_samples);
 
 /*! Alter the period of a silence generator context by a specified amount.
     \brief Alter the period of a silence generator context by a specified amount.
@@ -74,28 +74,28 @@
                           increases the duration. A negative number reduces it. The duration
                           is prevented from going negative.
 */
-void silence_gen_alter(silence_gen_state_t *s, int silent_samples);
+SPAN_DECLARE(void) silence_gen_alter(silence_gen_state_t *s, int silent_samples);
 
 /*! Find how long a silence generator context has to run.
     \brief Find how long a silence generator context has to run.
     \param s The silence generator context.
     \return The number of samples remaining.
 */
-int silence_gen_remainder(silence_gen_state_t *s);
+SPAN_DECLARE(int) silence_gen_remainder(silence_gen_state_t *s);
 
 /*! Find the total silence generated to date by a silence generator context.
     \brief Find the total silence generated to date.
     \param s The silence generator context.
     \return The number of samples generated.
 */
-int silence_gen_generated(silence_gen_state_t *s);
+SPAN_DECLARE(int) silence_gen_generated(silence_gen_state_t *s);
 
 /*! Change the status reporting function associated with a silence generator context.
     \brief Change the status reporting function associated with a silence generator context.
     \param s The silence generator context.
     \param handler The callback routine used to report status changes.
     \param user_data An opaque pointer. */
-void silence_gen_status_handler(silence_gen_state_t *s, modem_tx_status_func_t handler, void *user_data);
+SPAN_DECLARE(void) silence_gen_status_handler(silence_gen_state_t *s, modem_tx_status_func_t handler, void *user_data);
 
 /*! Initialise a timed silence generator context.
     \brief Initialise a timed silence generator context.
@@ -103,7 +103,7 @@
     \param silent_samples The initial number of samples to set the silence to.
     \return A pointer to the silence generator context.
 */
-silence_gen_state_t *silence_gen_init(silence_gen_state_t *s, int silent_samples);
+SPAN_DECLARE(silence_gen_state_t) *silence_gen_init(silence_gen_state_t *s, int silent_samples);
 
 /* The following dummy routines, to absorb data, don't really have a proper home,
    so they have been put here. */
@@ -117,7 +117,7 @@
     \param len The length of the signal buffer
     \return 0.
 */
-int span_dummy_rx(void *user_data, const int16_t amp[], int len);
+SPAN_DECLARE(int) span_dummy_rx(void *user_data, const int16_t amp[], int len);
 
 /*! A dummy routine to use as a signal modifier callback, when we aren't
     really trying to process the signal. It just returns without affecting
@@ -128,7 +128,7 @@
     \param len The length of the signal buffer
     \return 0.
 */
-int span_dummy_mod(void *user_data, int16_t amp[], int len);
+SPAN_DECLARE(int) span_dummy_mod(void *user_data, int16_t amp[], int len);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_rx.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_rx.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: super_tone_rx.h,v 1.18 2008/11/30 10:17:31 steveu Exp $
+ * $Id: super_tone_rx.h,v 1.19 2009/01/31 08:48:11 steveu Exp $
  */
 
 #if !defined(_SPANDSP_SUPER_TONE_RX_H_)
@@ -73,18 +73,18 @@
                 descriptor.
     \return The supervisory tone set descriptor.
 */
-super_tone_rx_descriptor_t *super_tone_rx_make_descriptor(super_tone_rx_descriptor_t *desc);
+SPAN_DECLARE(super_tone_rx_descriptor_t) *super_tone_rx_make_descriptor(super_tone_rx_descriptor_t *desc);
 
 /*! Free a supervisory tone detector descriptor.
     \param desc The supervisory tone set desciptor.
     \return 0 for OK, -1 for fail.
 */
-int super_tone_rx_free_descriptor(super_tone_rx_descriptor_t *desc);
+SPAN_DECLARE(int) super_tone_rx_free_descriptor(super_tone_rx_descriptor_t *desc);
 
 /*! Add a new tone pattern to a supervisory tone detector set.
     \param desc The supervisory tone set descriptor.
     \return The new tone ID. */
-int super_tone_rx_add_tone(super_tone_rx_descriptor_t *desc);
+SPAN_DECLARE(int) super_tone_rx_add_tone(super_tone_rx_descriptor_t *desc);
 
 /*! Add a new tone pattern element to a tone pattern in a supervisory tone detector.
     \param desc The supervisory tone set desciptor.
@@ -95,12 +95,12 @@
     \param max The maximum duration, in ms.
     \return The new number of elements in the tone description.
 */
-int super_tone_rx_add_element(super_tone_rx_descriptor_t *desc,
-                              int tone,
-                              int f1,
-                              int f2,
-                              int min,
-                              int max);
+SPAN_DECLARE(int) super_tone_rx_add_element(super_tone_rx_descriptor_t *desc,
+                                            int tone,
+                                            int f1,
+                                            int f2,
+                                            int min,
+                                            int max);
 
 /*! Initialise a supervisory tone detector.
     \param s The supervisory tone detector context.
@@ -110,24 +110,24 @@
     \param user_data An opaque pointer passed when calling the callback routine.
     \return The supervisory tone detector context.
 */
-super_tone_rx_state_t *super_tone_rx_init(super_tone_rx_state_t *s,
-                                          super_tone_rx_descriptor_t *desc,
-                                          tone_report_func_t callback,
-                                          void *user_data);
+SPAN_DECLARE(super_tone_rx_state_t) *super_tone_rx_init(super_tone_rx_state_t *s,
+                                                        super_tone_rx_descriptor_t *desc,
+                                                        tone_report_func_t callback,
+                                                        void *user_data);
 
 /*! Release a supervisory tone detector.
     \param s The supervisory tone context.
     \return 0 for OK, -1 for fail.
 */
-int super_tone_rx_free(super_tone_rx_state_t *s);
+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
     mostly used when analysing a tone.
     \param s The supervisory tone context.
     \param callback The callback routine.
 */
-void super_tone_rx_segment_callback(super_tone_rx_state_t *s,
-                                    void (*callback)(void *data, int f1, int f2, int duration));
+SPAN_DECLARE(void) super_tone_rx_segment_callback(super_tone_rx_state_t *s,
+                                                  void (*callback)(void *data, int f1, int f2, int duration));
 
 /*! Apply supervisory tone detection processing to a block of audio samples.
     \brief Apply supervisory tone detection processing to a block of audio samples.
@@ -136,7 +136,7 @@
     \param samples The number of samples in the buffer.
     \return The number of samples processed.
 */
-int super_tone_rx(super_tone_rx_state_t *super, const int16_t amp[], int samples);
+SPAN_DECLARE(int) super_tone_rx(super_tone_rx_state_t *super, const int16_t amp[], int samples);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_tx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_tx.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_tx.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: super_tone_tx.h,v 1.14 2008/11/30 10:17:31 steveu Exp $
+ * $Id: super_tone_tx.h,v 1.15 2009/01/31 08:48:11 steveu Exp $
  */
 
 #if !defined(_SPANDSP_SUPER_TONE_TX_H_)
@@ -50,22 +50,22 @@
 {
 #endif
 
-super_tone_tx_step_t *super_tone_tx_make_step(super_tone_tx_step_t *s,
-                                              float f1,
-                                              float l1,
-                                              float f2,
-                                              float l2,
-                                              int length,
-                                              int cycles);
+SPAN_DECLARE(super_tone_tx_step_t) *super_tone_tx_make_step(super_tone_tx_step_t *s,
+                                                            float f1,
+                                                            float l1,
+                                                            float f2,
+                                                            float l2,
+                                                            int length,
+                                                            int cycles);
 
-void super_tone_tx_free(super_tone_tx_step_t *s);
+SPAN_DECLARE(void) super_tone_tx_free(super_tone_tx_step_t *s);
 
 /*! Initialise a supervisory tone generator.
     \brief Initialise a supervisory tone generator.
     \param s The supervisory tone generator context.
     \param tree The supervisory tone tree to be generated.
     \return The supervisory tone generator context. */
-super_tone_tx_state_t *super_tone_tx_init(super_tone_tx_state_t *s, super_tone_tx_step_t *tree);
+SPAN_DECLARE(super_tone_tx_state_t) *super_tone_tx_init(super_tone_tx_state_t *s, super_tone_tx_step_t *tree);
 
 /*! Generate a block of audio samples for a supervisory tone pattern.
     \brief Generate a block of audio samples for a supervisory tone pattern.
@@ -73,7 +73,7 @@
     \param amp The audio sample buffer.
     \param max_samples The maximum number of samples to be generated.
     \return The number of samples generated. */
-int super_tone_tx(super_tone_tx_state_t *s, int16_t amp[], int max_samples);
+SPAN_DECLARE(int) super_tone_tx(super_tone_tx_state_t *s, int16_t amp[], int max_samples);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t30.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t30.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t30.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t30.h,v 1.120 2009/01/19 17:14:10 steveu Exp $
+ * $Id: t30.h,v 1.121 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -558,62 +558,62 @@
     \param send_hdlc_handler
     \param send_hdlc_user_data
     \return A pointer to the context, or NULL if there was a problem. */
-t30_state_t *t30_init(t30_state_t *s,
-                      int calling_party,
-                      t30_set_handler_t *set_rx_type_handler,
-                      void *set_rx_type_user_data,
-                      t30_set_handler_t *set_tx_type_handler,
-                      void *set_tx_type_user_data,
-                      t30_send_hdlc_handler_t *send_hdlc_handler,
-                      void *send_hdlc_user_data);
+SPAN_DECLARE(t30_state_t) *t30_init(t30_state_t *s,
+                                    int calling_party,
+                                    t30_set_handler_t *set_rx_type_handler,
+                                    void *set_rx_type_user_data,
+                                    t30_set_handler_t *set_tx_type_handler,
+                                    void *set_tx_type_user_data,
+                                    t30_send_hdlc_handler_t *send_hdlc_handler,
+                                    void *send_hdlc_user_data);
 
 /*! Release a T.30 context.
     \brief Release a T.30 context.
     \param s The T.30 context.
     \return 0 for OK, else -1. */
-int t30_release(t30_state_t *s);
+SPAN_DECLARE(int) t30_release(t30_state_t *s);
 
 /*! Free a T.30 context.
     \brief Free a T.30 context.
     \param s The T.30 context.
     \return 0 for OK, else -1. */
-int t30_free(t30_state_t *s);
+SPAN_DECLARE(int) t30_free(t30_state_t *s);
 
 /*! Restart a T.30 context.
     \brief Restart a T.30 context.
     \param s The T.30 context.
     \return 0 for OK, else -1. */
-int t30_restart(t30_state_t *s);
+SPAN_DECLARE(int) t30_restart(t30_state_t *s);
 
 /*! Check if a T.30 call is still active. This may be used to regularly poll
     if the job has finished.
     \brief Check if a T.30 call is still active.
     \param s The T.30 context.
     \return TRUE for call still active, or FALSE for call completed. */
-int t30_call_active(t30_state_t *s);
+SPAN_DECLARE(int) t30_call_active(t30_state_t *s);
 
 /*! Cleanup a T.30 context if the call terminates.
     \brief Cleanup a T.30 context if the call terminates.
     \param s The T.30 context. */
-void t30_terminate(t30_state_t *s);
+SPAN_DECLARE(void) t30_terminate(t30_state_t *s);
 
 /*! Inform the T.30 engine of a status change in the front end (end of tx, rx signal change, etc.).
     \brief Inform the T.30 engine of a status change in the front end (end of tx, rx signal change, etc.).
     \param user_data The T.30 context.
     \param status The type of status change which occured. */
-void t30_front_end_status(void *user_data, int status);
+SPAN_DECLARE(void) t30_front_end_status(void *user_data, int status);
 
 /*! Get a bit of received non-ECM image data.
     \brief Get a bit of received non-ECM image data.
     \param user_data An opaque pointer, which must point to the T.30 context.
     \return The next bit to transmit. */
-int t30_non_ecm_get_bit(void *user_data);
+SPAN_DECLARE(int) t30_non_ecm_get_bit(void *user_data);
 
 /*! Get a byte of received non-ECM image data.
     \brief Get a byte of received non-ECM image data.
     \param user_data An opaque pointer, which must point to the T.30 context.
     \return The next byte to transmit. */
-int t30_non_ecm_get_byte(void *user_data);
+SPAN_DECLARE(int) t30_non_ecm_get_byte(void *user_data);
 
 /*! Get a chunk of received non-ECM image data.
     \brief Get a bit of received non-ECM image data.
@@ -621,26 +621,26 @@
     \param buf The buffer to contain the data.
     \param max_len The maximum length of the chunk.
     \return The actual length of the chunk. */
-int t30_non_ecm_get_chunk(void *user_data, uint8_t buf[], int max_len);
+SPAN_DECLARE(int) t30_non_ecm_get_chunk(void *user_data, uint8_t buf[], int max_len);
 
 /*! Process a bit of received non-ECM image data.
     \brief Process a bit of received non-ECM image data
     \param user_data An opaque pointer, which must point to the T.30 context.
     \param bit The received bit. */
-void t30_non_ecm_put_bit(void *user_data, int bit);
+SPAN_DECLARE(void) t30_non_ecm_put_bit(void *user_data, int bit);
 
 /*! Process a byte of received non-ECM image data.
     \brief Process a byte of received non-ECM image data
     \param user_data An opaque pointer, which must point to the T.30 context.
     \param byte The received byte. */
-void t30_non_ecm_put_byte(void *user_data, int byte);
+SPAN_DECLARE(void) t30_non_ecm_put_byte(void *user_data, int byte);
 
 /*! Process a chunk of received non-ECM image data.
     \brief Process a chunk of received non-ECM image data
     \param user_data An opaque pointer, which must point to the T.30 context.
     \param buf The buffer containing the received data.
     \param len The length of the data in buf. */
-void t30_non_ecm_put_chunk(void *user_data, const uint8_t buf[], int len);
+SPAN_DECLARE(void) t30_non_ecm_put_chunk(void *user_data, const uint8_t buf[], int len);
 
 /*! Process a received HDLC frame.
     \brief Process a received HDLC frame.
@@ -648,25 +648,25 @@
     \param msg The HDLC message.
     \param len The length of the message, in octets.
     \param ok TRUE if the frame was received without error. */
-void t30_hdlc_accept(void *user_data, const uint8_t *msg, int len, int ok);
+SPAN_DECLARE(void) t30_hdlc_accept(void *user_data, const uint8_t *msg, int len, int ok);
 
 /*! Report the passage of time to the T.30 engine.
     \brief Report the passage of time to the T.30 engine.
     \param s The T.30 context.
     \param samples The time change in 1/8000th second steps. */
-void t30_timer_update(t30_state_t *s, int samples);
+SPAN_DECLARE(void) t30_timer_update(t30_state_t *s, int samples);
 
 /*! Get the current transfer statistics for the file being sent or received.
     \brief Get the current transfer statistics.
     \param s The T.30 context.
     \param t A pointer to a buffer for the statistics. */
-void t30_get_transfer_statistics(t30_state_t *s, t30_stats_t *t);
+SPAN_DECLARE(void) t30_get_transfer_statistics(t30_state_t *s, t30_stats_t *t);
 
 /*! Request a local interrupt of FAX exchange.
     \brief Request a local interrupt of FAX exchange.
     \param s The T.30 context.
     \param state TRUE to enable interrupt request, else FALSE. */
-void t30_local_interrupt_request(t30_state_t *s, int state);
+SPAN_DECLARE(void) t30_local_interrupt_request(t30_state_t *s, int state);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t30_api.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t30_api.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t30_api.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t30_api.h,v 1.7 2008/10/13 13:14:00 steveu Exp $
+ * $Id: t30_api.h,v 1.8 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -41,21 +41,21 @@
     \param nsf A pointer to the frame.
     \param len The length of the frame.
     \return 0 for OK, else -1. */
-int t30_set_tx_nsf(t30_state_t *s, const uint8_t *nsf, int len);
+SPAN_DECLARE(int) t30_set_tx_nsf(t30_state_t *s, const uint8_t *nsf, int len);
 
 /*! Get an NSF frame to be associated with a T.30 context.
     \brief Set an NSF frame to be associated with a T.30 context.
     \param s The T.30 context.
     \param nsf A pointer to the frame.
     \return the length of the NSF message. */
-size_t t30_get_tx_nsf(t30_state_t *s, const uint8_t *nsf[]);
+SPAN_DECLARE(size_t) t30_get_tx_nsf(t30_state_t *s, const uint8_t *nsf[]);
 
 /*! Get an NSF frame to be associated with a T.30 context.
     \brief Set an NSF frame to be associated with a T.30 context.
     \param s The T.30 context.
     \param nsf A pointer to the frame.
     \return the length of the NSF message. */
-size_t t30_get_rx_nsf(t30_state_t *s, const uint8_t *nsf[]);
+SPAN_DECLARE(size_t) t30_get_rx_nsf(t30_state_t *s, const uint8_t *nsf[]);
 
 /*! Set the transmitted NSC frame to be associated with a T.30 context.
     \brief Set the transmitted NSC frame to be associated with a T.30 context.
@@ -63,21 +63,21 @@
     \param nsf A pointer to the frame.
     \param len The length of the frame.
     \return 0 for OK, else -1. */
-int t30_set_tx_nsc(t30_state_t *s, const uint8_t *nsc, int len);
+SPAN_DECLARE(int) t30_set_tx_nsc(t30_state_t *s, const uint8_t *nsc, int len);
 
 /*! Get an NSC frame to be associated with a T.30 context.
     \brief Set an NSC frame to be associated with a T.30 context.
     \param s The T.30 context.
     \param nsc A pointer to the frame.
     \return the length of the NSC message. */
-size_t t30_get_tx_nsc(t30_state_t *s, const uint8_t *nsc[]);
+SPAN_DECLARE(size_t) t30_get_tx_nsc(t30_state_t *s, const uint8_t *nsc[]);
 
 /*! Get an NSC frame to be associated with a T.30 context.
     \brief Set an NSC frame to be associated with a T.30 context.
     \param s The T.30 context.
     \param nsc A pointer to the frame.
     \return the length of the NSC message. */
-size_t t30_get_rx_nsc(t30_state_t *s, const uint8_t *nsc[]);
+SPAN_DECLARE(size_t) t30_get_rx_nsc(t30_state_t *s, const uint8_t *nsc[]);
 
 /*! Set the transmitted NSS frame to be associated with a T.30 context.
     \brief Set the transmitted NSS frame to be associated with a T.30 context.
@@ -85,63 +85,63 @@
     \param nsf A pointer to the frame.
     \param len The length of the frame.
     \return 0 for OK, else -1. */
-int t30_set_tx_nss(t30_state_t *s, const uint8_t *nss, int len);
+SPAN_DECLARE(int) t30_set_tx_nss(t30_state_t *s, const uint8_t *nss, int len);
 
 /*! Get an NSS frame to be associated with a T.30 context.
     \brief Set an NSS frame to be associated with a T.30 context.
     \param s The T.30 context.
     \param nss A pointer to the frame.
     \return the length of the NSS message. */
-size_t t30_get_tx_nss(t30_state_t *s, const uint8_t *nss[]);
+SPAN_DECLARE(size_t) t30_get_tx_nss(t30_state_t *s, const uint8_t *nss[]);
 
 /*! Get an NSS frame to be associated with a T.30 context.
     \brief Set an NSS frame to be associated with a T.30 context.
     \param s The T.30 context.
     \param nss A pointer to the frame.
     \return the length of the NSS message. */
-size_t t30_get_rx_nss(t30_state_t *s, const uint8_t *nss[]);
+SPAN_DECLARE(size_t) t30_get_rx_nss(t30_state_t *s, const uint8_t *nss[]);
 
 /*! Set the transmitted identifier associated with a T.30 context.
     \brief Set the transmitted identifier associated with a T.30 context.
     \param s The T.30 context.
     \param id A pointer to the identifier.
     \return 0 for OK, else -1. */
-int t30_set_tx_ident(t30_state_t *s, const char *id);
+SPAN_DECLARE(int) t30_set_tx_ident(t30_state_t *s, const char *id);
 
 /*! Get the transmitted identifier associated with a T.30 context.
     \brief Set the transmitted identifier associated with a T.30 context.
     \param s The T.30 context.
     \param id A pointer to the identifier.
     \return 0 for OK, else -1. */
-const char *t30_get_tx_ident(t30_state_t *s);
+SPAN_DECLARE(const char) *t30_get_tx_ident(t30_state_t *s);
 
 /*! Get the transmitted identifier associated with a T.30 context.
     \brief Set the transmitted identifier associated with a T.30 context.
     \param s The T.30 context.
     \param id A pointer to the identifier.
     \return 0 for OK, else -1. */
-const char *t30_get_rx_ident(t30_state_t *s);
+SPAN_DECLARE(const char) *t30_get_rx_ident(t30_state_t *s);
 
 /*! Set the transmitted sub-address associated with a T.30 context.
     \brief Set the transmitted sub-address associated with a T.30 context.
     \param s The T.30 context.
     \param sub_address A pointer to the sub-address.
     \return 0 for OK, else -1. */
-int t30_set_tx_sub_address(t30_state_t *s, const char *sub_address);
+SPAN_DECLARE(int) t30_set_tx_sub_address(t30_state_t *s, const char *sub_address);
 
 /*! Get the received sub-address associated with a T.30 context.
     \brief Get the received sub-address associated with a T.30 context.
     \param s The T.30 context.
     \param sub_address A pointer to the sub-address.
     \return 0 for OK, else -1. */
-const char *t30_get_tx_sub_address(t30_state_t *s);
+SPAN_DECLARE(const char) *t30_get_tx_sub_address(t30_state_t *s);
 
 /*! Get the received sub-address associated with a T.30 context.
     \brief Get the received sub-address associated with a T.30 context.
     \param s The T.30 context.
     \param sub_address A pointer to the sub-address.
     \return 0 for OK, else -1. */
-const char *t30_get_rx_sub_address(t30_state_t *s);
+SPAN_DECLARE(const char) *t30_get_rx_sub_address(t30_state_t *s);
 
 /*! Set the transmitted selective polling address (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -149,7 +149,7 @@
     \param s The T.30 context.
     \param selective_polling_address A pointer to the selective polling address.
     \return 0 for OK, else -1. */
-int t30_set_tx_selective_polling_address(t30_state_t *s, const char *selective_polling_address);
+SPAN_DECLARE(int) t30_set_tx_selective_polling_address(t30_state_t *s, const char *selective_polling_address);
 
 /*! Get the received selective polling address (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -157,7 +157,7 @@
     \param s The T.30 context.
     \param selective_polling_address A pointer to the selective polling address.
     \return 0 for OK, else -1. */
-const char *t30_get_tx_selective_polling_address(t30_state_t *s);
+SPAN_DECLARE(const char) *t30_get_tx_selective_polling_address(t30_state_t *s);
 
 /*! Get the received selective polling address (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -165,7 +165,7 @@
     \param s The T.30 context.
     \param selective_polling_address A pointer to the selective polling address.
     \return 0 for OK, else -1. */
-const char *t30_get_rx_selective_polling_address(t30_state_t *s);
+SPAN_DECLARE(const char) *t30_get_rx_selective_polling_address(t30_state_t *s);
 
 /*! Set the transmitted polled sub-address (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -173,7 +173,7 @@
     \param s The T.30 context.
     \param polled_sub_address A pointer to the polled sub-address.
     \return 0 for OK, else -1. */
-int t30_set_tx_polled_sub_address(t30_state_t *s, const char *polled_sub_address);
+SPAN_DECLARE(int) t30_set_tx_polled_sub_address(t30_state_t *s, const char *polled_sub_address);
 
 /*! Get the received polled sub-address (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -181,7 +181,7 @@
     \param s The T.30 context.
     \param polled_sub_address A pointer to the polled sub-address.
     \return 0 for OK, else -1. */
-const char *t30_get_tx_polled_sub_address(t30_state_t *s);
+SPAN_DECLARE(const char) *t30_get_tx_polled_sub_address(t30_state_t *s);
 
 /*! Get the received polled sub-address (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -189,7 +189,7 @@
     \param s The T.30 context.
     \param polled_sub_address A pointer to the polled sub-address.
     \return 0 for OK, else -1. */
-const char *t30_get_rx_polled_sub_address(t30_state_t *s);
+SPAN_DECLARE(const char) *t30_get_rx_polled_sub_address(t30_state_t *s);
 
 /*! Set the transmitted sender ident (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -197,7 +197,7 @@
     \param s The T.30 context.
     \param sender_ident A pointer to the sender ident.
     \return 0 for OK, else -1. */
-int t30_set_tx_sender_ident(t30_state_t *s, const char *sender_ident);
+SPAN_DECLARE(int) t30_set_tx_sender_ident(t30_state_t *s, const char *sender_ident);
 
 /*! Get the received sender ident (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -205,7 +205,7 @@
     \param s The T.30 context.
     \param sender_ident A pointer to the sender ident.
     \return 0 for OK, else -1. */
-const char *t30_get_tx_sender_ident(t30_state_t *s);
+SPAN_DECLARE(const char) *t30_get_tx_sender_ident(t30_state_t *s);
 
 /*! Get the received sender ident (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -213,7 +213,7 @@
     \param s The T.30 context.
     \param sender_ident A pointer to the sender ident.
     \return 0 for OK, else -1. */
-const char *t30_get_rx_sender_ident(t30_state_t *s);
+SPAN_DECLARE(const char) *t30_get_rx_sender_ident(t30_state_t *s);
 
 /*! Set the transmitted password (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -221,7 +221,7 @@
     \param s The T.30 context.
     \param password A pointer to the password.
     \return 0 for OK, else -1. */
-int t30_set_tx_password(t30_state_t *s, const char *password);
+SPAN_DECLARE(int) t30_set_tx_password(t30_state_t *s, const char *password);
 
 /*! Get the received password (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -229,7 +229,7 @@
     \param s The T.30 context.
     \param password A pointer to the password.
     \return 0 for OK, else -1. */
-const char *t30_get_tx_password(t30_state_t *s);
+SPAN_DECLARE(const char) *t30_get_tx_password(t30_state_t *s);
 
 /*! Get the received password (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -237,7 +237,7 @@
     \param s The T.30 context.
     \param password A pointer to the password.
     \return 0 for OK, else -1. */
-const char *t30_get_rx_password(t30_state_t *s);
+SPAN_DECLARE(const char) *t30_get_rx_password(t30_state_t *s);
 
 /*! Set the transmitted ??? (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -247,7 +247,7 @@
     \param type A pointer to the address.
     \param len The length of the address.
     \return 0 for OK, else -1. */
-int t30_set_tx_tsa(t30_state_t *s, int type, const char *address, int len);
+SPAN_DECLARE(int) t30_set_tx_tsa(t30_state_t *s, int type, const char *address, int len);
 
 /*! Get the received ??? (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -257,7 +257,7 @@
     \param type A pointer to the address.
     \param len The length of the address.
     \return 0 for OK, else -1. */
-size_t t30_get_tx_tsa(t30_state_t *s, int *type, const char *address[]);
+SPAN_DECLARE(size_t) t30_get_tx_tsa(t30_state_t *s, int *type, const char *address[]);
 
 /*! Get the received ??? (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -267,7 +267,7 @@
     \param type A pointer to the address.
     \param len The length of the address.
     \return 0 for OK, else -1. */
-size_t t30_get_rx_tsa(t30_state_t *s, int *type, const char *address[]);
+SPAN_DECLARE(size_t) t30_get_rx_tsa(t30_state_t *s, int *type, const char *address[]);
 
 /*! Set the transmitted ??? (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -277,7 +277,7 @@
     \param type A pointer to the address.
     \param len The length of the address.
     \return 0 for OK, else -1. */
-int t30_set_tx_ira(t30_state_t *s, int type, const char *address, int len);
+SPAN_DECLARE(int) t30_set_tx_ira(t30_state_t *s, int type, const char *address, int len);
 
 /*! Get the received ??? (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -287,7 +287,7 @@
     \param type A pointer to the address.
     \param len The length of the address.
     \return 0 for OK, else -1. */
-size_t t30_get_tx_ira(t30_state_t *s, int *type, const char *address[]);
+SPAN_DECLARE(size_t) t30_get_tx_ira(t30_state_t *s, int *type, const char *address[]);
 
 /*! Get the received ??? (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -297,7 +297,7 @@
     \param type A pointer to the address.
     \param len The length of the address.
     \return 0 for OK, else -1. */
-size_t t30_get_rx_ira(t30_state_t *s, int *type, const char *address[]);
+SPAN_DECLARE(size_t) t30_get_rx_ira(t30_state_t *s, int *type, const char *address[]);
 
 /*! Set the transmitted ??? (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -307,7 +307,7 @@
     \param type A pointer to the address.
     \param len The length of the address.
     \return 0 for OK, else -1. */
-int t30_set_tx_cia(t30_state_t *s, int type, const char *address, int len);
+SPAN_DECLARE(int) t30_set_tx_cia(t30_state_t *s, int type, const char *address, int len);
 
 /*! Get the received ??? (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -317,7 +317,7 @@
     \param type A pointer to the address.
     \param len The length of the address.
     \return 0 for OK, else -1. */
-size_t t30_get_tx_cia(t30_state_t *s, int *type, const char *address[]);
+SPAN_DECLARE(size_t) t30_get_tx_cia(t30_state_t *s, int *type, const char *address[]);
 
 /*! Get the received ??? (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -327,7 +327,7 @@
     \param type A pointer to the address.
     \param len The length of the address.
     \return 0 for OK, else -1. */
-size_t t30_get_rx_cia(t30_state_t *s, int *type, const char *address[]);
+SPAN_DECLARE(size_t) t30_get_rx_cia(t30_state_t *s, int *type, const char *address[]);
 
 /*! Set the transmitted ??? (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -337,7 +337,7 @@
     \param type A pointer to the address.
     \param len The length of the address.
     \return 0 for OK, else -1. */
-int t30_set_tx_isp(t30_state_t *s, int type, const char *address, int len);
+SPAN_DECLARE(int) t30_set_tx_isp(t30_state_t *s, int type, const char *address, int len);
 
 /*! Get the received ??? (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -346,7 +346,7 @@
     \param type The type of address.
     \param type A pointer to the address.
     \return 0 for OK, else -1. */
-size_t t30_get_tx_isp(t30_state_t *s, int *type, const char *address[]);
+SPAN_DECLARE(size_t) t30_get_tx_isp(t30_state_t *s, int *type, const char *address[]);
 
 /*! Get the received ??? (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -355,7 +355,7 @@
     \param type The type of address.
     \param type A pointer to the address.
     \return 0 for OK, else -1. */
-size_t t30_get_rx_isp(t30_state_t *s, int *type, const char *address[]);
+SPAN_DECLARE(size_t) t30_get_rx_isp(t30_state_t *s, int *type, const char *address[]);
 
 /*! Set the transmitted ??? (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -365,7 +365,7 @@
     \param type A pointer to the address.
     \param len The length of the address.
     \return 0 for OK, else -1. */
-int t30_set_tx_csa(t30_state_t *s, int type, const char *address, int len);
+SPAN_DECLARE(int) t30_set_tx_csa(t30_state_t *s, int type, const char *address, int len);
 
 /*! Get the received ??? (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -375,7 +375,7 @@
     \param type A pointer to the address.
     \param len The length of the address.
     \return 0 for OK, else -1. */
-size_t t30_get_tx_csa(t30_state_t *s, int *type, const char *address[]);
+SPAN_DECLARE(size_t) t30_get_tx_csa(t30_state_t *s, int *type, const char *address[]);
 
 /*! Get the received ??? (i.e. the one we will send to the far
     end) associated with a T.30 context.
@@ -385,14 +385,14 @@
     \param type A pointer to the address.
     \param len The length of the address.
     \return 0 for OK, else -1. */
-size_t t30_get_rx_csa(t30_state_t *s, int *type, const char *address[]);
+SPAN_DECLARE(size_t) t30_get_rx_csa(t30_state_t *s, int *type, const char *address[]);
 
 /*! Set the transmitted header information associated with a T.30 context.
     \brief Set the transmitted header information associated with a T.30 context.
     \param s The T.30 context.
     \param info A pointer to the information string.
     \return 0 for OK, else -1. */
-int t30_set_tx_page_header_info(t30_state_t *s, const char *info);
+SPAN_DECLARE(int) t30_set_tx_page_header_info(t30_state_t *s, const char *info);
 
 /*! Get the header information associated with a T.30 context.
     \brief Get the header information associated with a T.30 context.
@@ -400,25 +400,25 @@
     \param info A pointer to a buffer for the header information.  The buffer
            should be at least 51 bytes long.
     \return the length of the string. */
-size_t t30_get_tx_page_header_info(t30_state_t *s, char *info);
+SPAN_DECLARE(size_t) t30_get_tx_page_header_info(t30_state_t *s, char *info);
 
 /*! Get the country of origin of the remote FAX machine associated with a T.30 context.
     \brief Get the country of origin of the remote FAX machine associated with a T.30 context.
     \param s The T.30 context.
     \return a pointer to the country name, or NULL if the country is not known. */
-const char *t30_get_rx_country(t30_state_t *s);
+SPAN_DECLARE(const char) *t30_get_rx_country(t30_state_t *s);
 
 /*! Get the name of the vendor of the remote FAX machine associated with a T.30 context.
     \brief Get the name of the vendor of the remote FAX machine associated with a T.30 context.
     \param s The T.30 context.
     \return a pointer to the vendor name, or NULL if the vendor is not known. */
-const char *t30_get_rx_vendor(t30_state_t *s);
+SPAN_DECLARE(const char) *t30_get_rx_vendor(t30_state_t *s);
 
 /*! Get the name of the model of the remote FAX machine associated with a T.30 context.
     \brief Get the name of the model of the remote FAX machine associated with a T.30 context.
     \param s The T.30 context.
     \return a pointer to the model name, or NULL if the model is not known. */
-const char *t30_get_rx_model(t30_state_t *s);
+SPAN_DECLARE(const char) *t30_get_rx_model(t30_state_t *s);
 
 /*! Specify the file name of the next TIFF file to be received by a T.30
     context.
@@ -426,7 +426,7 @@
     \param s The T.30 context.
     \param file The file name
     \param stop_page The maximum page to receive. -1 for no restriction. */
-void t30_set_rx_file(t30_state_t *s, const char *file, int stop_page);
+SPAN_DECLARE(void) t30_set_rx_file(t30_state_t *s, const char *file, int stop_page);
 
 /*! Specify the file name of the next TIFF file to be transmitted by a T.30
     context.
@@ -435,20 +435,20 @@
     \param file The file name
     \param start_page The first page to send. -1 for no restriction.
     \param stop_page The last page to send. -1 for no restriction. */
-void t30_set_tx_file(t30_state_t *s, const char *file, int start_page, int stop_page);
+SPAN_DECLARE(void) t30_set_tx_file(t30_state_t *s, const char *file, int start_page, int stop_page);
 
 /*! Set Internet aware FAX (IAF) mode.
     \brief Set Internet aware FAX (IAF) mode.
     \param s The T.30 context.
     \param iaf TRUE for IAF, or FALSE for non-IAF. */
-void t30_set_iaf_mode(t30_state_t *s, int iaf);
+SPAN_DECLARE(void) t30_set_iaf_mode(t30_state_t *s, int iaf);
 
 /*! Specify if error correction mode (ECM) is allowed by a T.30 context.
     \brief Select ECM capability.
     \param s The T.30 context.
     \param enabled TRUE for ECM capable, FALSE for not ECM capable.
     \return 0 if OK, else -1. */
-int t30_set_ecm_capability(t30_state_t *s, int enabled);
+SPAN_DECLARE(int) t30_set_ecm_capability(t30_state_t *s, int enabled);
 
 /*! Specify the output encoding for TIFF files created during FAX reception.
     \brief Specify the output encoding for TIFF files created during FAX reception.
@@ -458,91 +458,91 @@
            densest option, but support for it is broken in a number of software
            packages.
     \return 0 if OK, else -1. */
-int t30_set_rx_encoding(t30_state_t *s, int encoding);
+SPAN_DECLARE(int) t30_set_rx_encoding(t30_state_t *s, int encoding);
 
 /*! Specify the minimum scan line time supported by a T.30 context.
     \brief Specify minimum scan line time.
     \param s The T.30 context.
     \param min_time The minimum permitted scan line time, in milliseconds.
     \return 0 if OK, else -1. */
-int t30_set_minimum_scan_line_time(t30_state_t *s, int min_time);
+SPAN_DECLARE(int) t30_set_minimum_scan_line_time(t30_state_t *s, int min_time);
 
 /*! Specify which modem types are supported by a T.30 context.
     \brief Specify supported modems.
     \param s The T.30 context.
     \param supported_modems Bit field list of the supported modems.
     \return 0 if OK, else -1. */
-int t30_set_supported_modems(t30_state_t *s, int supported_modems);
+SPAN_DECLARE(int) t30_set_supported_modems(t30_state_t *s, int supported_modems);
 
 /*! Specify which compression types are supported by a T.30 context.
     \brief Specify supported compression types.
     \param s The T.30 context.
     \param supported_compressions Bit field list of the supported compression types.
     \return 0 if OK, else -1. */
-int t30_set_supported_compressions(t30_state_t *s, int supported_compressions);
+SPAN_DECLARE(int) t30_set_supported_compressions(t30_state_t *s, int supported_compressions);
 
 /*! Specify which resolutions are supported by a T.30 context.
     \brief Specify supported resolutions.
     \param s The T.30 context.
     \param supported_resolutions Bit field list of the supported resolutions.
     \return 0 if OK, else -1. */
-int t30_set_supported_resolutions(t30_state_t *s, int supported_resolutions);
+SPAN_DECLARE(int) t30_set_supported_resolutions(t30_state_t *s, int supported_resolutions);
 
 /*! Specify which images sizes are supported by a T.30 context.
     \brief Specify supported image sizes.
     \param s The T.30 context.
     \param supported_image_sizes Bit field list of the supported widths and lengths.
     \return 0 if OK, else -1. */
-int t30_set_supported_image_sizes(t30_state_t *s, int supported_image_sizes);
+SPAN_DECLARE(int) t30_set_supported_image_sizes(t30_state_t *s, int supported_image_sizes);
 
 /*! Specify which special T.30 features are supported by a T.30 context.
     \brief Specify supported T.30 features.
     \param s The T.30 context.
     \param supported_t30_features Bit field list of the supported features.
     \return 0 if OK, else -1. */
-int t30_set_supported_t30_features(t30_state_t *s, int supported_t30_features);
+SPAN_DECLARE(int) t30_set_supported_t30_features(t30_state_t *s, int supported_t30_features);
 
 /*! Set T.30 status. This may be used to adjust the status from within
     the phase B and phase D callbacks.
     \brief Set T.30 status.
     \param s The T.30 context.
     \param status The new status. */
-void t30_set_status(t30_state_t *s, int status);
+SPAN_DECLARE(void) t30_set_status(t30_state_t *s, int status);
 
 /*! Specify a period of responding with receiver not ready.
     \brief Specify a period of responding with receiver not ready.
     \param s The T.30 context.
     \param count The number of times to report receiver not ready.
     \return 0 if OK, else -1. */
-int t30_set_receiver_not_ready(t30_state_t *s, int count);
+SPAN_DECLARE(int) t30_set_receiver_not_ready(t30_state_t *s, int count);
 
 /*! Set a callback function for T.30 phase B handling.
     \brief Set a callback function for T.30 phase B handling.
     \param s The T.30 context.
     \param handler The callback function.
     \param user_data An opaque pointer passed to the callback function. */
-void t30_set_phase_b_handler(t30_state_t *s, t30_phase_b_handler_t *handler, void *user_data);
+SPAN_DECLARE(void) t30_set_phase_b_handler(t30_state_t *s, t30_phase_b_handler_t *handler, void *user_data);
 
 /*! Set a callback function for T.30 phase D handling.
     \brief Set a callback function for T.30 phase D handling.
     \param s The T.30 context.
     \param handler The callback function.
     \param user_data An opaque pointer passed to the callback function. */
-void t30_set_phase_d_handler(t30_state_t *s, t30_phase_d_handler_t *handler, void *user_data);
+SPAN_DECLARE(void) t30_set_phase_d_handler(t30_state_t *s, t30_phase_d_handler_t *handler, void *user_data);
 
 /*! Set a callback function for T.30 phase E handling.
     \brief Set a callback function for T.30 phase E handling.
     \param s The T.30 context.
     \param handler The callback function.
     \param user_data An opaque pointer passed to the callback function. */
-void t30_set_phase_e_handler(t30_state_t *s, t30_phase_e_handler_t *handler, void *user_data);
+SPAN_DECLARE(void) t30_set_phase_e_handler(t30_state_t *s, t30_phase_e_handler_t *handler, void *user_data);
 
 /*! Set a callback function for T.30 end of document handling.
     \brief Set a callback function for T.30 end of document handling.
     \param s The T.30 context.
     \param handler The callback function.
     \param user_data An opaque pointer passed to the callback function. */
-void t30_set_document_handler(t30_state_t *s, t30_document_handler_t *handler, void *user_data);
+SPAN_DECLARE(void) t30_set_document_handler(t30_state_t *s, t30_document_handler_t *handler, void *user_data);
 
 /*! Set a callback function for T.30 frame exchange monitoring. This is called from the heart
     of the signal processing, so don't take too long in the handler routine.
@@ -550,14 +550,14 @@
     \param s The T.30 context.
     \param handler The callback function.
     \param user_data An opaque pointer passed to the callback function. */
-void t30_set_real_time_frame_handler(t30_state_t *s, t30_real_time_frame_handler_t *handler, void *user_data);
+SPAN_DECLARE(void) t30_set_real_time_frame_handler(t30_state_t *s, t30_real_time_frame_handler_t *handler, void *user_data);
 
 /*! Get a pointer to the logging context associated with a T.30 context.
     \brief Get a pointer to the logging context associated with a T.30 context.
     \param s The T.30 context.
     \return A pointer to the logging context, or NULL.
 */
-logging_state_t *t30_get_logging_state(t30_state_t *s);
+SPAN_DECLARE(logging_state_t) *t30_get_logging_state(t30_state_t *s);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t30_logging.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t30_logging.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t30_logging.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t30_logging.h,v 1.2 2008/04/17 14:27:00 steveu Exp $
+ * $Id: t30_logging.h,v 1.3 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -40,20 +40,20 @@
     \param x The frametype octet.
     \return A pointer to the text name for the frame type. If the frame type is
             not value, the string "???" is returned. */
-const char *t30_frametype(uint8_t x);
+SPAN_DECLARE(const char) *t30_frametype(uint8_t x);
 
 /*! Decode a DIS, DTC or DCS frame, and log the contents.
     \brief Decode a DIS, DTC or DCS frame, and log the contents.
     \param s The T.30 context.
     \param dis A pointer to the frame to be decoded.
     \param len The length of the frame. */
-void t30_decode_dis_dtc_dcs(t30_state_t *s, const uint8_t *dis, int len);
+SPAN_DECLARE(void) t30_decode_dis_dtc_dcs(t30_state_t *s, const uint8_t *dis, int len);
 
 /*! Convert a phase E completion code to a short text description.
     \brief Convert a phase E completion code to a short text description.
     \param result The result code.
     \return A pointer to the description. */
-const char *t30_completion_code_to_str(int result);
+SPAN_DECLARE(const char) *t30_completion_code_to_str(int result);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t31.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t31.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t31.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t31.h,v 1.55 2009/01/09 16:09:06 steveu Exp $
+ * $Id: t31.h,v 1.56 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -57,9 +57,9 @@
 {
 #endif
 
-void t31_call_event(t31_state_t *s, int event);
+SPAN_DECLARE(void) t31_call_event(t31_state_t *s, int event);
 
-int t31_at_rx(t31_state_t *s, const char *t, int len);
+SPAN_DECLARE(int) t31_at_rx(t31_state_t *s, const char *t, int len);
 
 /*! Process a block of received T.31 modem audio samples.
     \brief Process a block of received T.31 modem audio samples.
@@ -67,7 +67,7 @@
     \param amp The audio sample buffer.
     \param len The number of samples in the buffer.
     \return The number of samples unprocessed. */
-int t31_rx(t31_state_t *s, int16_t amp[], int len);
+SPAN_DECLARE(int) t31_rx(t31_state_t *s, int16_t amp[], int len);
 
 /*! Generate a block of T.31 modem audio samples.
     \brief Generate a block of T.31 modem audio samples.
@@ -76,9 +76,9 @@
     \param max_len The number of samples to be generated.
     \return The number of samples actually generated.
 */
-int t31_tx(t31_state_t *s, int16_t amp[], int max_len);
+SPAN_DECLARE(int) t31_tx(t31_state_t *s, int16_t amp[], int max_len);
 
-int t31_t38_send_timeout(t31_state_t *s, int samples);
+SPAN_DECLARE(int) t31_t38_send_timeout(t31_state_t *s, int samples);
 
 /*! Select whether silent audio will be sent when transmit is idle.
     \brief Select whether silent audio will be sent when transmit is idle.
@@ -87,14 +87,14 @@
            idle. FALSE to transmit zero length audio when the transmitter is idle. The default
            behaviour is FALSE.
 */
-void t31_set_transmit_on_idle(t31_state_t *s, int transmit_on_idle);
+SPAN_DECLARE(void) t31_set_transmit_on_idle(t31_state_t *s, int transmit_on_idle);
 
 /*! Select whether TEP mode will be used (or time allowed for it (when transmitting).
     \brief Select whether TEP mode will be used.
     \param s The T.31 modem context.
     \param use_tep TRUE if TEP is to be ised.
 */
-void t31_set_tep_mode(t31_state_t *s, int use_tep);
+SPAN_DECLARE(void) t31_set_tep_mode(t31_state_t *s, int use_tep);
 
 /*! Select whether T.38 data will be paced as it is transmitted.
     \brief Select whether T.38 data will be paced.
@@ -102,18 +102,18 @@
     \param without_pacing TRUE if data is to be sent as fast as possible. FALSE if it is
            to be paced.
 */
-void t31_set_t38_config(t31_state_t *s, int without_pacing);
+SPAN_DECLARE(void) t31_set_t38_config(t31_state_t *s, int without_pacing);
 
-void t31_set_mode(t31_state_t *s, int t38_mode);
+SPAN_DECLARE(void) t31_set_mode(t31_state_t *s, int t38_mode);
 
 /*! Get a pointer to the logging context associated with a T.31 context.
     \brief Get a pointer to the logging context associated with a T.31 context.
     \param s The T.31 context.
     \return A pointer to the logging context, or NULL.
 */
-logging_state_t *t31_get_logging_state(t31_state_t *s);
+SPAN_DECLARE(logging_state_t) *t31_get_logging_state(t31_state_t *s);
 
-t38_core_state_t *t31_get_t38_core_state(t31_state_t *s);
+SPAN_DECLARE(t38_core_state_t) *t31_get_t38_core_state(t31_state_t *s);
 
 /*! Initialise a T.31 context. This must be called before the first
     use of the context, to initialise its contents.
@@ -126,19 +126,19 @@
     \param tx_t38_packet_handler ???
     \param tx_t38_packet_user_data ???
     \return A pointer to the T.31 context. */
-t31_state_t *t31_init(t31_state_t *s,
-                      at_tx_handler_t *at_tx_handler,
-                      void *at_tx_user_data,
-                      t31_modem_control_handler_t *modem_control_handler,
-                      void *modem_control_user_data,
-                      t38_tx_packet_handler_t *tx_t38_packet_handler,
-                      void *tx_t38_packet_user_data);
+SPAN_DECLARE(t31_state_t) *t31_init(t31_state_t *s,
+                                    at_tx_handler_t *at_tx_handler,
+                                    void *at_tx_user_data,
+                                    t31_modem_control_handler_t *modem_control_handler,
+                                    void *modem_control_user_data,
+                                    t38_tx_packet_handler_t *tx_t38_packet_handler,
+                                    void *tx_t38_packet_user_data);
 
 /*! Release a T.31 context.
     \brief Release a T.31 context.
     \param s The T.31 context.
     \return 0 for OK */
-int t31_release(t31_state_t *s);
+SPAN_DECLARE(int) t31_release(t31_state_t *s);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t35.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t35.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t35.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t35.h,v 1.14 2008/04/17 14:27:00 steveu Exp $
+ * $Id: t35.h,v 1.15 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -63,7 +63,7 @@
            If the model is not identified, NULL will be returned.
     \return TRUE if the machine was identified, otherwise FALSE.
 */
-int t35_decode(const uint8_t *msg, int len, const char **country, const char **vendor, const char **model);
+SPAN_DECLARE(int) t35_decode(const uint8_t *msg, int len, const char **country, const char **vendor, const char **model);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t38_core.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t38_core.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t38_core.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t38_core.h,v 1.34 2009/01/29 01:41:06 steveu Exp $
+ * $Id: t38_core.h,v 1.35 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -197,47 +197,47 @@
 /*! \brief Convert the code for an indicator to a short text name.
     \param indicator The type of indicator.
     \return A pointer to a short text name for the indicator. */
-const char *t38_indicator_to_str(int indicator);
+SPAN_DECLARE(const char) *t38_indicator_to_str(int indicator);
 
 /*! \brief Convert the code for a type of data to a short text name.
     \param data_type The data type.
     \return A pointer to a short text name for the data type. */
-const char *t38_data_type_to_str(int data_type);
+SPAN_DECLARE(const char) *t38_data_type_to_str(int data_type);
 
 /*! \brief Convert the code for a type of data field to a short text name.
     \param field_type The field type.
     \return A pointer to a short text name for the field type. */
-const char *t38_field_type_to_str(int field_type);
+SPAN_DECLARE(const char) *t38_field_type_to_str(int field_type);
 
 /*! \brief Convert the code for a CM profile code to text description.
     \param profile The profile code from a CM message.
     \return A pointer to a short text description of the profile. */
-const char *t38_cm_profile_to_str(int profile);
+SPAN_DECLARE(const char) *t38_cm_profile_to_str(int profile);
 
 /*! \brief Convert a JM message code to text description.
     \param data The data field of the message.
     \param len The length of the data field.
     \return A pointer to a short text description of the profile. */
-const char *t38_jm_to_str(const uint8_t *data, int len);
+SPAN_DECLARE(const char) *t38_jm_to_str(const uint8_t *data, int len);
 
 /*! \brief Convert a V34rate message to an actual bit rate.
     \param data The data field of the message.
     \param len The length of the data field.
     \return The bit rate, or -1 for a bad message. */
-int t38_v34rate_to_bps(const uint8_t *data, int len);
+SPAN_DECLARE(int) t38_v34rate_to_bps(const uint8_t *data, int len);
 
 /*! \brief Send an indicator packet
     \param s The T.38 context.
     \param indicator The indicator to send.
     \param count The number of copies of the packet to send.
     \return The delay to allow after this indicator is sent. */
-int t38_core_send_indicator(t38_core_state_t *s, int indicator, int count);
+SPAN_DECLARE(int) t38_core_send_indicator(t38_core_state_t *s, int indicator, int count);
 
 /*! \brief Find the delay to allow for HDLC flags after sending an indicator
     \param s The T.38 context.
     \param indicator The indicator to send.
     \return The delay to allow for initial HDLC flags after this indicator is sent. */
-int t38_core_send_flags_delay(t38_core_state_t *s, int indicator);
+SPAN_DECLARE(int) t38_core_send_flags_delay(t38_core_state_t *s, int indicator);
 
 /*! \brief Send a data packet
     \param s The T.38 context.
@@ -247,7 +247,7 @@
     \param field_len The length of the message data, in bytes.
     \param count The number of copies of the packet to send.
     \return ??? */
-int t38_core_send_data(t38_core_state_t *s, int data_type, int field_type, const uint8_t field[], int field_len, int count);
+SPAN_DECLARE(int) t38_core_send_data(t38_core_state_t *s, int data_type, int field_type, const uint8_t field[], int field_len, int count);
 
 /*! \brief Send a data packet
     \param s The T.38 context.
@@ -256,7 +256,7 @@
     \param fields The number of fields in the list.
     \param count The number of copies of the packet to send.
     \return ??? */
-int t38_core_send_data_multi_field(t38_core_state_t *s, int data_type, const t38_data_field_t field[], int fields, int count);
+SPAN_DECLARE(int) t38_core_send_data_multi_field(t38_core_state_t *s, int data_type, const t38_data_field_t field[], int fields, int count);
 
 /*! \brief Process a received T.38 IFP packet.
     \param s The T.38 context.
@@ -264,77 +264,77 @@
     \param len The length of the packet contents.
     \param seq_no The packet sequence number.
     \return 0 for OK, else -1. */
-int t38_core_rx_ifp_packet(t38_core_state_t *s, const uint8_t *buf, int len, uint16_t seq_no);
+SPAN_DECLARE(int) t38_core_rx_ifp_packet(t38_core_state_t *s, const uint8_t *buf, int len, uint16_t seq_no);
 
 /*! Set the method to be used for data rate management, as per the T.38 spec.
     \param s The T.38 context.
     \param method 1 for pass TCF across the T.38 link, 2 for handle TCF locally.
 */
-void t38_set_data_rate_management_method(t38_core_state_t *s, int method);
+SPAN_DECLARE(void) t38_set_data_rate_management_method(t38_core_state_t *s, int method);
 
 /*! Set the data transport protocol.
     \param s The T.38 context.
     \param data_transport_protocol UDPTL, RTP or TPKT.
 */
-void t38_set_data_transport_protocol(t38_core_state_t *s, int data_transport_protocol);
+SPAN_DECLARE(void) t38_set_data_transport_protocol(t38_core_state_t *s, int data_transport_protocol);
 
 /*! Set the non-ECM fill bit removal mode.
     \param s The T.38 context.
     \param fill_bit_removal TRUE to remove fill bits across the T.38 link, else FALSE.
 */
-void t38_set_fill_bit_removal(t38_core_state_t *s, int fill_bit_removal);
+SPAN_DECLARE(void) t38_set_fill_bit_removal(t38_core_state_t *s, int fill_bit_removal);
 
 /*! Set the MMR transcoding mode.
     \param s The T.38 context.
     \param mmr_transcoding TRUE to transcode to MMR across the T.38 link, else FALSE.
 */
-void t38_set_mmr_transcoding(t38_core_state_t *s, int mmr_transcoding);
+SPAN_DECLARE(void) t38_set_mmr_transcoding(t38_core_state_t *s, int mmr_transcoding);
 
 /*! Set the JBIG transcoding mode.
     \param s The T.38 context.
     \param jbig_transcoding TRUE to transcode to JBIG across the T.38 link, else FALSE.
 */
-void t38_set_jbig_transcoding(t38_core_state_t *s, int jbig_transcoding);
+SPAN_DECLARE(void) t38_set_jbig_transcoding(t38_core_state_t *s, int jbig_transcoding);
 
-void t38_set_max_buffer_size(t38_core_state_t *s, int max_buffer_size);
+SPAN_DECLARE(void) t38_set_max_buffer_size(t38_core_state_t *s, int max_buffer_size);
 
-void t38_set_max_datagram_size(t38_core_state_t *s, int max_datagram_size);
+SPAN_DECLARE(void) t38_set_max_datagram_size(t38_core_state_t *s, int max_datagram_size);
 
-int t38_get_fastest_image_data_rate(t38_core_state_t *s);
+SPAN_DECLARE(int) t38_get_fastest_image_data_rate(t38_core_state_t *s);
 
 /*! Set the T.38 version to be emulated.
     \param s The T.38 context.
     \param t38_version Version number, as in the T.38 spec.
 */
-void t38_set_t38_version(t38_core_state_t *s, int t38_version);
+SPAN_DECLARE(void) t38_set_t38_version(t38_core_state_t *s, int t38_version);
 
 /*! Set the sequence number handling option.
     \param s The T.38 context.
     \param check TRUE to check sequence numbers, and handle gaps reasonably. FALSE
            for no sequence number processing (e.g. for TPKT over TCP transport).
 */
-void t38_set_sequence_number_handling(t38_core_state_t *s, int check);
+SPAN_DECLARE(void) t38_set_sequence_number_handling(t38_core_state_t *s, int check);
 
 /*! Set the TEP handling option.
     \param s The T.38 context.
     \param allow_for_tep TRUE to allow for TEP playout, else FALSE.
 */
-void t38_set_tep_handling(t38_core_state_t *s, int allow_for_tep);
+SPAN_DECLARE(void) t38_set_tep_handling(t38_core_state_t *s, int allow_for_tep);
 
 /*! Get a pointer to the logging context associated with a T.38 context.
     \brief Get a pointer to the logging context associated with a T.38 context.
     \param s The T.38 context.
     \return A pointer to the logging context, or NULL.
 */
-logging_state_t *t38_core_get_logging_state(t38_core_state_t *s);
+SPAN_DECLARE(logging_state_t) *t38_core_get_logging_state(t38_core_state_t *s);
 
-t38_core_state_t *t38_core_init(t38_core_state_t *s,
-                                t38_rx_indicator_handler_t *rx_indicator_handler,
-                                t38_rx_data_handler_t *rx_data_handler,
-                                t38_rx_missing_handler_t *rx_missing_handler,
-                                void *rx_user_data,
-                                t38_tx_packet_handler_t *tx_packet_handler,
-                                void *tx_packet_user_data);
+SPAN_DECLARE(t38_core_state_t) *t38_core_init(t38_core_state_t *s,
+                                              t38_rx_indicator_handler_t *rx_indicator_handler,
+                                              t38_rx_data_handler_t *rx_data_handler,
+                                              t38_rx_missing_handler_t *rx_missing_handler,
+                                              void *rx_user_data,
+                                              t38_tx_packet_handler_t *tx_packet_handler,
+                                              void *tx_packet_user_data);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t38_gateway.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t38_gateway.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t38_gateway.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t38_gateway.h,v 1.59 2008/10/13 13:14:01 steveu Exp $
+ * $Id: t38_gateway.h,v 1.60 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -82,15 +82,15 @@
     \param tx_packet_handler A callback routine to encapsulate and transmit T.38 packets.
     \param tx_packet_user_data An opaque pointer passed to the tx_packet_handler routine.
     \return A pointer to the termination mode T.38 context, or NULL if there was a problem. */
-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);
+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);
 
 /*! Free a gateway mode T.38 context.
     \brief Free a T.38 context.
     \param s The T.38 context.
     \return 0 for OK, else -1. */
-int t38_gateway_free(t38_gateway_state_t *s);
+SPAN_DECLARE(int) t38_gateway_free(t38_gateway_state_t *s);
 
 /*! Process a block of received FAX audio samples.
     \brief Process a block of received FAX audio samples.
@@ -98,7 +98,7 @@
     \param amp The audio sample buffer.
     \param len The number of samples in the buffer.
     \return The number of samples unprocessed. */
-int t38_gateway_rx(t38_gateway_state_t *s, int16_t amp[], int len);
+SPAN_DECLARE(int) t38_gateway_rx(t38_gateway_state_t *s, int16_t amp[], int len);
 
 /*! Generate a block of FAX audio samples.
     \brief Generate a block of FAX audio samples.
@@ -107,14 +107,14 @@
     \param max_len The number of samples to be generated.
     \return The number of samples actually generated.
 */
-int t38_gateway_tx(t38_gateway_state_t *s, int16_t amp[], int max_len);
+SPAN_DECLARE(int) t38_gateway_tx(t38_gateway_state_t *s, int16_t amp[], int max_len);
 
 /*! Control whether error correcting mode (ECM) is allowed.
     \brief Control whether error correcting mode (ECM) is allowed.
     \param s The T.38 context.
     \param ecm_allowed TRUE is ECM is to be allowed.
 */
-void t38_gateway_set_ecm_capability(t38_gateway_state_t *s, int ecm_allowed);
+SPAN_DECLARE(void) t38_gateway_set_ecm_capability(t38_gateway_state_t *s, int ecm_allowed);
 
 /*! Select whether silent audio will be sent when transmit is idle.
     \brief Select whether silent audio will be sent when transmit is idle.
@@ -123,14 +123,14 @@
            idle. FALSE to transmit zero length audio when the FAX transmitter is idle. The default
            behaviour is FALSE.
 */
-void t38_gateway_set_transmit_on_idle(t38_gateway_state_t *s, int transmit_on_idle);
+SPAN_DECLARE(void) t38_gateway_set_transmit_on_idle(t38_gateway_state_t *s, int transmit_on_idle);
 
 /*! Specify which modem types are supported by a T.30 context.
     \brief Specify supported modems.
     \param s The T.38 context.
     \param supported_modems Bit field list of the supported modems.
 */
-void t38_gateway_set_supported_modems(t38_gateway_state_t *s, int supported_modems);
+SPAN_DECLARE(void) t38_gateway_set_supported_modems(t38_gateway_state_t *s, int supported_modems);
 
 /*! Select whether NSC, NSF, and NSS should be suppressed. It selected, the contents of
     these messages are forced to zero for all octets beyond the message type. This makes
@@ -144,31 +144,31 @@
            frames passing through the gateway from the modem to T.38.
     \param from_modem_len The length of the overwrite string.
 */
-void t38_gateway_set_nsx_suppression(t38_gateway_state_t *s,
-                                     const uint8_t *from_t38,
-                                     int from_t38_len,
-                                     const uint8_t *from_modem,
-                                     int from_modem_len);
+SPAN_DECLARE(void) t38_gateway_set_nsx_suppression(t38_gateway_state_t *s,
+                                                   const uint8_t *from_t38,
+                                                   int from_t38_len,
+                                                   const uint8_t *from_modem,
+                                                   int from_modem_len);
 
 /*! Select whether talker echo protection tone will be sent for the image modems.
     \brief Select whether TEP will be sent for the image modems.
     \param s The T.38 context.
     \param use_tep TRUE if TEP should be sent.
 */
-void t38_gateway_set_tep_mode(t38_gateway_state_t *s, int use_tep);
+SPAN_DECLARE(void) t38_gateway_set_tep_mode(t38_gateway_state_t *s, int use_tep);
 
 /*! Select whether non-ECM fill bits are to be removed during transmission.
     \brief Select whether non-ECM fill bits are to be removed during transmission.
     \param s The T.38 context.
     \param remove TRUE if fill bits are to be removed.
 */
-void t38_gateway_set_fill_bit_removal(t38_gateway_state_t *s, int remove);
+SPAN_DECLARE(void) t38_gateway_set_fill_bit_removal(t38_gateway_state_t *s, int remove);
 
 /*! Get the current transfer statistics for the current T.38 session.
     \brief Get the current transfer statistics.
     \param s The T.38 context.
     \param t A pointer to a buffer for the statistics. */
-void t38_gateway_get_transfer_statistics(t38_gateway_state_t *s, t38_stats_t *t);
+SPAN_DECLARE(void) t38_gateway_get_transfer_statistics(t38_gateway_state_t *s, t38_stats_t *t);
 
 /*! Get a pointer to the T.38 core IFP packet engine associated with a
     gateway mode T.38 context.
@@ -177,14 +177,14 @@
     \param s The T.38 context.
     \return A pointer to the T.38 core context, or NULL.
 */
-t38_core_state_t *t38_gateway_get_t38_core_state(t38_gateway_state_t *s);
+SPAN_DECLARE(t38_core_state_t) *t38_gateway_get_t38_core_state(t38_gateway_state_t *s);
 
 /*! Get a pointer to the logging context associated with a T.38 context.
     \brief Get a pointer to the logging context associated with a T.38 context.
     \param s The T.38 context.
     \return A pointer to the logging context, or NULL.
 */
-logging_state_t *t38_gateway_get_logging_state(t38_gateway_state_t *s);
+SPAN_DECLARE(logging_state_t) *t38_gateway_get_logging_state(t38_gateway_state_t *s);
 
 /*! Set a callback function for T.30 frame exchange monitoring. This is called from the heart
     of the signal processing, so don't take too long in the handler routine.
@@ -192,9 +192,9 @@
     \param s The T.30 context.
     \param handler The callback function.
     \param user_data An opaque pointer passed to the callback function. */
-void t38_gateway_set_real_time_frame_handler(t38_gateway_state_t *s,
-                                             t38_gateway_real_time_frame_handler_t *handler,
-                                             void *user_data);
+SPAN_DECLARE(void) t38_gateway_set_real_time_frame_handler(t38_gateway_state_t *s,
+                                                           t38_gateway_real_time_frame_handler_t *handler,
+                                                           void *user_data);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h	Mon Feb  2 11:40:52 2009
@@ -23,7 +23,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t38_non_ecm_buffer.h,v 1.3 2008/10/13 13:14:01 steveu Exp $
+ * $Id: t38_non_ecm_buffer.h,v 1.4 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -59,41 +59,41 @@
     \param mode TRUE for image data mode, or FALSE for TCF mode.
     \param bits The minimum number of bits per FAX image row.
     \return A pointer to the buffer context, or NULL if there was a problem. */
-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(t38_non_ecm_buffer_state_t) *t38_non_ecm_buffer_init(t38_non_ecm_buffer_state_t *s, int mode, int min_row_bits);
 
 /*! \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.
     \param bits The minimum number of bits per FAX image row. */
-void t38_non_ecm_buffer_set_mode(t38_non_ecm_buffer_state_t *s, int mode, int min_row_bits);
+SPAN_DECLARE(void) t38_non_ecm_buffer_set_mode(t38_non_ecm_buffer_state_t *s, int mode, int min_row_bits);
 
 /*! \brief Inject data to T.38 rate adapting non-ECM buffer context.
     \param s The buffer context.
     \param buf The data buffer to be injected.
     \param len The length of the data to be injected. */
-void t38_non_ecm_buffer_inject(t38_non_ecm_buffer_state_t *s, const uint8_t *buf, int len);
+SPAN_DECLARE(void) t38_non_ecm_buffer_inject(t38_non_ecm_buffer_state_t *s, const uint8_t *buf, int len);
 
 /*! \brief Inform a T.38 rate adapting non-ECM buffer context that the incoming data has finished,
            and the contents of the buffer should be played out as quickly as possible.
     \param s The buffer context. */
-void t38_non_ecm_buffer_push(t38_non_ecm_buffer_state_t *s);
+SPAN_DECLARE(void) t38_non_ecm_buffer_push(t38_non_ecm_buffer_state_t *s);
 
 /*! \brief Report the input status of a T.38 rate adapting non-ECM buffer context to the specified
            logging context.
     \param s The buffer context.
     \param logging The logging context. */
-void t38_non_ecm_buffer_report_input_status(t38_non_ecm_buffer_state_t *s, logging_state_t *logging);
+SPAN_DECLARE(void) t38_non_ecm_buffer_report_input_status(t38_non_ecm_buffer_state_t *s, logging_state_t *logging);
 
 /*! \brief Report the output status of a T.38 rate adapting non-ECM buffer context to the specified
            logging context.
     \param s The buffer context.
     \param logging The logging context. */
-void t38_non_ecm_buffer_report_output_status(t38_non_ecm_buffer_state_t *s, logging_state_t *logging);
+SPAN_DECLARE(void) t38_non_ecm_buffer_report_output_status(t38_non_ecm_buffer_state_t *s, logging_state_t *logging);
 
 /*! \brief Get the next bit of data from a T.38 rate adapting non-ECM buffer context.
     \param user_data The buffer context, cast to a void pointer.
     \return The next bit, or one of the values indicating a change of modem status. */
-int t38_non_ecm_buffer_get_bit(void *user_data);
+SPAN_DECLARE(int) t38_non_ecm_buffer_get_bit(void *user_data);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t38_terminal.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t38_terminal.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t38_terminal.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t38_terminal.h,v 1.39 2008/10/13 13:14:01 steveu Exp $
+ * $Id: t38_terminal.h,v 1.40 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -46,30 +46,30 @@
 {
 #endif
 
-int t38_terminal_send_timeout(t38_terminal_state_t *s, int samples);
+SPAN_DECLARE(int) t38_terminal_send_timeout(t38_terminal_state_t *s, int samples);
 
-void t38_terminal_set_config(t38_terminal_state_t *s, int without_pacing);
+SPAN_DECLARE(void) t38_terminal_set_config(t38_terminal_state_t *s, int without_pacing);
 
 /*! Select whether the time for talker echo protection tone will be allowed for when sending.
     \brief Select whether TEP time will be allowed for.
     \param s The T.38 context.
     \param use_tep TRUE if TEP should be allowed for.
 */
-void t38_terminal_set_tep_mode(t38_terminal_state_t *s, int use_tep);
+SPAN_DECLARE(void) t38_terminal_set_tep_mode(t38_terminal_state_t *s, int use_tep);
 
 /*! Select whether non-ECM fill bits are to be removed during transmission.
     \brief Select whether non-ECM fill bits are to be removed during transmission.
     \param s The T.38 context.
     \param remove TRUE if fill bits are to be removed.
 */
-void t38_terminal_set_fill_bit_removal(t38_terminal_state_t *s, int remove);
+SPAN_DECLARE(void) t38_terminal_set_fill_bit_removal(t38_terminal_state_t *s, int remove);
 
 /*! Get a pointer to the T.30 engine associated with a termination mode T.38 context.
     \brief Get a pointer to the T.30 engine associated with a T.38 context.
     \param s The T.38 context.
     \return A pointer to the T.30 context, or NULL.
 */
-t30_state_t *t38_terminal_get_t30_state(t38_terminal_state_t *s);
+SPAN_DECLARE(t30_state_t) *t38_terminal_get_t30_state(t38_terminal_state_t *s);
 
 /*! Get a pointer to the T.38 core IFP packet engine associated with a
     termination mode T.38 context.
@@ -78,14 +78,14 @@
     \param s The T.38 context.
     \return A pointer to the T.38 core context, or NULL.
 */
-t38_core_state_t *t38_terminal_get_t38_core_state(t38_terminal_state_t *s);
+SPAN_DECLARE(t38_core_state_t) *t38_terminal_get_t38_core_state(t38_terminal_state_t *s);
 
 /*! Get a pointer to the logging context associated with a T.38 context.
     \brief Get a pointer to the logging context associated with a T.38 context.
     \param s The T.38 context.
     \return A pointer to the logging context, or NULL.
 */
-logging_state_t *t38_terminal_get_logging_state(t38_terminal_state_t *s);
+SPAN_DECLARE(logging_state_t) *t38_terminal_get_logging_state(t38_terminal_state_t *s);
 
 /*! \brief Initialise a termination mode T.38 context.
     \param s The T.38 context.
@@ -94,22 +94,22 @@
     \param tx_packet_handler A callback routine to encapsulate and transmit T.38 packets.
     \param tx_packet_user_data An opaque pointer passed to the tx_packet_handler routine.
     \return A pointer to the termination mode T.38 context, or NULL if there was a problem. */
-t38_terminal_state_t *t38_terminal_init(t38_terminal_state_t *s,
-                                        int calling_party,
-                                        t38_tx_packet_handler_t *tx_packet_handler,
-                                        void *tx_packet_user_data);
+SPAN_DECLARE(t38_terminal_state_t) *t38_terminal_init(t38_terminal_state_t *s,
+                                                      int calling_party,
+                                                      t38_tx_packet_handler_t *tx_packet_handler,
+                                                      void *tx_packet_user_data);
 
 /*! Release a termination mode T.38 context.
     \brief Release a T.38 context.
     \param s The T.38 context.
     \return 0 for OK, else -1. */
-int t38_terminal_release(t38_terminal_state_t *s);
+SPAN_DECLARE(int) t38_terminal_release(t38_terminal_state_t *s);
 
 /*! Free a a termination mode T.38 context.
     \brief Free a T.38 context.
     \param s The T.38 context.
     \return 0 for OK, else -1. */
-int t38_terminal_free(t38_terminal_state_t *s);
+SPAN_DECLARE(int) t38_terminal_free(t38_terminal_state_t *s);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t4.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t4.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t4.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t4.h,v 1.53 2008/10/13 13:14:01 steveu Exp $
+ * $Id: t4.h,v 1.54 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -213,97 +213,97 @@
     \param file The name of the file to be received.
     \param output_encoding The output encoding.
     \return A pointer to the context, or NULL if there was a problem. */
-t4_state_t *t4_rx_init(t4_state_t *s, const char *file, int output_encoding);
+SPAN_DECLARE(t4_state_t) *t4_rx_init(t4_state_t *s, const char *file, int output_encoding);
 
 /*! \brief Prepare to receive the next page of the current document.
     \param s The T.4 context.
     \return zero for success, -1 for failure. */
-int t4_rx_start_page(t4_state_t *s);
+SPAN_DECLARE(int) t4_rx_start_page(t4_state_t *s);
 
 /*! \brief Put a bit of the current document page.
     \param s The T.4 context.
     \param bit The data bit.
     \return TRUE when the bit ends the document page, otherwise FALSE. */
-int t4_rx_put_bit(t4_state_t *s, int bit);
+SPAN_DECLARE(int) t4_rx_put_bit(t4_state_t *s, int bit);
 
 /*! \brief Put a byte of the current document page.
     \param s The T.4 context.
     \param byte The data byte.
     \return TRUE when the byte ends the document page, otherwise FALSE. */
-int t4_rx_put_byte(t4_state_t *s, uint8_t byte);
+SPAN_DECLARE(int) t4_rx_put_byte(t4_state_t *s, uint8_t byte);
 
 /*! \brief Put a byte of the current document page.
     \param s The T.4 context.
     \param buf The buffer containing the chunk.
     \param len The length of the chunk.
     \return TRUE when the byte ends the document page, otherwise FALSE. */
-int t4_rx_put_chunk(t4_state_t *s, const uint8_t buf[], int len);
+SPAN_DECLARE(int) t4_rx_put_chunk(t4_state_t *s, const uint8_t buf[], int len);
 
 /*! \brief Complete the reception of a page.
     \param s The T.4 receive context.
     \return 0 for success, otherwise -1. */
-int t4_rx_end_page(t4_state_t *s);
+SPAN_DECLARE(int) t4_rx_end_page(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.
     \param s The T.4 receive context.
     \return 0 for success, otherwise -1. */
-int t4_rx_delete(t4_state_t *s);
+SPAN_DECLARE(int) t4_rx_delete(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. */
-int t4_rx_end(t4_state_t *s);
+SPAN_DECLARE(int) t4_rx_end(t4_state_t *s);
 
-int t4_rx_set_row_write_handler(t4_state_t *s, t4_row_write_handler_t handler, void *user_data);
+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.
     \param s The T.4 context.
     \param encoding The encoding. */
-void t4_rx_set_rx_encoding(t4_state_t *s, int encoding);
+SPAN_DECLARE(void) t4_rx_set_rx_encoding(t4_state_t *s, int encoding);
 
 /*! \brief Set the expected width of the received image, in pixel columns.
     \param s The T.4 context.
     \param width The number of pixels across the image. */
-void t4_rx_set_image_width(t4_state_t *s, int width);
+SPAN_DECLARE(void) t4_rx_set_image_width(t4_state_t *s, int width);
 
 /*! \brief Set the row-to-row (y) resolution to expect for a received image.
     \param s The T.4 context.
     \param resolution The resolution, in pixels per metre. */
-void t4_rx_set_y_resolution(t4_state_t *s, int resolution);
+SPAN_DECLARE(void) t4_rx_set_y_resolution(t4_state_t *s, int resolution);
 
 /*! \brief Set the column-to-column (x) resolution to expect for a received image.
     \param s The T.4 context.
     \param resolution The resolution, in pixels per metre. */
-void t4_rx_set_x_resolution(t4_state_t *s, int resolution);
+SPAN_DECLARE(void) t4_rx_set_x_resolution(t4_state_t *s, int resolution);
 
 /*! \brief Set the DCS information of the fax, for inclusion in the file.
     \param s The T.4 context.
     \param dcs The DCS information, formatted as an ASCII string. */
-void t4_rx_set_dcs(t4_state_t *s, const char *dcs);
+SPAN_DECLARE(void) t4_rx_set_dcs(t4_state_t *s, const char *dcs);
 
 /*! \brief Set the sub-address of the fax, for inclusion in the file.
     \param s The T.4 context.
     \param sub_address The sub-address string. */
-void t4_rx_set_sub_address(t4_state_t *s, const char *sub_address);
+SPAN_DECLARE(void) t4_rx_set_sub_address(t4_state_t *s, const char *sub_address);
 
 /*! \brief Set the identity of the remote machine, for inclusion in the file.
     \param s The T.4 context.
     \param ident The identity string. */
-void t4_rx_set_far_ident(t4_state_t *s, const char *ident);
+SPAN_DECLARE(void) t4_rx_set_far_ident(t4_state_t *s, const char *ident);
 
 /*! \brief Set the vendor of the remote machine, for inclusion in the file.
     \param s The T.4 context.
     \param vendor The vendor string, or NULL. */
-void t4_rx_set_vendor(t4_state_t *s, const char *vendor);
+SPAN_DECLARE(void) t4_rx_set_vendor(t4_state_t *s, const char *vendor);
 
 /*! \brief Set the model of the remote machine, for inclusion in the file.
     \param s The T.4 context.
     \param model The model string, or NULL. */
-void t4_rx_set_model(t4_state_t *s, const char *model);
+SPAN_DECLARE(void) t4_rx_set_model(t4_state_t *s, const char *model);
 
 /*! \brief Prepare for transmission of a document.
     \param s The T.4 context.
@@ -311,28 +311,28 @@
     \param start_page The first page to send. -1 for no restriction.
     \param stop_page The last page to send. -1 for no restriction.
     \return A pointer to the context, or NULL if there was a problem. */
-t4_state_t *t4_tx_init(t4_state_t *s, const char *file, int start_page, int stop_page);
+SPAN_DECLARE(t4_state_t) *t4_tx_init(t4_state_t *s, const char *file, int start_page, int stop_page);
 
 /*! \brief Prepare to send the next page of the current document.
     \param s The T.4 context.
     \return zero for success, -1 for failure. */
-int t4_tx_start_page(t4_state_t *s);
+SPAN_DECLARE(int) t4_tx_start_page(t4_state_t *s);
 
 /*! \brief Prepare the current page for a resend.
     \param s The T.4 context.
     \return zero for success, -1 for failure. */
-int t4_tx_restart_page(t4_state_t *s);
+SPAN_DECLARE(int) t4_tx_restart_page(t4_state_t *s);
 
 /*! \brief Check for the existance of the next page. This information can
     be needed before it is determined that the current page is finished with.
     \param s The T.4 context.
     \return zero for next page found, -1 for failure. */
-int t4_tx_more_pages(t4_state_t *s);
+SPAN_DECLARE(int) t4_tx_more_pages(t4_state_t *s);
 
 /*! \brief Complete the sending of a page.
     \param s The T.4 context.
     \return zero for success, -1 for failure. */
-int t4_tx_end_page(t4_state_t *s);
+SPAN_DECLARE(int) t4_tx_end_page(t4_state_t *s);
 
 /*! \brief Get the next bit of the current document page. The document will
            be padded for the current minimum scan line time. If the
@@ -341,7 +341,7 @@
     \param s The T.4 context.
     \return The next bit (i.e. 0 or 1). For the last bit of data, bit 1 is
             set (i.e. the returned value is 2 or 3). */
-int t4_tx_get_bit(t4_state_t *s);
+SPAN_DECLARE(int) t4_tx_get_bit(t4_state_t *s);
 
 /*! \brief Get the next byte of the current document page. The document will
            be padded for the current minimum scan line time. If the
@@ -351,7 +351,7 @@
     \return The next byte. For the last byte of data, bit 8 is
             set. In this case, one or more bits of the byte may be padded with
             zeros, to complete the byte. */
-int t4_tx_get_byte(t4_state_t *s);
+SPAN_DECLARE(int) t4_tx_get_byte(t4_state_t *s);
 
 /*! \brief Get the next chunk of the current document page. The document will
            be padded for the current minimum scan line time. If the
@@ -362,7 +362,7 @@
     \param max_len The maximum length of the chunk.
     \return The actual length of the chunk. If this is less than max_len it 
             indicates that the end of the document has been reached. */
-int t4_tx_get_chunk(t4_state_t *s, uint8_t buf[], int max_len);
+SPAN_DECLARE(int) t4_tx_get_chunk(t4_state_t *s, uint8_t buf[], int max_len);
 
 /*! \brief Return the next bit of the current document page, without actually
            moving forward in the buffer. The document will be padded for the
@@ -372,37 +372,37 @@
     \param s The T.4 context.
     \return The next bit (i.e. 0 or 1). For the last bit of data, bit 1 is
             set (i.e. the returned value is 2 or 3). */
-int t4_tx_check_bit(t4_state_t *s);
+SPAN_DECLARE(int) t4_tx_check_bit(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.
     \param s The T.4 context.
     \return 0 for success, otherwise -1. */
-int t4_tx_delete(t4_state_t *s);
+SPAN_DECLARE(int) t4_tx_delete(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. */
-int t4_tx_end(t4_state_t *s);
+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. */
-void t4_tx_set_tx_encoding(t4_state_t *s, int encoding);
+SPAN_DECLARE(void) t4_tx_set_tx_encoding(t4_state_t *s, int encoding);
 
 /*! \brief Set the minimum number of encoded bits per row. This allows the
            makes the encoding process to be set to comply with the minimum row
            time specified by a remote receiving machine.
     \param s The T.4 context.
     \param bits The minimum number of bits per row. */
-void t4_tx_set_min_row_bits(t4_state_t *s, int bits);
+SPAN_DECLARE(void) t4_tx_set_min_row_bits(t4_state_t *s, int bits);
 
 /*! \brief Set the identity of the local machine, for inclusion in page headers.
     \param s The T.4 context.
     \param ident The identity string. */
-void t4_tx_set_local_ident(t4_state_t *s, const char *ident);
+SPAN_DECLARE(void) t4_tx_set_local_ident(t4_state_t *s, const char *ident);
 
 /*! Set the info field, included in the header line included in each page of an encoded
     FAX. This is a string of up to 50 characters. Other information (date, local ident, etc.)
@@ -411,41 +411,41 @@
     \brief Set the header info.
     \param s The T.4 context.
     \param info A string, of up to 50 bytes, which will form the info field. */
-void t4_tx_set_header_info(t4_state_t *s, const char *info);
+SPAN_DECLARE(void) t4_tx_set_header_info(t4_state_t *s, const char *info);
 
-int t4_tx_set_row_read_handler(t4_state_t *s, t4_row_read_handler_t handler, void *user_data);
+SPAN_DECLARE(int) t4_tx_set_row_read_handler(t4_state_t *s, t4_row_read_handler_t handler, void *user_data);
 
 /*! \brief Get the row-to-row (y) resolution of the current page.
     \param s The T.4 context.
     \return The resolution, in pixels per metre. */
-int t4_tx_get_y_resolution(t4_state_t *s);
+SPAN_DECLARE(int) t4_tx_get_y_resolution(t4_state_t *s);
 
 /*! \brief Get the column-to-column (x) resolution of the current page.
     \param s The T.4 context.
     \return The resolution, in pixels per metre. */
-int t4_tx_get_x_resolution(t4_state_t *s);
+SPAN_DECLARE(int) t4_tx_get_x_resolution(t4_state_t *s);
 
 /*! \brief Get the width of the current page, in pixel columns.
     \param s The T.4 context.
     \return The number of columns. */
-int t4_tx_get_image_width(t4_state_t *s);
+SPAN_DECLARE(int) t4_tx_get_image_width(t4_state_t *s);
 
 /*! \brief Get the number of pages in the file.
     \param s The T.4 context.
     \return The number of pages, or -1 if there is an error. */
-int t4_tx_get_pages_in_file(t4_state_t *s);
+SPAN_DECLARE(int) t4_tx_get_pages_in_file(t4_state_t *s);
 
 /*! Get the current image transfer statistics. 
     \brief Get the current transfer statistics.
     \param s The T.4 context.
     \param t A pointer to a statistics structure. */
-void t4_get_transfer_statistics(t4_state_t *s, t4_stats_t *t);
+SPAN_DECLARE(void) t4_get_transfer_statistics(t4_state_t *s, t4_stats_t *t);
 
 /*! Get the short text name of an encoding format. 
     \brief Get the short text name of an encoding format.
     \param encoding The encoding type.
     \return A pointer to the string. */
-const char *t4_encoding_to_str(int encoding);
+SPAN_DECLARE(const char) *t4_encoding_to_str(int encoding);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/telephony.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/telephony.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/telephony.h	Mon Feb  2 11:40:52 2009
@@ -22,20 +22,37 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: telephony.h,v 1.13 2009/01/19 17:14:10 steveu Exp $
+ * $Id: telephony.h,v 1.15 2009/01/31 12:12:21 steveu Exp $
  */
 
 #if !defined(_SPANDSP_TELEPHONY_H_)
 #define _SPANDSP_TELEPHONY_H_
 
-#define SAMPLE_RATE             8000
+#if defined(SPANDSP_USE_EXPORT_CAPABILITY)
+#if defined(__GNUC__) || defined(__SUNCC__)
+#define SPAN_DECLARE(type)          __attribute__((visibility("default"))) type
+#define SPAN_DECLARE_NONSTD(type)   __attribute__((visibility("default"))) type
+#define SPAN_DECLARE_DATA           __attribute__((visibility("default")))
+#endif
+#if defined(WIN32)
+#define SPAN_DECLARE(type)          __declspec(dllexport) type __stdcall
+#define SPAN_DECLARE_NONSTD(type)   __declspec(dllexport) type __cdecl
+#define SPAN_DECLARE_DATA           __declspec(dllexport)
+#endif
+#else
+#define SPAN_DECLARE(type)		    /**/ type
+#define SPAN_DECLARE_NONSTD(type)	/**/ type
+#define SPAN_DECLARE_DATA		    /**/
+#endif
+
+#define SAMPLE_RATE                 8000
 
 /* This is based on A-law, but u-law is only 0.03dB different */
-#define DBM0_MAX_POWER          (3.14f + 3.02f)
-#define DBM0_MAX_SINE_POWER     (3.14f)
+#define DBM0_MAX_POWER              (3.14f + 3.02f)
+#define DBM0_MAX_SINE_POWER         (3.14f)
 /* This is based on the ITU definition of dbOv in G.100.1 */
-#define DBOV_MAX_POWER          (0.0f)
-#define DBOV_MAX_SINE_POWER     (-3.02f)
+#define DBOV_MAX_POWER              (0.0f)
+#define DBOV_MAX_SINE_POWER         (-3.02f)
 
 /*! \brief A handler for pure receive. The buffer cannot be altered. */
 typedef int (span_rx_handler_t)(void *s, const int16_t amp[], int len);
@@ -46,8 +63,8 @@
 /*! \brief A handler for transmit, where the buffer will be filled. */
 typedef int (span_tx_handler_t)(void *s, int16_t amp[], int max_len);
 
-#define ms_to_samples(t)    (((t)*SAMPLE_RATE)/1000)
-#define us_to_samples(t)    (((t)*SAMPLE_RATE)/1000000)
+#define ms_to_samples(t)            (((t)*SAMPLE_RATE)/1000)
+#define us_to_samples(t)            (((t)*SAMPLE_RATE)/1000000)
 
 #if !defined(FALSE)
 #define FALSE 0
@@ -58,7 +75,7 @@
 
 #if defined(__cplusplus)
 /* C++ doesn't seem to have sane rounding functions/macros yet */
-#ifndef _MSC_VER
+#if !defined(WIN32)
 #define lrint(x) ((long int) (x))
 #define lrintf(x) ((long int) (x))
 #endif

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/time_scale.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/time_scale.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/time_scale.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: time_scale.h,v 1.17 2008/11/15 14:27:29 steveu Exp $
+ * $Id: time_scale.h,v 1.18 2009/01/31 08:48:11 steveu Exp $
  */
 
 #if !defined(_SPANDSP_TIME_SCALE_H_)
@@ -71,19 +71,19 @@
     \param sample_rate The sample rate of the signal.
     \param playout_rate The ratio between the output speed and the input speed.
     \return A pointer to the context, or NULL if there was a problem. */
-time_scale_state_t *time_scale_init(time_scale_state_t *s, int sample_rate, float playout_rate);
+SPAN_DECLARE(time_scale_state_t) *time_scale_init(time_scale_state_t *s, int sample_rate, float playout_rate);
 
 /*! \brief Free a time scale context.
     \param s The time scale context.
     \return 0 for OK, else -1. */
-int time_scale_free(time_scale_state_t *s);
+SPAN_DECLARE(int) time_scale_free(time_scale_state_t *s);
 
 /*! Change the time scale rate.
     \brief Change the time scale rate.
     \param s The time scale context.
     \param playout_rate The ratio between the output speed and the input speed.
     \return 0 if changed OK, else -1. */
-int time_scale_rate(time_scale_state_t *s, float playout_rate);
+SPAN_DECLARE(int) time_scale_rate(time_scale_state_t *s, float playout_rate);
 
 /*! Find the maximum possible samples which could result from scaling the specified
     number of input samples, at the current playback rate.
@@ -91,7 +91,7 @@
     \param s The time scale context.
     \param input_len The number of input samples.
     \return The maximum possible output samples. */
-int time_scale_max_output_len(time_scale_state_t *s, int input_len);
+SPAN_DECLARE(int) time_scale_max_output_len(time_scale_state_t *s, int input_len);
 
 /*! Time scale a chunk of audio samples.
     \brief Time scale a chunk of audio samples.
@@ -103,7 +103,7 @@
     \param len The number of input samples.
     \return The number of output samples.
 */
-int time_scale(time_scale_state_t *s, int16_t out[], int16_t in[], int len);
+SPAN_DECLARE(int) time_scale(time_scale_state_t *s, int16_t out[], int16_t in[], int len);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/tone_detect.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/tone_detect.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/tone_detect.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: tone_detect.h,v 1.42 2008/11/30 10:17:31 steveu Exp $
+ * $Id: tone_detect.h,v 1.43 2009/01/31 08:48:11 steveu Exp $
  */
 
 #if !defined(_SPANDSP_TONE_DETECT_H_)
@@ -187,7 +187,7 @@
     \param window_len The length of the periodogram window. This must be an even number.
     \return The number of generated coefficients.
 */
-int periodogram_generate_coeffs(complexf_t coeffs[], float freq, int sample_rate, int window_len);
+SPAN_DECLARE(int) periodogram_generate_coeffs(complexf_t coeffs[], float freq, int sample_rate, int window_len);
 
 /*! Generate the phase offset to be expected between successive periodograms evaluated at the 
     specified interval.
@@ -197,7 +197,7 @@
     \param interval The interval between periodograms, in samples.
     \return The scaling factor.
 */
-float periodogram_generate_phase_offset(complexf_t *offset, float freq, int sample_rate, int interval);
+SPAN_DECLARE(float) periodogram_generate_phase_offset(complexf_t *offset, float freq, int sample_rate, int interval);
 
 /*! Evaluate a periodogram.
     \param coeffs A set of coefficients generated by periodogram_generate_coeffs().
@@ -205,7 +205,7 @@
     \param len The length of the periodogram, in samples. This must be an even number.
     \return The periodogram result.
 */
-complexf_t periodogram(const complexf_t coeffs[], const complexf_t amp[], int len);
+SPAN_DECLARE(complexf_t) periodogram(const complexf_t coeffs[], const complexf_t amp[], int len);
 
 /*! Prepare data for evaluating a set of periodograms.
     \param sum A vector of sums of pairs of signal samples. This will be half the length of len.
@@ -214,7 +214,7 @@
     \param len The length of the periodogram, in samples. This must be an even number.
     \return The length of the vectors sum and diff.
 */
-int periodogram_prepare(complexf_t sum[], complexf_t diff[], const complexf_t amp[], int len);
+SPAN_DECLARE(int) periodogram_prepare(complexf_t sum[], complexf_t diff[], const complexf_t amp[], int len);
 
 /*! Evaluate a periodogram, based on data prepared by periodogram_prepare(). This is more efficient
     than using periodogram() when several periodograms are to be applied to the same signal.
@@ -224,7 +224,7 @@
     \param len The length of the periodogram, in samples. This must be an even number.
     \return The periodogram result.
 */
-complexf_t periodogram_apply(const complexf_t coeffs[], const complexf_t sum[], const complexf_t diff[], int len);
+SPAN_DECLARE(complexf_t) periodogram_apply(const complexf_t coeffs[], const complexf_t sum[], const complexf_t diff[], int len);
 
 /*! Apply a phase offset, to find the frequency error between periodogram evaluations.
     specified interval.
@@ -234,7 +234,7 @@
     \param result A pointer to the current periodogram result.
     \return The frequency error, in Hz.
 */
-float periodogram_freq_error(const complexf_t *phase_offset, float scale, const complexf_t *last_result, const complexf_t *result);
+SPAN_DECLARE(float) periodogram_freq_error(const complexf_t *phase_offset, float scale, const complexf_t *last_result, const complexf_t *result);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/tone_generate.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/tone_generate.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/tone_generate.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: tone_generate.h,v 1.35 2008/11/30 10:17:31 steveu Exp $
+ * $Id: tone_generate.h,v 1.36 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -77,20 +77,20 @@
     \param d3 x
     \param d4 x
     \param repeat x */
-void make_tone_gen_descriptor(tone_gen_descriptor_t *s,
-                              int f1,
-                              int l1,
-                              int f2,
-                              int l2,
-                              int d1,
-                              int d2,
-                              int d3,
-                              int d4,
-                              int repeat);
+SPAN_DECLARE(void) make_tone_gen_descriptor(tone_gen_descriptor_t *s,
+                                            int f1,
+                                            int l1,
+                                            int f2,
+                                            int l2,
+                                            int d1,
+                                            int d2,
+                                            int d3,
+                                            int d4,
+                                            int repeat);
 
-tone_gen_state_t *tone_gen_init(tone_gen_state_t *s, tone_gen_descriptor_t *t);
+SPAN_DECLARE(tone_gen_state_t) *tone_gen_init(tone_gen_state_t *s, tone_gen_descriptor_t *t);
 
-int tone_gen(tone_gen_state_t *s, int16_t amp[], int max_samples);
+SPAN_DECLARE(int) tone_gen(tone_gen_state_t *s, int16_t amp[], int max_samples);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v17rx.h,v 1.58 2008/10/13 13:14:01 steveu Exp $
+ * $Id: v17rx.h,v 1.59 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -243,7 +243,7 @@
     \param put_bit The callback routine used to put the received data.
     \param user_data An opaque pointer passed to the put_bit routine.
     \return A pointer to the modem context, or NULL if there was a problem. */
-v17_rx_state_t *v17_rx_init(v17_rx_state_t *s, int bit_rate, put_bit_func_t put_bit, void *user_data);
+SPAN_DECLARE(v17_rx_state_t) *v17_rx_init(v17_rx_state_t *s, int bit_rate, put_bit_func_t put_bit, void *user_data);
 
 /*! Reinitialise an existing V.17 modem receive context.
     \brief Reinitialise an existing V.17 modem receive context.
@@ -251,29 +251,29 @@
     \param bit_rate The bit rate of the modem. Valid values are 7200, 9600, 12000 and 14400.
     \param short_train TRUE if a short training sequence is expected.
     \return 0 for OK, -1 for bad parameter */
-int v17_rx_restart(v17_rx_state_t *s, int bit_rate, int short_train);
+SPAN_DECLARE(int) v17_rx_restart(v17_rx_state_t *s, int bit_rate, int short_train);
 
 /*! Free a V.17 modem receive context.
     \brief Free a V.17 modem receive context.
     \param s The modem context.
     \return 0 for OK */
-int v17_rx_free(v17_rx_state_t *s);
+SPAN_DECLARE(int) v17_rx_free(v17_rx_state_t *s);
 
-logging_state_t *v17_rx_get_logging_state(v17_rx_state_t *s);
+SPAN_DECLARE(logging_state_t) *v17_rx_get_logging_state(v17_rx_state_t *s);
 
 /*! Change the put_bit function associated with a V.17 modem receive context.
     \brief Change the put_bit function associated with a V.17 modem receive context.
     \param s The modem context.
     \param put_bit The callback routine used to handle received bits.
     \param user_data An opaque pointer. */
-void v17_rx_set_put_bit(v17_rx_state_t *s, put_bit_func_t put_bit, void *user_data);
+SPAN_DECLARE(void) v17_rx_set_put_bit(v17_rx_state_t *s, put_bit_func_t put_bit, void *user_data);
 
 /*! Change the modem status report function associated with a V.17 modem receive context.
     \brief Change the modem status report function associated with a V.17 modem receive context.
     \param s The modem context.
     \param handler The callback routine used to report modem status changes.
     \param user_data An opaque pointer. */
-void v17_rx_set_modem_status_handler(v17_rx_state_t *s, modem_rx_status_func_t handler, void *user_data);
+SPAN_DECLARE(void) v17_rx_set_modem_status_handler(v17_rx_state_t *s, modem_rx_status_func_t handler, void *user_data);
 
 /*! Process a block of received V.17 modem audio samples.
     \brief Process a block of received V.17 modem audio samples.
@@ -282,7 +282,7 @@
     \param len The number of samples in the buffer.
     \return The number of samples unprocessed.
 */
-int v17_rx(v17_rx_state_t *s, const int16_t amp[], int len);
+SPAN_DECLARE(int) v17_rx(v17_rx_state_t *s, const int16_t amp[], int len);
 
 /*! Get a snapshot of the current equalizer coefficients.
     \brief Get a snapshot of the current equalizer coefficients.
@@ -290,36 +290,36 @@
     \param coeffs The vector of complex coefficients.
     \return The number of coefficients in the vector. */
 #if defined(SPANDSP_USE_FIXED_POINTx)
-int v17_rx_equalizer_state(v17_rx_state_t *s, complexi_t **coeffs);
+SPAN_DECLARE(int) v17_rx_equalizer_state(v17_rx_state_t *s, complexi_t **coeffs);
 #else
-int v17_rx_equalizer_state(v17_rx_state_t *s, complexf_t **coeffs);
+SPAN_DECLARE(int) v17_rx_equalizer_state(v17_rx_state_t *s, complexf_t **coeffs);
 #endif
 
 /*! Get the current received carrier frequency.
     \param s The modem context.
     \return The frequency, in Hertz. */
-float v17_rx_carrier_frequency(v17_rx_state_t *s);
+SPAN_DECLARE(float) v17_rx_carrier_frequency(v17_rx_state_t *s);
 
 /*! Get the current symbol timing correction since startup.
     \param s The modem context.
     \return The correction. */
-float v17_rx_symbol_timing_correction(v17_rx_state_t *s);
+SPAN_DECLARE(float) v17_rx_symbol_timing_correction(v17_rx_state_t *s);
 
 /*! Get a current received signal power.
     \param s The modem context.
     \return The signal power, in dBm0. */
-float v17_rx_signal_power(v17_rx_state_t *s);
+SPAN_DECLARE(float) v17_rx_signal_power(v17_rx_state_t *s);
 
 /*! Set the power level at which the carrier detection will cut in
     \param s The modem context.
     \param cutoff The signal cutoff power, in dBm0. */
-void v17_rx_signal_cutoff(v17_rx_state_t *s, float cutoff);
+SPAN_DECLARE(void) v17_rx_signal_cutoff(v17_rx_state_t *s, float cutoff);
 
 /*! Set a handler routine to process QAM status reports
     \param s The modem context.
     \param handler The handler routine.
     \param user_data An opaque pointer passed to the handler routine. */
-void v17_rx_set_qam_report_handler(v17_rx_state_t *s, qam_report_handler_t handler, void *user_data);
+SPAN_DECLARE(void) v17_rx_set_qam_report_handler(v17_rx_state_t *s, qam_report_handler_t handler, void *user_data);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v17tx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v17tx.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v17tx.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v17tx.h,v 1.37 2008/10/13 13:14:01 steveu Exp $
+ * $Id: v17tx.h,v 1.38 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -98,7 +98,7 @@
     \brief Adjust a V.17 modem transmit context's output power.
     \param s The modem context.
     \param power The power level, in dBm0 */
-void v17_tx_power(v17_tx_state_t *s, float power);
+SPAN_DECLARE(void) v17_tx_power(v17_tx_state_t *s, float power);
 
 /*! Initialise a V.17 modem transmit context. This must be called before the first
     use of the context, to initialise its contents.
@@ -109,7 +109,7 @@
     \param get_bit The callback routine used to get the data to be transmitted.
     \param user_data An opaque pointer.
     \return A pointer to the modem context, or NULL if there was a problem. */
-v17_tx_state_t *v17_tx_init(v17_tx_state_t *s, int rate, int tep, get_bit_func_t get_bit, void *user_data);
+SPAN_DECLARE(v17_tx_state_t) *v17_tx_init(v17_tx_state_t *s, int rate, int tep, get_bit_func_t get_bit, void *user_data);
 
 /*! Reinitialise an existing V.17 modem transmit context, so it may be reused.
     \brief Reinitialise an existing V.17 modem transmit context.
@@ -118,29 +118,29 @@
     \param tep TRUE is the optional TEP tone is to be transmitted.
     \param short_train TRUE if the short training sequence should be used.
     \return 0 for OK, -1 for parameter error. */
-int v17_tx_restart(v17_tx_state_t *s, int bit_rate, int tep, int short_train);
+SPAN_DECLARE(int) v17_tx_restart(v17_tx_state_t *s, int bit_rate, int tep, int short_train);
 
 /*! Free a V.17 modem transmit context.
     \brief Free a V.17 modem transmit context.
     \param s The modem context.
     \return 0 for OK */
-int v17_tx_free(v17_tx_state_t *s);
+SPAN_DECLARE(int) v17_tx_free(v17_tx_state_t *s);
 
-logging_state_t *v17_tx_get_logging_state(v17_tx_state_t *s);
+SPAN_DECLARE(logging_state_t) *v17_tx_get_logging_state(v17_tx_state_t *s);
 
 /*! Change the get_bit function associated with a V.17 modem transmit context.
     \brief Change the get_bit function associated with a V.17 modem transmit context.
     \param s The modem context.
     \param get_bit The callback routine used to get the data to be transmitted.
     \param user_data An opaque pointer. */
-void v17_tx_set_get_bit(v17_tx_state_t *s, get_bit_func_t get_bit, void *user_data);
+SPAN_DECLARE(void) v17_tx_set_get_bit(v17_tx_state_t *s, get_bit_func_t get_bit, void *user_data);
 
 /*! Change the modem status report function associated with a V.17 modem transmit context.
     \brief Change the modem status report function associated with a V.17 modem transmit context.
     \param s The modem context.
     \param handler The callback routine used to report modem status changes.
     \param user_data An opaque pointer. */
-void v17_tx_set_modem_status_handler(v17_tx_state_t *s, modem_tx_status_func_t handler, void *user_data);
+SPAN_DECLARE(void) v17_tx_set_modem_status_handler(v17_tx_state_t *s, modem_tx_status_func_t handler, void *user_data);
 
 /*! Generate a block of V.17 modem audio samples.
     \brief Generate a block of V.17 modem audio samples.
@@ -149,7 +149,7 @@
     \param len The number of samples to be generated.
     \return The number of samples actually generated.
 */
-int v17_tx(v17_tx_state_t *s, int16_t amp[], int len);
+SPAN_DECLARE(int) v17_tx(v17_tx_state_t *s, int16_t amp[], int len);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v22bis.h,v 1.32 2008/11/30 03:40:12 steveu Exp $
+ * $Id: v22bis.h,v 1.33 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -75,7 +75,7 @@
     \param s The modem context.
     \param bit_rate The bit rate of the modem. Valid values are 1200 and 2400.
     \return 0 for OK, -1 for bad parameter */
-int v22bis_rx_restart(v22bis_state_t *s, int bit_rate);
+SPAN_DECLARE(int) v22bis_rx_restart(v22bis_state_t *s, int bit_rate);
 
 /*! Process a block of received V.22bis modem audio samples.
     \brief Process a block of received V.22bis modem audio samples.
@@ -83,34 +83,34 @@
     \param amp The audio sample buffer.
     \param len The number of samples in the buffer.
     \return The number of samples unprocessed. */
-int v22bis_rx(v22bis_state_t *s, const int16_t amp[], int len);
+SPAN_DECLARE(int) v22bis_rx(v22bis_state_t *s, const int16_t amp[], int len);
 
 /*! Get a snapshot of the current equalizer coefficients.
     \brief Get a snapshot of the current equalizer coefficients.
     \param coeffs The vector of complex coefficients.
     \return The number of coefficients in the vector. */
-int v22bis_equalizer_state(v22bis_state_t *s, complexf_t **coeffs);
+SPAN_DECLARE(int) v22bis_equalizer_state(v22bis_state_t *s, complexf_t **coeffs);
 
 /*! Get the current received carrier frequency.
     \param s The modem context.
     \return The frequency, in Hertz. */
-float v22bis_rx_carrier_frequency(v22bis_state_t *s);
+SPAN_DECLARE(float) v22bis_rx_carrier_frequency(v22bis_state_t *s);
 
 /*! Get the current symbol timing correction since startup.
     \param s The modem context.
     \return The correction. */
-float v22bis_symbol_timing_correction(v22bis_state_t *s);
+SPAN_DECLARE(float) v22bis_symbol_timing_correction(v22bis_state_t *s);
 
 /*! Get a current received signal power.
     \param s The modem context.
     \return The signal power, in dBm0. */
-float v22bis_rx_signal_power(v22bis_state_t *s);
+SPAN_DECLARE(float) v22bis_rx_signal_power(v22bis_state_t *s);
 
 /*! Set a handler routine to process QAM status reports
     \param s The modem context.
     \param handler The handler routine.
     \param user_data An opaque pointer passed to the handler routine. */
-void v22bis_set_qam_report_handler(v22bis_state_t *s, qam_report_handler_t handler, void *user_data);
+SPAN_DECLARE(void) v22bis_set_qam_report_handler(v22bis_state_t *s, qam_report_handler_t handler, void *user_data);
 
 /*! Generate a block of V.22bis modem audio samples.
     \brief Generate a block of V.22bis modem audio samples.
@@ -118,20 +118,20 @@
     \param amp The audio sample buffer.
     \param len The number of samples to be generated.
     \return The number of samples actually generated. */
-int v22bis_tx(v22bis_state_t *s, int16_t amp[], int len);
+SPAN_DECLARE(int) v22bis_tx(v22bis_state_t *s, int16_t amp[], int len);
 
 /*! Adjust a V.22bis modem transmit context's power output.
     \brief Adjust a V.22bis modem transmit context's output power.
     \param s The modem context.
     \param power The power level, in dBm0 */
-void v22bis_tx_power(v22bis_state_t *s, float power);
+SPAN_DECLARE(void) v22bis_tx_power(v22bis_state_t *s, float power);
 
 /*! Reinitialise an existing V.22bis modem context, so it may be reused.
     \brief Reinitialise an existing V.22bis modem context.
     \param s The modem context.
     \param bit_rate The bit rate of the modem. Valid values are 1200 and 2400.
     \return 0 for OK, -1 for bad parameter. */
-int v22bis_restart(v22bis_state_t *s, int bit_rate);
+SPAN_DECLARE(int) v22bis_restart(v22bis_state_t *s, int bit_rate);
 
 /*! Initialise a V.22bis modem context. This must be called before the first
     use of the context, to initialise its contents.
@@ -144,35 +144,35 @@
     \param put_bit The callback routine used to get the data to be transmitted.
     \param user_data An opaque pointer, passed in calls to the get and put routines.
     \return A pointer to the modem context, or NULL if there was a problem. */
-v22bis_state_t *v22bis_init(v22bis_state_t *s,
-                            int bit_rate,
-                            int guard,
-                            int caller,
-                            get_bit_func_t get_bit,
-                            put_bit_func_t put_bit,
-                            void *user_data);
+SPAN_DECLARE(v22bis_state_t) *v22bis_init(v22bis_state_t *s,
+                                          int bit_rate,
+                                          int guard,
+                                          int caller,
+                                          get_bit_func_t get_bit,
+                                          put_bit_func_t put_bit,
+                                          void *user_data);
 
 /*! Free a V.22bis modem receive context.
     \brief Free a V.22bis modem receive context.
     \param s The modem context.
     \return 0 for OK */
-int v22bis_free(v22bis_state_t *s);
+SPAN_DECLARE(int) v22bis_free(v22bis_state_t *s);
 
-logging_state_t *v22bis_get_logging_state(v22bis_state_t *s);
+SPAN_DECLARE(logging_state_t) *v22bis_get_logging_state(v22bis_state_t *s);
 
 /*! Change the get_bit function associated with a V.22bis modem context.
     \brief Change the get_bit function associated with a V.22bis modem context.
     \param s The modem context.
     \param get_bit The callback routine used to get the data to be transmitted.
     \param user_data An opaque pointer. */
-void v22bis_set_get_bit(v22bis_state_t *s, get_bit_func_t get_bit, void *user_data);
+SPAN_DECLARE(void) v22bis_set_get_bit(v22bis_state_t *s, get_bit_func_t get_bit, void *user_data);
 
 /*! Change the get_bit function associated with a V.22bis modem context.
     \brief Change the put_bit function associated with a V.22bis modem context.
     \param s The modem context.
     \param put_bit The callback routine used to process the data received.
     \param user_data An opaque pointer. */
-void v22bis_set_put_bit(v22bis_state_t *s, put_bit_func_t put_bit, void *user_data);
+SPAN_DECLARE(void) v22bis_set_put_bit(v22bis_state_t *s, put_bit_func_t put_bit, void *user_data);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v27ter_rx.h,v 1.54 2008/10/13 13:14:01 steveu Exp $
+ * $Id: v27ter_rx.h,v 1.55 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -78,7 +78,7 @@
     \param put_bit The callback routine used to put the received data.
     \param user_data An opaque pointer passed to the put_bit routine.
     \return A pointer to the modem context, or NULL if there was a problem. */
-v27ter_rx_state_t *v27ter_rx_init(v27ter_rx_state_t *s, int bit_rate, put_bit_func_t put_bit, void *user_data);
+SPAN_DECLARE(v27ter_rx_state_t) *v27ter_rx_init(v27ter_rx_state_t *s, int bit_rate, put_bit_func_t put_bit, void *user_data);
 
 /*! Reinitialise an existing V.27ter modem receive context.
     \brief Reinitialise an existing V.27ter modem receive context.
@@ -86,29 +86,29 @@
     \param bit_rate The bit rate of the modem. Valid values are 2400 and 4800.
     \param old_train TRUE if a previous trained values are to be reused.
     \return 0 for OK, -1 for bad parameter */
-int v27ter_rx_restart(v27ter_rx_state_t *s, int bit_rate, int old_train);
+SPAN_DECLARE(int) v27ter_rx_restart(v27ter_rx_state_t *s, int bit_rate, int old_train);
 
 /*! Free a V.27ter modem receive context.
     \brief Free a V.27ter modem receive context.
     \param s The modem context.
     \return 0 for OK */
-int v27ter_rx_free(v27ter_rx_state_t *s);
+SPAN_DECLARE(int) v27ter_rx_free(v27ter_rx_state_t *s);
 
-logging_state_t *v27ter_rx_get_logging_state(v27ter_rx_state_t *s);
+SPAN_DECLARE(logging_state_t) *v27ter_rx_get_logging_state(v27ter_rx_state_t *s);
 
 /*! Change the put_bit function associated with a V.27ter modem receive context.
     \brief Change the put_bit function associated with a V.27ter modem receive context.
     \param s The modem context.
     \param put_bit The callback routine used to handle received bits.
     \param user_data An opaque pointer. */
-void v27ter_rx_set_put_bit(v27ter_rx_state_t *s, put_bit_func_t put_bit, void *user_data);
+SPAN_DECLARE(void) v27ter_rx_set_put_bit(v27ter_rx_state_t *s, put_bit_func_t put_bit, void *user_data);
 
 /*! Change the modem status report function associated with a V.27ter modem receive context.
     \brief Change the modem status report function associated with a V.27ter modem receive context.
     \param s The modem context.
     \param handler The callback routine used to report modem status changes.
     \param user_data An opaque pointer. */
-void v27ter_rx_set_modem_status_handler(v27ter_rx_state_t *s, modem_rx_status_func_t handler, void *user_data);
+SPAN_DECLARE(void) v27ter_rx_set_modem_status_handler(v27ter_rx_state_t *s, modem_rx_status_func_t handler, void *user_data);
 
 /*! Process a block of received V.27ter modem audio samples.
     \brief Process a block of received V.27ter modem audio samples.
@@ -117,39 +117,39 @@
     \param len The number of samples in the buffer.
     \return The number of samples unprocessed.
 */
-int v27ter_rx(v27ter_rx_state_t *s, const int16_t amp[], int len);
+SPAN_DECLARE(int) v27ter_rx(v27ter_rx_state_t *s, const int16_t amp[], int len);
 
 /*! Get a snapshot of the current equalizer coefficients.
     \brief Get a snapshot of the current equalizer coefficients.
     \param coeffs The vector of complex coefficients.
     \return The number of coefficients in the vector. */
-int v27ter_rx_equalizer_state(v27ter_rx_state_t *s, complexf_t **coeffs);
+SPAN_DECLARE(int) v27ter_rx_equalizer_state(v27ter_rx_state_t *s, complexf_t **coeffs);
 
 /*! Get the current received carrier frequency.
     \param s The modem context.
     \return The frequency, in Hertz. */
-float v27ter_rx_carrier_frequency(v27ter_rx_state_t *s);
+SPAN_DECLARE(float) v27ter_rx_carrier_frequency(v27ter_rx_state_t *s);
 
 /*! Get the current symbol timing correction since startup.
     \param s The modem context.
     \return The correction. */
-float v27ter_rx_symbol_timing_correction(v27ter_rx_state_t *s);
+SPAN_DECLARE(float) v27ter_rx_symbol_timing_correction(v27ter_rx_state_t *s);
 
 /*! Get a current received signal power.
     \param s The modem context.
     \return The signal power, in dBm0. */
-float v27ter_rx_signal_power(v27ter_rx_state_t *s);
+SPAN_DECLARE(float) v27ter_rx_signal_power(v27ter_rx_state_t *s);
 
 /*! Set the power level at which the carrier detection will cut in
     \param s The modem context.
     \param cutoff The signal cutoff power, in dBm0. */
-void v27ter_rx_signal_cutoff(v27ter_rx_state_t *s, float cutoff);
+SPAN_DECLARE(void) v27ter_rx_signal_cutoff(v27ter_rx_state_t *s, float cutoff);
 
 /*! Set a handler routine to process QAM status reports
     \param s The modem context.
     \param handler The handler routine.
     \param user_data An opaque pointer passed to the handler routine. */
-void v27ter_rx_set_qam_report_handler(v27ter_rx_state_t *s, qam_report_handler_t handler, void *user_data);
+SPAN_DECLARE(void) v27ter_rx_set_qam_report_handler(v27ter_rx_state_t *s, qam_report_handler_t handler, void *user_data);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_tx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_tx.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_tx.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v27ter_tx.h,v 1.37 2008/10/13 13:14:01 steveu Exp $
+ * $Id: v27ter_tx.h,v 1.38 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -81,7 +81,7 @@
     \brief Adjust a V.27ter modem transmit context's output power.
     \param s The modem context.
     \param power The power level, in dBm0 */
-void v27ter_tx_power(v27ter_tx_state_t *s, float power);
+SPAN_DECLARE(void) v27ter_tx_power(v27ter_tx_state_t *s, float power);
 
 /*! Initialise a V.27ter modem transmit context.
     \brief Initialise a V.27ter modem transmit context.
@@ -91,7 +91,7 @@
     \param get_bit The callback routine used to get the data to be transmitted.
     \param user_data An opaque pointer.
     \return A pointer to the modem context, or NULL if there was a problem. */
-v27ter_tx_state_t *v27ter_tx_init(v27ter_tx_state_t *s, int bit_rate, int tep, get_bit_func_t get_bit, void *user_data);
+SPAN_DECLARE(v27ter_tx_state_t) *v27ter_tx_init(v27ter_tx_state_t *s, int bit_rate, int tep, get_bit_func_t get_bit, void *user_data);
 
 /*! Reinitialise an existing V.27ter modem transmit context, so it may be reused.
     \brief Reinitialise an existing V.27ter modem transmit context.
@@ -99,29 +99,29 @@
     \param bit_rate The bit rate of the modem. Valid values are 2400 and 4800.
     \param tep TRUE is the optional TEP tone is to be transmitted.
     \return 0 for OK, -1 for bad parameter */
-int v27ter_tx_restart(v27ter_tx_state_t *s, int bit_rate, int tep);
+SPAN_DECLARE(int) v27ter_tx_restart(v27ter_tx_state_t *s, int bit_rate, int tep);
 
 /*! Free a V.27ter modem transmit context.
     \brief Free a V.27ter modem transmit context.
     \param s The modem context.
     \return 0 for OK */
-int v27ter_tx_free(v27ter_tx_state_t *s);
+SPAN_DECLARE(int) v27ter_tx_free(v27ter_tx_state_t *s);
 
-logging_state_t *v27ter_tx_get_logging_state(v27ter_tx_state_t *s);
+SPAN_DECLARE(logging_state_t) *v27ter_tx_get_logging_state(v27ter_tx_state_t *s);
 
 /*! Change the get_bit function associated with a V.27ter modem transmit context.
     \brief Change the get_bit function associated with a V.27ter modem transmit context.
     \param s The modem context.
     \param get_bit The callback routine used to get the data to be transmitted.
     \param user_data An opaque pointer. */
-void v27ter_tx_set_get_bit(v27ter_tx_state_t *s, get_bit_func_t get_bit, void *user_data);
+SPAN_DECLARE(void) v27ter_tx_set_get_bit(v27ter_tx_state_t *s, get_bit_func_t get_bit, void *user_data);
 
 /*! Change the modem status report function associated with a V.27ter modem transmit context.
     \brief Change the modem status report function associated with a V.27ter modem transmit context.
     \param s The modem context.
     \param handler The callback routine used to report modem status changes.
     \param user_data An opaque pointer. */
-void v27ter_tx_set_modem_status_handler(v27ter_tx_state_t *s, modem_tx_status_func_t handler, void *user_data);
+SPAN_DECLARE(void) v27ter_tx_set_modem_status_handler(v27ter_tx_state_t *s, modem_tx_status_func_t handler, void *user_data);
 
 /*! Generate a block of V.27ter modem audio samples.
     \brief Generate a block of V.27ter modem audio samples.
@@ -130,7 +130,7 @@
     \param len The number of samples to be generated.
     \return The number of samples actually generated.
 */
-int v27ter_tx(v27ter_tx_state_t *s, int16_t amp[], int len);
+SPAN_DECLARE(int) v27ter_tx(v27ter_tx_state_t *s, int16_t amp[], int len);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v29rx.h,v 1.65 2008/10/13 13:14:01 steveu Exp $
+ * $Id: v29rx.h,v 1.66 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -147,7 +147,7 @@
     \param put_bit The callback routine used to put the received data.
     \param user_data An opaque pointer passed to the put_bit routine.
     \return A pointer to the modem context, or NULL if there was a problem. */
-v29_rx_state_t *v29_rx_init(v29_rx_state_t *s, int bit_rate, put_bit_func_t put_bit, void *user_data);
+SPAN_DECLARE(v29_rx_state_t) *v29_rx_init(v29_rx_state_t *s, int bit_rate, put_bit_func_t put_bit, void *user_data);
 
 /*! Reinitialise an existing V.29 modem receive context.
     \brief Reinitialise an existing V.29 modem receive context.
@@ -155,29 +155,29 @@
     \param bit_rate The bit rate of the modem. Valid values are 4800, 7200 and 9600.
     \param old_train TRUE if a previous trained values are to be reused.
     \return 0 for OK, -1 for bad parameter */
-int v29_rx_restart(v29_rx_state_t *s, int bit_rate, int old_train);
+SPAN_DECLARE(int) v29_rx_restart(v29_rx_state_t *s, int bit_rate, int old_train);
 
 /*! Free a V.29 modem receive context.
     \brief Free a V.29 modem receive context.
     \param s The modem context.
     \return 0 for OK */
-int v29_rx_free(v29_rx_state_t *s);
+SPAN_DECLARE(int) v29_rx_free(v29_rx_state_t *s);
 
-logging_state_t *v29_rx_get_logging_state(v29_rx_state_t *s);
+SPAN_DECLARE(logging_state_t) *v29_rx_get_logging_state(v29_rx_state_t *s);
 
 /*! Change the put_bit function associated with a V.29 modem receive context.
     \brief Change the put_bit function associated with a V.29 modem receive context.
     \param s The modem context.
     \param put_bit The callback routine used to handle received bits.
     \param user_data An opaque pointer. */
-void v29_rx_set_put_bit(v29_rx_state_t *s, put_bit_func_t put_bit, void *user_data);
+SPAN_DECLARE(void) v29_rx_set_put_bit(v29_rx_state_t *s, put_bit_func_t put_bit, void *user_data);
 
 /*! Change the modem status report function associated with a V.29 modem receive context.
     \brief Change the modem status report function associated with a V.29 modem receive context.
     \param s The modem context.
     \param handler The callback routine used to report modem status changes.
     \param user_data An opaque pointer. */
-void v29_rx_set_modem_status_handler(v29_rx_state_t *s, modem_rx_status_func_t handler, void *user_data);
+SPAN_DECLARE(void) v29_rx_set_modem_status_handler(v29_rx_state_t *s, modem_rx_status_func_t handler, void *user_data);
 
 /*! Process a block of received V.29 modem audio samples.
     \brief Process a block of received V.29 modem audio samples.
@@ -185,7 +185,7 @@
     \param amp The audio sample buffer.
     \param len The number of samples in the buffer.
     \return The number of samples unprocessed. */
-int v29_rx(v29_rx_state_t *s, const int16_t amp[], int len);
+SPAN_DECLARE(int) v29_rx(v29_rx_state_t *s, const int16_t amp[], int len);
 
 /*! Get a snapshot of the current equalizer coefficients.
     \brief Get a snapshot of the current equalizer coefficients.
@@ -193,36 +193,36 @@
     \param coeffs The vector of complex coefficients.
     \return The number of coefficients in the vector. */
 #if defined(SPANDSP_USE_FIXED_POINT)
-int v29_rx_equalizer_state(v29_rx_state_t *s, complexi16_t **coeffs);
+SPAN_DECLARE(int) v29_rx_equalizer_state(v29_rx_state_t *s, complexi16_t **coeffs);
 #else
-int v29_rx_equalizer_state(v29_rx_state_t *s, complexf_t **coeffs);
+SPAN_DECLARE(int) v29_rx_equalizer_state(v29_rx_state_t *s, complexf_t **coeffs);
 #endif
 
 /*! Get the current received carrier frequency.
     \param s The modem context.
     \return The frequency, in Hertz. */
-float v29_rx_carrier_frequency(v29_rx_state_t *s);
+SPAN_DECLARE(float) v29_rx_carrier_frequency(v29_rx_state_t *s);
 
 /*! Get the current symbol timing correction since startup.
     \param s The modem context.
     \return The correction. */
-float v29_rx_symbol_timing_correction(v29_rx_state_t *s);
+SPAN_DECLARE(float) v29_rx_symbol_timing_correction(v29_rx_state_t *s);
 
 /*! Get the current received signal power.
     \param s The modem context.
     \return The signal power, in dBm0. */
-float v29_rx_signal_power(v29_rx_state_t *s);
+SPAN_DECLARE(float) v29_rx_signal_power(v29_rx_state_t *s);
 
 /*! Set the power level at which the carrier detection will cut in
     \param s The modem context.
     \param cutoff The signal cutoff power, in dBm0. */
-void v29_rx_signal_cutoff(v29_rx_state_t *s, float cutoff);
+SPAN_DECLARE(void) v29_rx_signal_cutoff(v29_rx_state_t *s, float cutoff);
 
 /*! Set a handler routine to process QAM status reports
     \param s The modem context.
     \param handler The handler routine.
     \param user_data An opaque pointer passed to the handler routine. */
-void v29_rx_set_qam_report_handler(v29_rx_state_t *s, qam_report_handler_t handler, void *user_data);
+SPAN_DECLARE(void) v29_rx_set_qam_report_handler(v29_rx_state_t *s, qam_report_handler_t handler, void *user_data);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v29tx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v29tx.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v29tx.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v29tx.h,v 1.35 2008/10/13 13:14:01 steveu Exp $
+ * $Id: v29tx.h,v 1.36 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \file */
@@ -111,7 +111,7 @@
     \brief Adjust a V.29 modem transmit context's output power.
     \param s The modem context.
     \param power The power level, in dBm0 */
-void v29_tx_power(v29_tx_state_t *s, float power);
+SPAN_DECLARE(void) v29_tx_power(v29_tx_state_t *s, float power);
 
 /*! Initialise a V.29 modem transmit context. This must be called before the first
     use of the context, to initialise its contents.
@@ -122,7 +122,7 @@
     \param get_bit The callback routine used to get the data to be transmitted.
     \param user_data An opaque pointer.
     \return A pointer to the modem context, or NULL if there was a problem. */
-v29_tx_state_t *v29_tx_init(v29_tx_state_t *s, int bit_rate, int tep, get_bit_func_t get_bit, void *user_data);
+SPAN_DECLARE(v29_tx_state_t) *v29_tx_init(v29_tx_state_t *s, int bit_rate, int tep, get_bit_func_t get_bit, void *user_data);
 
 /*! Reinitialise an existing V.29 modem transmit context, so it may be reused.
     \brief Reinitialise an existing V.29 modem transmit context.
@@ -130,29 +130,29 @@
     \param bit_rate The bit rate of the modem. Valid values are 4800, 7200 and 9600.
     \param tep TRUE is the optional TEP tone is to be transmitted.
     \return 0 for OK, -1 for bad parameter */
-int v29_tx_restart(v29_tx_state_t *s, int bit_rate, int tep);
+SPAN_DECLARE(int) v29_tx_restart(v29_tx_state_t *s, int bit_rate, int tep);
 
 /*! Free a V.29 modem transmit context.
     \brief Free a V.29 modem transmit context.
     \param s The modem context.
     \return 0 for OK */
-int v29_tx_free(v29_tx_state_t *s);
+SPAN_DECLARE(int) v29_tx_free(v29_tx_state_t *s);
 
-logging_state_t *v29_tx_get_logging_state(v29_tx_state_t *s);
+SPAN_DECLARE(logging_state_t) *v29_tx_get_logging_state(v29_tx_state_t *s);
 
 /*! Change the get_bit function associated with a V.29 modem transmit context.
     \brief Change the get_bit function associated with a V.29 modem transmit context.
     \param s The modem context.
     \param get_bit The callback routine used to get the data to be transmitted.
     \param user_data An opaque pointer. */
-void v29_tx_set_get_bit(v29_tx_state_t *s, get_bit_func_t get_bit, void *user_data);
+SPAN_DECLARE(void) v29_tx_set_get_bit(v29_tx_state_t *s, get_bit_func_t get_bit, void *user_data);
 
 /*! Change the modem status report function associated with a V.29 modem transmit context.
     \brief Change the modem status report function associated with a V.29 modem transmit context.
     \param s The modem context.
     \param handler The callback routine used to report modem status changes.
     \param user_data An opaque pointer. */
-void v29_tx_set_modem_status_handler(v29_tx_state_t *s, modem_tx_status_func_t handler, void *user_data);
+SPAN_DECLARE(void) v29_tx_set_modem_status_handler(v29_tx_state_t *s, modem_tx_status_func_t handler, void *user_data);
 
 /*! Generate a block of V.29 modem audio samples.
     \brief Generate a block of V.29 modem audio samples.
@@ -161,7 +161,7 @@
     \param len The number of samples to be generated.
     \return The number of samples actually generated.
 */
-int v29_tx(v29_tx_state_t *s, int16_t *amp, int len);
+SPAN_DECLARE(int) v29_tx(v29_tx_state_t *s, int16_t *amp, int len);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v42.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v42.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v42.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v42.h,v 1.26 2008/11/15 14:43:08 steveu Exp $
+ * $Id: v42.h,v 1.27 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \page v42_page V.42 modem error correction
@@ -82,7 +82,7 @@
 {
 #endif
 
-const char *lapm_status_to_str(int status);
+SPAN_DECLARE(const char) *lapm_status_to_str(int status);
 
 /*! Dump LAP.M frames in a raw and/or decoded forms
     \param frame The frame itself
@@ -90,43 +90,43 @@
     \param showraw TRUE if the raw octets should be dumped
     \param txrx TRUE if tx, FALSE if rx. Used to highlight the packet's direction.
 */
-void lapm_dump(lapm_state_t *s, const uint8_t *frame, int len, int showraw, int txrx);
+SPAN_DECLARE(void) lapm_dump(lapm_state_t *s, const uint8_t *frame, int len, int showraw, int txrx);
 
 /*! Accept an HDLC packet
 */
-void lapm_receive(void *user_data, const uint8_t *buf, int len, int ok);
+SPAN_DECLARE(void) lapm_receive(void *user_data, const uint8_t *buf, int len, int ok);
 
 /*! Transmit a LAP.M frame
 */
-int lapm_tx(lapm_state_t *s, const void *buf, int len);
+SPAN_DECLARE(int) lapm_tx(lapm_state_t *s, const void *buf, int len);
 
 /*! Transmit a LAP.M information frame
 */
-int lapm_tx_iframe(lapm_state_t *s, const void *buf, int len, int cr);
+SPAN_DECLARE(int) lapm_tx_iframe(lapm_state_t *s, const void *buf, int len, int cr);
 
 /*! Send a break over a LAP.M connection
 */
-int lapm_break(lapm_state_t *s, int enable);
+SPAN_DECLARE(int) lapm_break(lapm_state_t *s, int enable);
 
 /*! Initiate an orderly release of a LAP.M connection
 */
-int lapm_release(lapm_state_t *s);
+SPAN_DECLARE(int) lapm_release(lapm_state_t *s);
 
 /*! Enable or disable loopback of a LAP.M connection
 */
-int lapm_loopback(lapm_state_t *s, int enable);
+SPAN_DECLARE(int) lapm_loopback(lapm_state_t *s, int enable);
 
 /*! Assign or remove a callback routine used to deal with V.42 status changes.
 */
-void v42_set_status_callback(v42_state_t *s, v42_status_func_t callback, void *user_data);
+SPAN_DECLARE(void) v42_set_status_callback(v42_state_t *s, v42_status_func_t callback, void *user_data);
 
 /*! Process a newly received bit for a V.42 context.
 */
-void v42_rx_bit(void *user_data, int bit);
+SPAN_DECLARE(void) v42_rx_bit(void *user_data, int bit);
 
 /*! Get the next transmit bit for a V.42 context.
 */
-int v42_tx_bit(void *user_data);
+SPAN_DECLARE(int) v42_tx_bit(void *user_data);
 
 /*! Initialise a V.42 context.
     \param s The V.42 context.
@@ -135,17 +135,17 @@
     \param user_data An opaque pointer passed to the frame handler routine.
     \return ???
 */
-v42_state_t *v42_init(v42_state_t *s, int caller, int detect, v42_frame_handler_t frame_handler, void *user_data);
+SPAN_DECLARE(v42_state_t) *v42_init(v42_state_t *s, int caller, int detect, v42_frame_handler_t frame_handler, void *user_data);
 
 /*! Restart a V.42 context.
     \param s The V.42 context.
 */
-void v42_restart(v42_state_t *s);
+SPAN_DECLARE(void) v42_restart(v42_state_t *s);
 
 /*! Release a V.42 context.
     \param s The V.42 context.
     \return 0 if OK */
-int v42_release(v42_state_t *s);
+SPAN_DECLARE(int) v42_release(v42_state_t *s);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v42bis.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v42bis.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v42bis.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v42bis.h,v 1.23 2008/11/15 14:43:08 steveu Exp $
+ * $Id: v42bis.h,v 1.24 2009/01/31 08:48:11 steveu Exp $
  */
 
 /*! \page v42bis_page V.42bis modem data compression
@@ -75,24 +75,24 @@
     \param buf The data to be compressed.
     \param len The length of the data buffer.
     \return 0 */
-int v42bis_compress(v42bis_state_t *s, const uint8_t *buf, int len);
+SPAN_DECLARE(int) v42bis_compress(v42bis_state_t *s, const uint8_t *buf, int len);
 
 /*! Flush out any data remaining in a compression buffer.
     \param s The V.42bis context.
     \return 0 */
-int v42bis_compress_flush(v42bis_state_t *s);
+SPAN_DECLARE(int) v42bis_compress_flush(v42bis_state_t *s);
 
 /*! Decompress a block of octets.
     \param s The V.42bis context.
     \param buf The data to be decompressed.
     \param len The length of the data buffer.
     \return 0 */
-int v42bis_decompress(v42bis_state_t *s, const uint8_t *buf, int len);
+SPAN_DECLARE(int) v42bis_decompress(v42bis_state_t *s, const uint8_t *buf, int len);
     
 /*! Flush out any data remaining in the decompression buffer.
     \param s The V.42bis context.
     \return 0 */
-int v42bis_decompress_flush(v42bis_state_t *s);
+SPAN_DECLARE(int) v42bis_decompress_flush(v42bis_state_t *s);
 
 /*! Initialise a V.42bis context.
     \param s The V.42bis context.
@@ -106,16 +106,16 @@
     \param data_user_data .
     \param max_data_len The maximum length that should be passed to the data handler.
     \return The V.42bis context. */
-v42bis_state_t *v42bis_init(v42bis_state_t *s,
-                            int negotiated_p0,
-                            int negotiated_p1,
-                            int negotiated_p2,
-                            v42bis_frame_handler_t frame_handler,
-                            void *frame_user_data,
-                            int max_frame_len,
-                            v42bis_data_handler_t data_handler,
-                            void *data_user_data,
-                            int max_data_len);
+SPAN_DECLARE(v42bis_state_t) *v42bis_init(v42bis_state_t *s,
+                                          int negotiated_p0,
+                                          int negotiated_p1,
+                                          int negotiated_p2,
+                                          v42bis_frame_handler_t frame_handler,
+                                          void *frame_user_data,
+                                          int max_frame_len,
+                                          v42bis_data_handler_t data_handler,
+                                          void *data_user_data,
+                                          int max_data_len);
 
 /*! Set the compression mode.
     \param s The V.42bis context.
@@ -123,12 +123,12 @@
             V42BIS_COMPRESSION_MODE_DYNAMIC,
             V42BIS_COMPRESSION_MODE_ALWAYS,
             V42BIS_COMPRESSION_MODE_NEVER */
-void v42bis_compression_control(v42bis_state_t *s, int mode);
+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 */
-int v42bis_release(v42bis_state_t *s);
+SPAN_DECLARE(int) v42bis_release(v42bis_state_t *s);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v8.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v8.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v8.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v8.h,v 1.25 2008/10/13 14:19:18 steveu Exp $
+ * $Id: v8.h,v 1.26 2009/01/31 08:48:11 steveu Exp $
  */
  
 /*! \file */
@@ -128,25 +128,25 @@
     \param result_handler The callback routine used to handle the results of negotiation.
     \param user_data An opaque pointer passed to the result_handler routine.
     \return A pointer to the V.8 context, or NULL if there was a problem. */
-v8_state_t *v8_init(v8_state_t *s,
-                    int caller,
-                    int available_modulations,
-                    v8_result_handler_t *result_handler,
-                    void *user_data);
+SPAN_DECLARE(v8_state_t) *v8_init(v8_state_t *s,
+                                  int caller,
+                                  int available_modulations,
+                                  v8_result_handler_t *result_handler,
+                                  void *user_data);
 
 /*! Release a V.8 context.
     \brief Release a V.8 context.
     \param s The V.8 context.
     \return 0 for OK. */
-int v8_release(v8_state_t *s);
+SPAN_DECLARE(int) v8_release(v8_state_t *s);
 
 /*! Free a V.8 context.
     \brief Release a V.8 context.
     \param s The V.8 context.
     \return 0 for OK. */
-int v8_free(v8_state_t *s);
+SPAN_DECLARE(int) v8_free(v8_state_t *s);
 
-logging_state_t *v8_get_logging_state(v8_state_t *s);
+SPAN_DECLARE(logging_state_t) *v8_get_logging_state(v8_state_t *s);
 
 /*! Generate a block of V.8 audio samples.
     \brief Generate a block of V.8 audio samples.
@@ -155,7 +155,7 @@
     \param max_len The number of samples to be generated.
     \return The number of samples actually generated.
 */
-int v8_tx(v8_state_t *s, int16_t *amp, int max_len);
+SPAN_DECLARE(int) v8_tx(v8_state_t *s, int16_t *amp, int max_len);
 
 /*! Process a block of received V.8 audio samples.
     \brief Process a block of received V.8 audio samples.
@@ -163,19 +163,19 @@
     \param amp The audio sample buffer.
     \param len The number of samples in the buffer.
 */
-int v8_rx(v8_state_t *s, const int16_t *amp, int len);
+SPAN_DECLARE(int) v8_rx(v8_state_t *s, const int16_t *amp, int len);
 
 /*! Log the list of supported modulations.
     \brief Log the list of supported modulations.
     \param s The V.8 context.
     \param modulation_schemes The list of supported modulations. */
-void v8_log_supported_modulations(v8_state_t *s, int modulation_schemes);
+SPAN_DECLARE(void) v8_log_supported_modulations(v8_state_t *s, int modulation_schemes);
 
-const char *v8_call_function_to_str(int call_function);
-const char *v8_modulation_to_str(int modulation_scheme);
-const char *v8_protocol_to_str(int protocol);
-const char *v8_pstn_access_to_str(int pstn_access);
-const char *v8_pcm_modem_availability_to_str(int pcm_modem_availability);
+SPAN_DECLARE(const char) *v8_call_function_to_str(int call_function);
+SPAN_DECLARE(const char) *v8_modulation_to_str(int modulation_scheme);
+SPAN_DECLARE(const char) *v8_protocol_to_str(int protocol);
+SPAN_DECLARE(const char) *v8_pstn_access_to_str(int pstn_access);
+SPAN_DECLARE(const char) *v8_pcm_modem_availability_to_str(int pcm_modem_availability);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/vector_float.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/vector_float.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/vector_float.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: vector_float.h,v 1.14 2008/10/09 13:25:19 steveu Exp $
+ * $Id: vector_float.h,v 1.15 2009/01/31 08:48:11 steveu Exp $
  */
 
 #if !defined(_SPANDSP_VECTOR_FLOAT_H_)
@@ -33,124 +33,124 @@
 {
 #endif
 
-void vec_copyf(float z[], const float x[], int n);
+SPAN_DECLARE(void) vec_copyf(float z[], const float x[], int n);
 
-void vec_copy(double z[], const double x[], int n);
+SPAN_DECLARE(void) vec_copy(double z[], const double x[], int n);
 
 #if defined(HAVE_LONG_DOUBLE)
-void vec_copyl(long double z[], const long double x[], int n);
+SPAN_DECLARE(void) vec_copyl(long double z[], const long double x[], int n);
 #endif
 
-void vec_negatef(float z[], const float x[], int n);
+SPAN_DECLARE(void) vec_negatef(float z[], const float x[], int n);
 
-void vec_negate(double z[], const double x[], int n);
+SPAN_DECLARE(void) vec_negate(double z[], const double x[], int n);
 
 #if defined(HAVE_LONG_DOUBLE)
-void vec_negatel(long double z[], const long double x[], int n);
+SPAN_DECLARE(void) vec_negatel(long double z[], const long double x[], int n);
 #endif
 
-void vec_zerof(float z[], int n);
+SPAN_DECLARE(void) vec_zerof(float z[], int n);
 
-void vec_zero(double z[], int n);
+SPAN_DECLARE(void) vec_zero(double z[], int n);
 
 #if defined(HAVE_LONG_DOUBLE)
-void vec_zerol(long double z[], int n);
+SPAN_DECLARE(void) vec_zerol(long double z[], int n);
 #endif
 
-void vec_setf(float z[], float x, int n);
+SPAN_DECLARE(void) vec_setf(float z[], float x, int n);
 
-void vec_set(double z[], double x, int n);
+SPAN_DECLARE(void) vec_set(double z[], double x, int n);
 
 #if defined(HAVE_LONG_DOUBLE)
-void vec_setl(long double z[], long double x, int n);
+SPAN_DECLARE(void) vec_setl(long double z[], long double x, int n);
 #endif
 
-void vec_addf(float z[], const float x[], const float y[], int n);
+SPAN_DECLARE(void) vec_addf(float z[], const float x[], const float y[], int n);
 
-void vec_add(double z[], const double x[], const double y[], int n);
+SPAN_DECLARE(void) vec_add(double z[], const double x[], const double y[], int n);
 
 #if defined(HAVE_LONG_DOUBLE)
-void vec_addl(long double z[], const long double x[], const long double y[], int n);
+SPAN_DECLARE(void) vec_addl(long double z[], const long double x[], const long double y[], int n);
 #endif
 
-void vec_scaledxy_addf(float z[], const float x[], float x_scale, const float y[], float y_scale, int n);
+SPAN_DECLARE(void) vec_scaledxy_addf(float z[], const float x[], float x_scale, const float y[], float y_scale, int n);
 
-void vec_scaledxy_add(double z[], const double x[], double x_scale, const double y[], double y_scale, int n);
+SPAN_DECLARE(void) vec_scaledxy_add(double z[], const double x[], double x_scale, const double y[], double y_scale, int n);
 
 #if defined(HAVE_LONG_DOUBLE)
-void vec_scaledxy_addl(long double z[], const long double x[], long double x_scale, const long double y[], long double y_scale, int n);
+SPAN_DECLARE(void) vec_scaledxy_addl(long double z[], const long double x[], long double x_scale, const long double y[], long double y_scale, int n);
 #endif
 
-void vec_scaledy_addf(float z[], const float x[], const float y[], float y_scale, int n);
+SPAN_DECLARE(void) vec_scaledy_addf(float z[], const float x[], const float y[], float y_scale, int n);
 
-void vec_scaledy_add(double z[], const double x[], const double y[], double y_scale, int n);
+SPAN_DECLARE(void) vec_scaledy_add(double z[], const double x[], const double y[], double y_scale, int n);
 
 #if defined(HAVE_LONG_DOUBLE)
-void vec_scaledy_addl(long double z[], const long double x[], const long double y[], long double y_scale, int n);
+SPAN_DECLARE(void) vec_scaledy_addl(long double z[], const long double x[], const long double y[], long double y_scale, int n);
 #endif
 
-void vec_subf(float z[], const float x[], const float y[], int n);
+SPAN_DECLARE(void) vec_subf(float z[], const float x[], const float y[], int n);
 
-void vec_sub(double z[], const double x[], const double y[], int n);
+SPAN_DECLARE(void) vec_sub(double z[], const double x[], const double y[], int n);
 
 #if defined(HAVE_LONG_DOUBLE)
-void vec_subl(long double z[], const long double x[], const long double y[], int n);
+SPAN_DECLARE(void) vec_subl(long double z[], const long double x[], const long double y[], int n);
 #endif
 
-void vec_scaledxy_subf(float z[], const float x[], float x_scale, const float y[], float y_scale, int n);
+SPAN_DECLARE(void) vec_scaledxy_subf(float z[], const float x[], float x_scale, const float y[], float y_scale, int n);
 
-void vec_scaledxy_sub(double z[], const double x[], double x_scale, const double y[], double y_scale, int n);
+SPAN_DECLARE(void) vec_scaledxy_sub(double z[], const double x[], double x_scale, const double y[], double y_scale, int n);
 
 #if defined(HAVE_LONG_DOUBLE)
-void vec_scaledxy_subl(long double z[], const long double x[], long double x_scale, const long double y[], long double y_scale, int n);
+SPAN_DECLARE(void) vec_scaledxy_subl(long double z[], const long double x[], long double x_scale, const long double y[], long double y_scale, int n);
 #endif
 
-void vec_scaledx_subf(float z[], const float x[], float x_scale, const float y[], int n);
+SPAN_DECLARE(void) vec_scaledx_subf(float z[], const float x[], float x_scale, const float y[], int n);
 
-void vec_scaledx_sub(double z[], const double x[], double x_scale, const double y[], int n);
+SPAN_DECLARE(void) vec_scaledx_sub(double z[], const double x[], double x_scale, const double y[], int n);
 
 #if defined(HAVE_LONG_DOUBLE)
-void vec_scaledx_subl(long double z[], const long double x[], long double x_scale, const long double y[], int n);
+SPAN_DECLARE(void) vec_scaledx_subl(long double z[], const long double x[], long double x_scale, const long double y[], int n);
 #endif
 
-void vec_scaledy_subf(float z[], const float x[], const float y[], float y_scale, int n);
+SPAN_DECLARE(void) vec_scaledy_subf(float z[], const float x[], const float y[], float y_scale, int n);
 
-void vec_scaledy_sub(double z[], const double x[], const double y[], double y_scale, int n);
+SPAN_DECLARE(void) vec_scaledy_sub(double z[], const double x[], const double y[], double y_scale, int n);
 
 #if defined(HAVE_LONG_DOUBLE)
-void vec_scaledy_subl(long double z[], const long double x[], const long double y[], long double y_scale, int n);
+SPAN_DECLARE(void) vec_scaledy_subl(long double z[], const long double x[], const long double y[], long double y_scale, int n);
 #endif
 
-void vec_scalar_mulf(float z[], const float x[], float y, int n);
+SPAN_DECLARE(void) vec_scalar_mulf(float z[], const float x[], float y, int n);
 
-void vec_scalar_mul(double z[], const double x[], double y, int n);
+SPAN_DECLARE(void) vec_scalar_mul(double z[], const double x[], double y, int n);
 
 #if defined(HAVE_LONG_DOUBLE)
-void vec_scalar_mull(long double z[], const long double x[], long double y, int n);
+SPAN_DECLARE(void) vec_scalar_mull(long double z[], const long double x[], long double y, int n);
 #endif
 
-void vec_scalar_addf(float z[], const float x[], float y, int n);
+SPAN_DECLARE(void) vec_scalar_addf(float z[], const float x[], float y, int n);
 
-void vec_scalar_add(double z[], const double x[], double y, int n);
+SPAN_DECLARE(void) vec_scalar_add(double z[], const double x[], double y, int n);
 
 #if defined(HAVE_LONG_DOUBLE)
-void vec_scalar_addl(long double z[], const long double x[], long double y, int n);
+SPAN_DECLARE(void) vec_scalar_addl(long double z[], const long double x[], long double y, int n);
 #endif
 
-void vec_scalar_subf(float z[], const float x[], float y, int n);
+SPAN_DECLARE(void) vec_scalar_subf(float z[], const float x[], float y, int n);
 
-void vec_scalar_sub(double z[], const double x[], double y, int n);
+SPAN_DECLARE(void) vec_scalar_sub(double z[], const double x[], double y, int n);
 
 #if defined(HAVE_LONG_DOUBLE)
-void vec_scalar_subl(long double z[], const long double x[], long double y, int n);
+SPAN_DECLARE(void) vec_scalar_subl(long double z[], const long double x[], long double y, int n);
 #endif
 
-void vec_mulf(float z[], const float x[], const float y[], int n);
+SPAN_DECLARE(void) vec_mulf(float z[], const float x[], const float y[], int n);
 
-void vec_mul(double z[], const double x[], const double y[], int n);
+SPAN_DECLARE(void) vec_mul(double z[], const double x[], const double y[], int n);
 
 #if defined(HAVE_LONG_DOUBLE)
-void vec_mull(long double z[], const long double x[], const long double y[], int n);
+SPAN_DECLARE(void) vec_mull(long double z[], const long double x[], const long double y[], int n);
 #endif
 
 /*! \brief Find the dot product of two float vectors.
@@ -158,14 +158,14 @@
     \param y The first vector.
     \param n The number of elements in the vectors.
     \return The dot product of the two vectors. */
-float vec_dot_prodf(const float x[], const float y[], int n);
+SPAN_DECLARE(float) vec_dot_prodf(const float x[], const float y[], int n);
 
 /*! \brief Find the dot product of two double vectors.
     \param x The first vector.
     \param y The first vector.
     \param n The number of elements in the vectors.
     \return The dot product of the two vectors. */
-double vec_dot_prod(const double x[], const double y[], int n);
+SPAN_DECLARE(double) vec_dot_prod(const double x[], const double y[], int n);
 
 #if defined(HAVE_LONG_DOUBLE)
 /*! \brief Find the dot product of two long double vectors.
@@ -173,7 +173,7 @@
     \param y The first vector.
     \param n The number of elements in the vectors.
     \return The dot product of the two vectors. */
-long double vec_dot_prodl(const long double x[], const long double y[], int n);
+SPAN_DECLARE(long double) vec_dot_prodl(const long double x[], const long double y[], int n);
 #endif
 
 /*! \brief Find the dot product of two float vectors, where the first is a circular buffer
@@ -183,11 +183,11 @@
     \param n The number of elements in the vectors.
     \param pos The starting position in the x vector.
     \return The dot product of the two vectors. */
-float vec_circular_dot_prodf(const float x[], const float y[], int n, int pos);
+SPAN_DECLARE(float) vec_circular_dot_prodf(const float x[], const float y[], int n, int pos);
 
-void vec_lmsf(const float x[], float y[], int n, float error);
+SPAN_DECLARE(void) vec_lmsf(const float x[], float y[], int n, float error);
 
-void vec_circular_lmsf(const float x[], float y[], int n, int pos, float error);
+SPAN_DECLARE(void) vec_circular_lmsf(const float x[], float y[], int n, int pos, float error);
 
 #if defined(__cplusplus)
 }

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/vector_int.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/vector_int.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/vector_int.h	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: vector_int.h,v 1.13 2008/09/18 13:54:32 steveu Exp $
+ * $Id: vector_int.h,v 1.14 2009/01/31 08:48:11 steveu Exp $
  */
 
 #if !defined(_SPANDSP_VECTOR_INT_H_)
@@ -101,7 +101,7 @@
     \param y The first vector.
     \param n The number of elements in the vectors.
     \return The dot product of the two vectors. */
-int32_t vec_dot_prodi16(const int16_t x[], const int16_t y[], int n);
+SPAN_DECLARE(int32_t) vec_dot_prodi16(const int16_t x[], const int16_t y[], int n);
 
 /*! \brief Find the dot product of two int16_t vectors, where the first is a circular buffer
            with an offset for the starting position.
@@ -110,11 +110,11 @@
     \param n The number of elements in the vectors.
     \param pos The starting position in the x vector.
     \return The dot product of the two vectors. */
-int32_t vec_circular_dot_prodi16(const int16_t x[], const int16_t y[], int n, int pos);
+SPAN_DECLARE(int32_t) vec_circular_dot_prodi16(const int16_t x[], const int16_t y[], int n, int pos);
 
-void vec_lmsi16(const int16_t x[], int16_t y[], int n, int16_t error);
+SPAN_DECLARE(void) vec_lmsi16(const int16_t x[], int16_t y[], int n, int16_t error);
 
-void vec_circular_lmsi16(const int16_t x[], int16_t y[], int n, int pos, int16_t error);
+SPAN_DECLARE(void) vec_circular_lmsi16(const int16_t x[], int16_t y[], int n, int pos, int16_t error);
 
 /*! \brief Find the minimum and maximum values in an int16_t vector.
     \param x The vector to be searched.
@@ -125,7 +125,7 @@
     \return The absolute maximum value. Since the range of negative numbers
             exceeds the range of positive one, the returned integer is longer
             than the ones being searched. */
-int32_t vec_min_maxi16(const int16_t x[], int n, int16_t out[]);
+SPAN_DECLARE(int32_t) vec_min_maxi16(const int16_t x[], int n, int16_t out[]);
 
 static __inline__ int vec_norm2i16(const int16_t *vec, int len)
 {

Modified: freeswitch/trunk/libs/spandsp/src/spandsp/version.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/version.h	(original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/version.h	Mon Feb  2 11:40:52 2009
@@ -30,8 +30,8 @@
 
 /* The date and time of the version are in UTC form. */
 
-#define SPANDSP_RELEASE_DATE    20090130
-#define SPANDSP_RELEASE_TIME    102456
+#define SPANDSP_RELEASE_DATE    20090131
+#define SPANDSP_RELEASE_TIME    122642
 
 #endif
 /*- End of file ------------------------------------------------------------*/

Modified: freeswitch/trunk/libs/spandsp/src/t30.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t30.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/t30.c	Mon Feb  2 11:40:52 2009
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t30.c,v 1.280 2009/01/29 18:30:14 steveu Exp $
+ * $Id: t30.c,v 1.282 2009/01/31 09:47:59 steveu Exp $
  */
 
 /*! \file */
@@ -289,7 +289,7 @@
 
 /* (Annex C - ISDN) Time-out T7 is used to detect loss of command/response synchronization. T7 is 6+-1s.
 The timeout begins when initiating a command search (e.g., the first entrance into the "command received"
-subroutine – see flow diagram in C.5) and is reset upon detecting a valid signal or when T7 times out. */
+subroutine - see flow diagram in C.5) and is reset upon detecting a valid signal or when T7 times out. */
 #define DEFAULT_TIMER_T7                7000
 
 /* (Annex C - ISDN) Time-out T8 defines the amount of time waiting for clearance of the busy condition
@@ -5050,7 +5050,7 @@
         break;
     case T30_STATE_F_DOC_NON_ECM:
         /* Document transfer */
-        if (t4_rx_put_byte(&s->t4, byte))
+        if (t4_rx_put_byte(&s->t4, (uint8_t) byte))
         {
             /* That is the end of the document */
             set_state(s, T30_STATE_F_POST_DOC_NON_ECM);

Modified: freeswitch/trunk/libs/spandsp/src/t4.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t4.c	(original)
+++ freeswitch/trunk/libs/spandsp/src/t4.c	Mon Feb  2 11:40:52 2009
@@ -24,7 +24,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t4.c,v 1.119 2009/01/28 03:41:27 steveu Exp $
+ * $Id: t4.c,v 1.120 2009/01/31 08:48:10 steveu Exp $
  */
 
 /*
@@ -611,6 +611,7 @@
     int fudge;
     int row_starts_at;
     int x;
+    int j;
 
     if (s->run_length)
         add_run_to_row(s);
@@ -659,7 +660,7 @@
         for (x = 0, fudge = 0;  x < s->a_cursor;  x++, fudge ^= 0xFF)
         {
             i = s->cur_runs[x];
-            if (i >= s->tx_bits)
+            if ((int) i >= s->tx_bits)
             {
                 s->tx_bitstream = (s->tx_bitstream << s->tx_bits) | (msbmask[s->tx_bits] & fudge);
                 for (i += (8 - s->tx_bits);  i >= 8;  i -= 8)
@@ -681,8 +682,8 @@
            row for the next row. Use a copy of the previous good row as the actual current
            row. If the row only fell apart near the end, reusing it might be the best
            solution. */
-        for (i = 0, fudge = 0;  i < s->a_cursor  &&  fudge < s->image_width;  i++)
-            fudge += s->cur_runs[i];
+        for (j = 0, fudge = 0;  j < s->a_cursor  &&  fudge < s->image_width;  j++)
+            fudge += s->cur_runs[j];
         if (fudge < s->image_width)
         {
             /* Try to pad with white, and avoid black, to minimise mess on the image. */
@@ -1613,11 +1614,11 @@
             b_cursor |= 1;
         else
             b_cursor &= ~1;
-        if (a0 < s->ref_runs[b_cursor])
+        if (a0 < (int) s->ref_runs[b_cursor])
         {
             for (  ;  b_cursor >= 0;  b_cursor -= 2)
             {
-                if (a0 >= s->ref_runs[b_cursor])
+                if (a0 >= (int) s->ref_runs[b_cursor])
                     break;
             }
             b_cursor += 2;
@@ -1626,7 +1627,7 @@
         {
             for (  ;  b_cursor < s->ref_steps;  b_cursor += 2)
             {
-                if (a0 < s->ref_runs[b_cursor])
+                if (a0 < (int) s->ref_runs[b_cursor])
                     break;
             }
             if (b_cursor >= s->ref_steps)



More information about the Freeswitch-svn mailing list