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

145 files changed:
libs/spandsp/spandsp-sim/g1050.c
libs/spandsp/spandsp-sim/line_model.c
libs/spandsp/spandsp-sim/make_line_models.c
libs/spandsp/spandsp-sim/rfc2198_sim.c
libs/spandsp/spandsp-sim/test_utils.c
libs/spandsp/src/Makefile.am
libs/spandsp/src/adsi.c
libs/spandsp/src/async.c
libs/spandsp/src/at_interpreter.c
libs/spandsp/src/awgn.c
libs/spandsp/src/bell_r2_mf.c
libs/spandsp/src/bert.c
libs/spandsp/src/bit_operations.c
libs/spandsp/src/bitstream.c
libs/spandsp/src/complex_filters.c
libs/spandsp/src/complex_vector_float.c
libs/spandsp/src/complex_vector_int.c
libs/spandsp/src/crc.c
libs/spandsp/src/dds_float.c
libs/spandsp/src/dds_int.c
libs/spandsp/src/dtmf.c
libs/spandsp/src/echo.c
libs/spandsp/src/fax.c
libs/spandsp/src/floating_fudge.h
libs/spandsp/src/fsk.c
libs/spandsp/src/g711.c
libs/spandsp/src/g722.c
libs/spandsp/src/g726.c
libs/spandsp/src/gsm0610_decode.c
libs/spandsp/src/gsm0610_encode.c
libs/spandsp/src/gsm0610_long_term.c
libs/spandsp/src/gsm0610_lpc.c
libs/spandsp/src/gsm0610_preprocess.c
libs/spandsp/src/gsm0610_rpe.c
libs/spandsp/src/gsm0610_short_term.c
libs/spandsp/src/hdlc.c
libs/spandsp/src/ima_adpcm.c
libs/spandsp/src/libspandsp.dsp
libs/spandsp/src/libspandsp.vcproj
libs/spandsp/src/logging.c
libs/spandsp/src/lpc10_decode.c
libs/spandsp/src/lpc10_encode.c
libs/spandsp/src/lpc10_voicing.c
libs/spandsp/src/modem_connect_tones.c
libs/spandsp/src/modem_echo.c
libs/spandsp/src/msvc/config.h
libs/spandsp/src/msvc/spandsp.h
libs/spandsp/src/noise.c
libs/spandsp/src/oki_adpcm.c
libs/spandsp/src/playout.c
libs/spandsp/src/plc.c
libs/spandsp/src/power_meter.c
libs/spandsp/src/queue.c
libs/spandsp/src/schedule.c
libs/spandsp/src/sig_tone.c
libs/spandsp/src/silence_gen.c
libs/spandsp/src/spandsp.h.in
libs/spandsp/src/spandsp/adsi.h
libs/spandsp/src/spandsp/async.h
libs/spandsp/src/spandsp/at_interpreter.h
libs/spandsp/src/spandsp/awgn.h
libs/spandsp/src/spandsp/bell_r2_mf.h
libs/spandsp/src/spandsp/bert.h
libs/spandsp/src/spandsp/bitstream.h
libs/spandsp/src/spandsp/complex_filters.h
libs/spandsp/src/spandsp/dtmf.h
libs/spandsp/src/spandsp/echo.h
libs/spandsp/src/spandsp/fast_convert.h [new file with mode: 0644]
libs/spandsp/src/spandsp/fax.h
libs/spandsp/src/spandsp/fax_modems.h
libs/spandsp/src/spandsp/fsk.h
libs/spandsp/src/spandsp/g711.h
libs/spandsp/src/spandsp/g722.h
libs/spandsp/src/spandsp/g726.h
libs/spandsp/src/spandsp/gsm0610.h
libs/spandsp/src/spandsp/hdlc.h
libs/spandsp/src/spandsp/ima_adpcm.h
libs/spandsp/src/spandsp/lpc10.h
libs/spandsp/src/spandsp/modem_connect_tones.h
libs/spandsp/src/spandsp/modem_echo.h
libs/spandsp/src/spandsp/noise.h
libs/spandsp/src/spandsp/oki_adpcm.h
libs/spandsp/src/spandsp/playout.h
libs/spandsp/src/spandsp/plc.h
libs/spandsp/src/spandsp/power_meter.h
libs/spandsp/src/spandsp/queue.h
libs/spandsp/src/spandsp/saturated.h
libs/spandsp/src/spandsp/schedule.h
libs/spandsp/src/spandsp/sig_tone.h
libs/spandsp/src/spandsp/silence_gen.h
libs/spandsp/src/spandsp/super_tone_rx.h
libs/spandsp/src/spandsp/super_tone_tx.h
libs/spandsp/src/spandsp/t30.h
libs/spandsp/src/spandsp/t30_api.h
libs/spandsp/src/spandsp/t30_logging.h
libs/spandsp/src/spandsp/t31.h
libs/spandsp/src/spandsp/t38_core.h
libs/spandsp/src/spandsp/t38_gateway.h
libs/spandsp/src/spandsp/t38_non_ecm_buffer.h
libs/spandsp/src/spandsp/t38_terminal.h
libs/spandsp/src/spandsp/t4.h
libs/spandsp/src/spandsp/telephony.h
libs/spandsp/src/spandsp/time_scale.h
libs/spandsp/src/spandsp/tone_detect.h
libs/spandsp/src/spandsp/tone_generate.h
libs/spandsp/src/spandsp/v17rx.h
libs/spandsp/src/spandsp/v17tx.h
libs/spandsp/src/spandsp/v22bis.h
libs/spandsp/src/spandsp/v27ter_rx.h
libs/spandsp/src/spandsp/v27ter_tx.h
libs/spandsp/src/spandsp/v29rx.h
libs/spandsp/src/spandsp/v29tx.h
libs/spandsp/src/spandsp/v42.h
libs/spandsp/src/spandsp/v42bis.h
libs/spandsp/src/spandsp/v8.h
libs/spandsp/src/spandsp/version.h
libs/spandsp/src/super_tone_rx.c
libs/spandsp/src/super_tone_tx.c
libs/spandsp/src/t30.c
libs/spandsp/src/t30_api.c
libs/spandsp/src/t30_logging.c
libs/spandsp/src/t31.c
libs/spandsp/src/t35.c
libs/spandsp/src/t38_core.c
libs/spandsp/src/t38_gateway.c
libs/spandsp/src/t38_non_ecm_buffer.c
libs/spandsp/src/t38_terminal.c
libs/spandsp/src/t4.c
libs/spandsp/src/time_scale.c
libs/spandsp/src/tone_detect.c
libs/spandsp/src/tone_generate.c
libs/spandsp/src/v17rx.c
libs/spandsp/src/v17tx.c
libs/spandsp/src/v22bis_rx.c
libs/spandsp/src/v22bis_tx.c
libs/spandsp/src/v27ter_rx.c
libs/spandsp/src/v27ter_tx.c
libs/spandsp/src/v29rx.c
libs/spandsp/src/v29tx.c
libs/spandsp/src/v42.c
libs/spandsp/src/v42bis.c
libs/spandsp/src/v8.c
libs/spandsp/src/vector_float.c
libs/spandsp/src/vector_int.c
libs/spandsp/tests/t31_tests.c

index ce8d520ddde3556099df48733299c1272fd85cc3..fda45b8b434ef521619d3c52d298534377394303 100644 (file)
@@ -22,7 +22,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: g1050.c,v 1.12 2009/01/31 08:48:10 steveu Exp $
+ * $Id: g1050.c,v 1.13 2009/02/03 16:28:39 steveu Exp $
  */
 
 #if defined(HAVE_CONFIG_H)
@@ -37,7 +37,6 @@
 #include <stdio.h>
 #include <fcntl.h>
 #include <audiofile.h>
-#include "floating_fudge.h"
 #if defined(HAVE_TGMATH_H)
 #include <tgmath.h>
 #endif
@@ -45,6 +44,7 @@
 #define GEN_CONST
 #include <math.h>
 #endif
+#include "floating_fudge.h"
 
 #include "spandsp.h"
 #include "spandsp/g1050.h"
index c147fe6ba0b14cf45488d6e5f8e3c825a63584b1..890f91dcc100e1d0e7c60cf3663c3bfbd66321c7 100644 (file)
@@ -22,7 +22,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: line_model.c,v 1.7 2008/11/30 10:17:30 steveu Exp $
+ * $Id: line_model.c,v 1.8 2009/02/03 16:28:39 steveu Exp $
  */
 
 #if defined(HAVE_CONFIG_H)
@@ -37,7 +37,6 @@
 #include <stdio.h>
 #include <fcntl.h>
 #include <audiofile.h>
-#include "floating_fudge.h"
 #if defined(HAVE_TGMATH_H)
 #include <tgmath.h>
 #endif
@@ -45,6 +44,7 @@
 #define GEN_CONST
 #include <math.h>
 #endif
+#include "floating_fudge.h"
 
 #define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
 #include "spandsp.h"
index 2abf08dd1cabab8f620a5fb4e8ee2bdaebe2b5da..62a46f38b3629fccfca14c6e8a757df1473665b5 100644 (file)
@@ -22,7 +22,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: make_line_models.c,v 1.7 2008/07/25 13:56:54 steveu Exp $
+ * $Id: make_line_models.c,v 1.8 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \page make_line_models_page Telephony line model construction
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include "floating_fudge.h"
-#if defined(HAVE_FFTW3_H)
-#include <fftw3.h>
-#else
-#include <fftw.h>
-#endif
 #if defined(HAVE_TGMATH_H)
 #include <tgmath.h>
 #endif
 #if defined(HAVE_MATH_H)
 #include <math.h>
 #endif
+#include "floating_fudge.h"
+#if defined(HAVE_FFTW3_H)
+#include <fftw3.h>
+#else
+#include <fftw.h>
+#endif
 
 #include "spandsp.h"
 
index 0bce60151950388f08f8dc5e5e067269c3cf2463..15ff7c37325370a60c5e8502b79362668c255da8 100644 (file)
@@ -22,7 +22,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: rfc2198_sim.c,v 1.6 2008/07/02 14:48:25 steveu Exp $
+ * $Id: rfc2198_sim.c,v 1.7 2009/02/03 16:28:39 steveu Exp $
  */
 
 #if defined(HAVE_CONFIG_H)
@@ -37,7 +37,6 @@
 #include <stdio.h>
 #include <fcntl.h>
 #include <audiofile.h>
-#include "floating_fudge.h"
 #if defined(HAVE_TGMATH_H)
 #include <tgmath.h>
 #endif
@@ -45,6 +44,7 @@
 #define GEN_CONST
 #include <math.h>
 #endif
+#include "floating_fudge.h"
 
 #include "spandsp.h"
 #include "spandsp/g1050.h"
index bbde3139d30055c35ebf6ce6e5e277f5ab302402..1183e30804241151cf5ef5de07ec567d05f20489 100644 (file)
@@ -22,7 +22,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: test_utils.c,v 1.11 2009/01/31 08:48:10 steveu Exp $
+ * $Id: test_utils.c,v 1.12 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
 #include <inttypes.h>
 #include <string.h>
 #include <stdio.h>
-#include "floating_fudge.h"
 #if defined(HAVE_TGMATH_H)
 #include <tgmath.h>
 #endif
 #if defined(HAVE_MATH_H)
 #include <math.h>
 #endif
+#include "floating_fudge.h"
 #include <time.h>
 #include <fcntl.h>
 #include <audiofile.h>
index c76a83dfdc14a3d00625dfca73e55a4bf33821f8..9edd3e27b26c6b120cedf1caa58e8b8ebe76df61 100644 (file)
@@ -16,7 +16,7 @@
 ## License along with this program; if not, write to the Free Software
 ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 ##
-## $Id: Makefile.am,v 1.121 2009/01/31 12:24:11 steveu Exp $
+## $Id: Makefile.am,v 1.122 2009/02/03 16:33:13 steveu Exp $
 
 AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
 AM_LDFLAGS = $(COMP_VENDOR_LDFLAGS)
@@ -143,6 +143,7 @@ nobase_include_HEADERS = spandsp/adsi.h \
                          spandsp/dds.h \
                          spandsp/dtmf.h \
                          spandsp/echo.h \
+                         spandsp/fast_convert.h \
                          spandsp/fax.h \
                          spandsp/fax_modems.h \
                          spandsp/fir.h \
index c40b2036f8887fcab6dd0f6c15754ad850cbe5ff..644aad26aafa37eccaca06315dfd5dbd74e13642 100644 (file)
@@ -23,7 +23,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: adsi.c,v 1.68 2009/01/29 01:41:05 steveu Exp $
+ * $Id: adsi.c,v 1.69 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -46,6 +46,7 @@
 #include <assert.h>
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/logging.h"
 #include "spandsp/queue.h"
 #include "spandsp/complex.h"
@@ -412,9 +413,9 @@ SPAN_DECLARE(int) adsi_rx(adsi_rx_state_t *s, const int16_t *amp, int len)
 /*- End of function --------------------------------------------------------*/
 
 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 standard,
+                                             put_msg_func_t put_msg,
+                                             void *user_data)
 {
     if (s == NULL)
     {
@@ -490,10 +491,10 @@ SPAN_DECLARE(void) adsi_tx_send_alert_tone(adsi_tx_state_t *s)
 /*- End of function --------------------------------------------------------*/
 
 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)
+                                        int preamble_len,
+                                        int preamble_ones_len,
+                                        int postamble_ones_len,
+                                        int stop_bits)
 {
     if (preamble_len < 0)
     {
index 268dd7fa88d5c4aa09958607c236edd420eab91f..1b7ff8813c3a9c20f4d54172d6fe8700d15defcc 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: async.c,v 1.15 2009/01/05 13:48:31 steveu Exp $
+ * $Id: async.c,v 1.16 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -73,12 +73,12 @@ SPAN_DECLARE(const char *) signal_status_to_str(int status)
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(async_rx_state_t *) async_rx_init(async_rx_state_t *s,
-                                int data_bits,
-                                int parity,
-                                int stop_bits,
-                                int use_v14,
-                                put_byte_func_t put_byte,
-                                void *user_data)
+                                               int data_bits,
+                                               int parity,
+                                               int stop_bits,
+                                               int use_v14,
+                                               put_byte_func_t put_byte,
+                                               void *user_data)
 {
     if (s == NULL)
     {
@@ -103,7 +103,7 @@ SPAN_DECLARE(async_rx_state_t *) async_rx_init(async_rx_state_t *s,
 }
 /*- End of function --------------------------------------------------------*/
 
-void async_rx_put_bit(void *user_data, int bit)
+SPAN_DECLARE(void) async_rx_put_bit(void *user_data, int bit)
 {
     async_rx_state_t *s;
 
@@ -185,12 +185,12 @@ void async_rx_put_bit(void *user_data, int bit)
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(async_tx_state_t *) async_tx_init(async_tx_state_t *s,
-                                int data_bits,
-                                int parity,
-                                int stop_bits,
-                                int use_v14,
-                                get_byte_func_t get_byte,
-                                void *user_data)
+                                               int data_bits,
+                                               int parity,
+                                               int stop_bits,
+                                               int use_v14,
+                                               get_byte_func_t get_byte,
+                                               void *user_data)
 {
     if (s == NULL)
     {
@@ -216,7 +216,7 @@ SPAN_DECLARE(async_tx_state_t *) async_tx_init(async_tx_state_t *s,
 }
 /*- End of function --------------------------------------------------------*/
 
-int async_tx_get_bit(void *user_data)
+SPAN_DECLARE(int) async_tx_get_bit(void *user_data)
 {
     async_tx_state_t *s;
     int bit;
index 0bda5af19f29d9e2a9a5600d049d413e63f9baa4..bd5d6ee2b19ed518772c8f29c870fc40e29c95ed 100644 (file)
@@ -25,7 +25,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: at_interpreter.c,v 1.34 2009/01/16 15:13:16 steveu Exp $
+ * $Id: at_interpreter.c,v 1.35 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -5292,10 +5292,10 @@ SPAN_DECLARE(void) at_set_class1_handler(at_state_t *s, at_class1_handler_t hand
 /*- End of function --------------------------------------------------------*/
 
 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)
+                                   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)
 {
     if (s == NULL)
     {
index 005db939fdf5f537f3cb22fe7969012976302b62..9e1095a7495e06b78ff782f9df7fecef59a6c6d6 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: awgn.c,v 1.20 2009/01/28 03:41:26 steveu Exp $
+ * $Id: awgn.c,v 1.21 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -57,6 +57,7 @@
 #include "floating_fudge.h"
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/saturated.h"
 #include "spandsp/awgn.h"
 
index 83dd014d3203e0274d59064ba3cd6063ae861164..0e92cc714b8c5742444ad1d98aa73f1286ca9fb0 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: bell_r2_mf.c,v 1.36 2009/01/31 08:48:10 steveu Exp $
+ * $Id: bell_r2_mf.c,v 1.37 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -45,6 +45,7 @@
 #include "floating_fudge.h"
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/queue.h"
 #include "spandsp/dc_restore.h"
 #include "spandsp/complex.h"
@@ -612,8 +613,8 @@ SPAN_DECLARE(size_t) bell_mf_rx_get(bell_mf_rx_state_t *s, char *buf, int max)
 /*- End of function --------------------------------------------------------*/
 
 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)
+                                                   digits_rx_callback_t callback,
+                                                   void *user_data)
 {
     int i;
     static int initialised = FALSE;
@@ -785,9 +786,9 @@ SPAN_DECLARE(int) r2_mf_rx_get(r2_mf_rx_state_t *s)
 /*- End of function --------------------------------------------------------*/
 
 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)
+                                               int fwd,
+                                               tone_report_func_t callback,
+                                               void *user_data)
 {
     int i;
     static int initialised = FALSE;
index 5615ddd307a0ac7485937ed1c31f16e1964b29b8..5ae7688862ce61d79e8247adb58a1aa02a6314fb 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: bert.c,v 1.30 2008/11/30 13:44:35 steveu Exp $
+ * $Id: bert.c,v 1.31 2009/02/03 16:28:39 steveu Exp $
  */
 
 #if defined(HAVE_CONFIG_H)
index 5601dfedad831b6db59f60b499660887d6362863..547536b68c1a3bd04c7f6807d7e6534e7fa858b9 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: bit_operations.c,v 1.15 2008/06/28 01:13:08 steveu Exp $
+ * $Id: bit_operations.c,v 1.16 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -69,7 +69,7 @@ SPAN_DECLARE(uint32_t) bit_reverse_4bytes(uint32_t x)
 /*- End of function --------------------------------------------------------*/
 
 #if defined(__x86_64__)
-uint64_t bit_reverse_8bytes(uint64_t x)
+SPAN_DECLARE(uint64_t) bit_reverse_8bytes(uint64_t x)
 {
     x = ((x & 0xF0F0F0F0F0F0F0F0LLU) >> 4) | ((x & 0x0F0F0F0F0F0F0F0FLLU) << 4);
     x = ((x & 0xCCCCCCCCCCCCCCCCLLU) >> 2) | ((x & 0x3333333333333333LLU) << 2);
index 128cc1e6387797407fffb77de64d8d5a744f07d5..914836f0107db2898f8af134e8bfd786ed1785ba 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: bitstream.c,v 1.16 2009/01/05 13:48:31 steveu Exp $
+ * $Id: bitstream.c,v 1.17 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -41,7 +41,7 @@
 
 #include "spandsp/private/bitstream.h"
 
-void bitstream_put(bitstream_state_t *s, uint8_t **c, uint32_t value, int bits)
+SPAN_DECLARE(void) bitstream_put(bitstream_state_t *s, uint8_t **c, uint32_t value, int bits)
 {
     value &= ((1 << bits) - 1);
     if (s->residue + bits <= 32)
@@ -58,7 +58,7 @@ void bitstream_put(bitstream_state_t *s, uint8_t **c, uint32_t value, int bits)
 }
 /*- End of function --------------------------------------------------------*/
 
-void bitstream_put2(bitstream_state_t *s, uint8_t **c, uint32_t value, int bits)
+SPAN_DECLARE(void) bitstream_put2(bitstream_state_t *s, uint8_t **c, uint32_t value, int bits)
 {
     value &= ((1 << bits) - 1);
     if (s->residue + bits <= 32)
@@ -74,7 +74,7 @@ void bitstream_put2(bitstream_state_t *s, uint8_t **c, uint32_t value, int bits)
 }
 /*- End of function --------------------------------------------------------*/
 
-uint32_t bitstream_get(bitstream_state_t *s, const uint8_t **c, int bits)
+SPAN_DECLARE(uint32_t) bitstream_get(bitstream_state_t *s, const uint8_t **c, int bits)
 {
     uint32_t x;
 
@@ -90,7 +90,7 @@ uint32_t bitstream_get(bitstream_state_t *s, const uint8_t **c, int bits)
 }
 /*- End of function --------------------------------------------------------*/
 
-uint32_t bitstream_get2(bitstream_state_t *s, const uint8_t **c, int bits)
+SPAN_DECLARE(uint32_t) bitstream_get2(bitstream_state_t *s, const uint8_t **c, int bits)
 {
     uint32_t x;
 
@@ -105,7 +105,7 @@ uint32_t bitstream_get2(bitstream_state_t *s, const uint8_t **c, int bits)
 }
 /*- End of function --------------------------------------------------------*/
 
-void bitstream_flush(bitstream_state_t *s, uint8_t **c)
+SPAN_DECLARE(void) bitstream_flush(bitstream_state_t *s, uint8_t **c)
 {
     if (s->residue > 0)
     {
@@ -115,7 +115,7 @@ void bitstream_flush(bitstream_state_t *s, uint8_t **c)
 }
 /*- End of function --------------------------------------------------------*/
 
-void bitstream_flush2(bitstream_state_t *s, uint8_t **c)
+SPAN_DECLARE(void) bitstream_flush2(bitstream_state_t *s, uint8_t **c)
 {
     if (s->residue > 0)
     {
@@ -125,7 +125,7 @@ void bitstream_flush2(bitstream_state_t *s, uint8_t **c)
 }
 /*- End of function --------------------------------------------------------*/
 
-bitstream_state_t *bitstream_init(bitstream_state_t *s)
+SPAN_DECLARE(bitstream_state_t *) bitstream_init(bitstream_state_t *s)
 {
     if (s == NULL)
         return NULL;
index 79a57c14fbfe383a0f39f5c6d956a9a01d49bee5..7ae4a1323e7804a27662c93cdf0bc9e63dfab26f 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: complex_filters.c,v 1.15 2009/01/31 08:48:10 steveu Exp $
+ * $Id: complex_filters.c,v 1.16 2009/02/03 16:28:39 steveu Exp $
  */
 
 #if defined(HAVE_CONFIG_H)
@@ -53,17 +53,20 @@ SPAN_DECLARE(filter_t *) filter_create(fspec_t *fs)
     }
     return fi;
 }
+/*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(void) filter_delete(filter_t *fi)
 {
     if (fi)
         free(fi);
 }
+/*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(float) filter_step(filter_t *fi, float x)
 {
     return fi->fs->fsf(fi, x);
 }
+/*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(cfilter_t *) cfilter_create(fspec_t *fs)
 {
@@ -85,6 +88,7 @@ SPAN_DECLARE(cfilter_t *) cfilter_create(fspec_t *fs)
     }
     return cfi;
 }
+/*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(void) cfilter_delete(cfilter_t *cfi)
 {
@@ -94,6 +98,7 @@ SPAN_DECLARE(void) cfilter_delete(cfilter_t *cfi)
         filter_delete(cfi->imf);
     }
 }
+/*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(complexf_t) cfilter_step(cfilter_t *cfi, const complexf_t *z)
 {
@@ -103,3 +108,5 @@ SPAN_DECLARE(complexf_t) cfilter_step(cfilter_t *cfi, const complexf_t *z)
     cc.im = filter_step(cfi->imf, z->im);
     return cc;
 }
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
index 06ba4b5951bd5c7cb29df4488792a83bb0f63a9c..c6230f377cc9d4cde17e3f4af395c073b318eb0a 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: complex_vector_float.c,v 1.14 2009/01/28 03:41:26 steveu Exp $
+ * $Id: complex_vector_float.c,v 1.15 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -135,7 +135,7 @@ SPAN_DECLARE(void) cvec_mul(complex_t z[], const complex_t x[], const complex_t
 /*- End of function --------------------------------------------------------*/
 
 #if defined(HAVE_LONG_DOUBLE)
-void cvec_mull(complexl_t z[], const complexl_t x[], const complexl_t y[], int n)
+SPAN_DECLARE(void) cvec_mull(complexl_t z[], const complexl_t x[], const complexl_t y[], int n)
 {
     int i;
 
@@ -179,7 +179,7 @@ SPAN_DECLARE(complex_t) cvec_dot_prod(const complex_t x[], const complex_t y[],
 /*- End of function --------------------------------------------------------*/
 
 #if defined(HAVE_LONG_DOUBLE)
-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)
 {
     int i;
     complexl_t z;
index 63afd27308c7e0816184575851c9231bdac6ac69..1d8d0fb423146d1fb667dbb89aa005dabd1b6ab2 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: complex_vector_int.c,v 1.6 2009/01/28 03:41:26 steveu Exp $
+ * $Id: complex_vector_int.c,v 1.7 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
index 7c8e2988c330772cc95be45676c4d4d30c7cd5d1..c82c58e3ab964ae9c9909dd66a2072fdec2a446a 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: crc.c,v 1.5 2009/01/05 13:48:31 steveu Exp $
+ * $Id: crc.c,v 1.6 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
index 44e0ee702dcb9a2f33e0a0c6eebf8c61f7cca2fa..8acf7c0c3b8a4a4fd49a164d25f9119879b39e8d 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: dds_float.c,v 1.10 2009/01/28 03:41:26 steveu Exp $
+ * $Id: dds_float.c,v 1.11 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
index 04e718b2160486837a77359ffea8b45bc331ec5f..56902d6fe1e719d1f16ef9f9081e1bf34ec1a06e 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: dds_int.c,v 1.14 2009/01/29 01:41:05 steveu Exp $
+ * $Id: dds_int.c,v 1.15 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
index 50bab6c143ba0c37e044aee680e6df75bc26af04..2d5f607ca618f15ba9a3798c146b8f10b2d4f88c 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: dtmf.c,v 1.49 2009/01/31 08:48:10 steveu Exp $
+ * $Id: dtmf.c,v 1.50 2009/02/03 16:28:39 steveu Exp $
  */
  
 /*! \file dtmf.h */
@@ -46,6 +46,7 @@
 #include <fcntl.h>
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/queue.h"
 #include "spandsp/complex.h"
 #include "spandsp/dds.h"
@@ -251,7 +252,7 @@ SPAN_DECLARE(int) dtmf_rx(dtmf_rx_state_t *s, const int16_t amp[], int samples)
                     /* Avoid reporting multiple no digit conditions on flaky hits */
                     if (s->in_digit  ||  hit)
                     {
-                        i = (s->in_digit  &&  !hit)  ?  -99  :  lrintf(log10f(s->energy)*10.0f - DTMF_POWER_OFFSET + DBM0_MAX_POWER);
+                        i = (s->in_digit  &&  !hit)  ?  -99  :  lfastrintf(log10f(s->energy)*10.0f - DTMF_POWER_OFFSET + DBM0_MAX_POWER);
                         s->realtime_callback(s->realtime_callback_data, hit, i, 0);
                     }
                 }
@@ -322,8 +323,8 @@ SPAN_DECLARE(size_t) dtmf_rx_get(dtmf_rx_state_t *s, char *buf, int max)
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(void) dtmf_rx_set_realtime_callback(dtmf_rx_state_t *s,
-                                   tone_report_func_t callback,
-                                   void *user_data)
+                                                 tone_report_func_t callback,
+                                                 void *user_data)
 {
     s->realtime_callback = callback;
     s->realtime_callback_data = user_data;
@@ -331,10 +332,10 @@ SPAN_DECLARE(void) dtmf_rx_set_realtime_callback(dtmf_rx_state_t *s,
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(void) dtmf_rx_parms(dtmf_rx_state_t *s,
-                   int filter_dialtone,
-                   int twist,
-                   int reverse_twist,
-                   int threshold)
+                                 int filter_dialtone,
+                                 int twist,
+                                 int reverse_twist,
+                                 int threshold)
 {
     float x;
 
@@ -359,8 +360,8 @@ SPAN_DECLARE(void) dtmf_rx_parms(dtmf_rx_state_t *s,
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(dtmf_rx_state_t *) dtmf_rx_init(dtmf_rx_state_t *s,
-                              digits_rx_callback_t callback,
-                              void *user_data)
+                                             digits_rx_callback_t callback,
+                                             void *user_data)
 {
     int i;
     static int initialised = FALSE;
index a10eb3f26e755a485e426d8eb51433842df94ac9..01ceb3c7141fd23d83af24cb90e7066ec3815d46 100644 (file)
@@ -27,7 +27,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: echo.c,v 1.30 2009/01/28 03:41:26 steveu Exp $
+ * $Id: echo.c,v 1.31 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -95,6 +95,7 @@
 #include <stdio.h>
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/logging.h"
 #include "spandsp/saturated.h"
 #include "spandsp/dc_restore.h"
index acbc7354438744eebdf7b64f47c2f8a130ce1eb0..a34eef5c9e7d68ec3298bb4d70c4c33e2d5e7cc8 100644 (file)
@@ -23,7 +23,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: fax.c,v 1.84 2009/01/28 03:41:26 steveu Exp $
+ * $Id: fax.c,v 1.85 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
index 16c5b0b8cfb35f1fb3b389a788689046d8712759..a959e20f85b77076d68e492e36e4d818518170c2 100644 (file)
@@ -25,7 +25,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: floating_fudge.h,v 1.6 2009/01/29 01:41:05 steveu Exp $
+ * $Id: floating_fudge.h,v 1.7 2009/02/03 16:28:39 steveu Exp $
  */
 
 #if !defined(_FLOATING_FUDGE_H_)
@@ -130,367 +130,6 @@ static __inline__ float log10f(float x)
 }
 #endif
 
-/* The following code, to handle issues with lrint() and lrintf() on various
- * platforms, is adapted from similar code in libsndfile, which is:
- *
- * Copyright (C) 2001-2004 Erik de Castro Lopo <erikd@mega-nerd.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- */
-
-/*
- *    On Intel Pentium processors (especially PIII and probably P4), converting
- *    from float to int is very slow. To meet the C specs, the code produced by
- *    most C compilers targeting Pentium needs to change the FPU rounding mode
- *    before the float to int conversion is performed.
- *
- *    Changing the FPU rounding mode causes the FPU pipeline to be flushed. It
- *    is this flushing of the pipeline which is so slow.
- *
- *    Fortunately the ISO C99 specification defines the functions lrint, lrintf,
- *    llrint and llrintf which fix this problem as a side effect.
- *
- *    On Unix-like systems, the configure process should have detected the
- *    presence of these functions. If they weren't found we have to replace them
- *    here with a standard C cast.
- */
-
-/*
- *    The C99 prototypes for these functions are as follows:
- *
- *        int rintf(float x);
- *        int rint(double x);
- *        long int lrintf(float x);
- *        long int lrint(double x);
- *        long long int llrintf(float x);
- *        long long int llrint(double x);
- *
- *    The presence of the required functions are detected during the configure
- *    process and the values HAVE_LRINT and HAVE_LRINTF are set accordingly in
- *    the config file.
- */
-
-#if defined(__CYGWIN__)
-    /*
-     *    CYGWIN has lrint and lrintf functions, but they are slow and buggy:
-     *        http://sourceware.org/ml/cygwin/2005-06/msg00153.html
-     *        http://sourceware.org/ml/cygwin/2005-09/msg00047.html
-     *    The latest version of cygwin seems to have made no effort to fix this.
-     *    These replacement functions (pulled from the Public Domain MinGW
-     *    math.h header) replace the native versions.
-     */
-    static __inline__ long int lrint(double x)
-    {
-        long int retval;
-
-        __asm__ __volatile__
-        (
-            "fistpl %0"
-            : "=m" (retval)
-            : "t" (x)
-            : "st"
-        );
-
-        return retval;
-    }
-
-    static __inline__ long int lrintf(float x)
-    {
-        long int retval;
-
-        __asm__ __volatile__
-        (
-            "fistpl %0"
-            : "=m" (retval)
-            : "t" (x)
-            : "st"
-        );
-        return retval;
-    }
-
-    static __inline__ long int lfastrint(double x)
-    {
-        long int retval;
-
-        __asm__ __volatile__
-        (
-            "fistpl %0"
-            : "=m" (retval)
-            : "t" (x)
-            : "st"
-        );
-
-        return retval;
-    }
-
-    static __inline__ long int lfastrintf(float x)
-    {
-        long int retval;
-
-        __asm__ __volatile__
-        (
-            "fistpl %0"
-            : "=m" (retval)
-            : "t" (x)
-            : "st"
-        );
-        return retval;
-    }
-#elif defined(HAVE_LRINT)  &&  defined(HAVE_LRINTF)
-
-#if defined(__i386__)
-    /* These routines are guaranteed fast on an i386 machine. Using the built in
-       lrint() and lrintf() should be similar, but they may not always be enabled.
-       Sometimes, especially with "-O0", you might get slow calls to routines. */
-    static __inline__ long int lfastrint(double x)
-    {
-        long int retval;
-
-        __asm__ __volatile__
-        (
-            "fistpl %0"
-            : "=m" (retval)
-            : "t" (x)
-            : "st"
-        );
-
-        return retval;
-    }
-
-    static __inline__ long int lfastrintf(float x)
-    {
-        long int retval;
-
-        __asm__ __volatile__
-        (
-            "fistpl %0"
-            : "=m" (retval)
-            : "t" (x)
-            : "st"
-        );
-        return retval;
-    }
-#elif defined(__x86_64__)
-    /* On an x86_64 machine, the fastest thing seems to be a pure assignment from a
-       double or float to an int. It looks like the design on the x86_64 took account
-       of the default behaviour specified for C. */
-    static __inline__ long int lfastrint(double x)
-    {
-        return (long int) (x);
-    }
-
-    static __inline__ long int lfastrintf(float x)
-    {
-        return (long int) (x);
-    }
-#elif defined(__ppc__)  ||   defined(__powerpc__)
-    static __inline__ long int lfastrint(register double x)
-    {
-        int res[2];
-
-        __asm__ __volatile__
-        (
-            "fctiw %1, %1\n\t"
-            "stfd %1, %0"
-            : "=m" (res)    /* Output */
-            : "f" (x)       /* Input */
-            : "memory"
-        );
-
-        return res[1];
-    }
-
-    static __inline__ long int lfastrintf(register float x)
-    {
-        int res[2];
-
-        __asm__ __volatile__
-        (
-            "fctiw %1, %1\n\t"
-            "stfd %1, %0"
-            : "=m" (res)    /* Output */
-            : "f" (x)       /* Input */
-            : "memory"
-        );
-
-        return res[1];
-    }
-#endif
-
-#elif defined(WIN32)  ||  defined(_WIN32)
-    /*
-     *    Win32 doesn't seem to have the lrint() and lrintf() functions.
-     *    Therefore implement inline versions of these functions here.
-     */
-    __inline long int lrint(double x)
-    {
-        long int i;
-
-        _asm
-        {
-            fld x
-            fistp i
-        };
-        return i;
-    }
-
-    __inline long int lrintf(float x)
-    {
-        long int i;
-
-        _asm
-        {
-            fld x
-            fistp i
-        };
-        return i;
-    }
-
-    __inline float rintf(float flt)
-    {
-       _asm
-       {       fld flt
-               frndint
-       }
-    }
-
-    __inline double rint(double dbl)
-    {
-        __asm 
-       {
-            fld dbl
-            frndint
-        }
-    }
-
-    __inline long int lfastrint(double x)
-    {
-        long int i;
-
-        _asm
-        {
-            fld x
-            fistp i
-        };
-        return i;
-    }
-
-    __inline long int lfastrintf(float x)
-    {
-        long int i;
-
-        _asm
-        {
-            fld x
-            fistp i
-        };
-        return i;
-    }
-#elif defined(WIN64)  ||  defined(_WIN64)
-    /*
-     *    Win64 machines will do best with a simple assignment.
-     */
-    __inline long int lfastrint(double x)
-    {
-        return (long int) (x);
-    }
-
-    __inline long int lfastrintf(float x)
-    {
-        return (long int) (x);
-    }
-#elif defined(__MWERKS__)  &&  defined(macintosh)
-    /* This MacOS 9 solution was provided by Stephane Letz */
-
-    long int __inline__ lfastrint(register double x)
-    {
-        long int res[2];
-
-        asm
-        {
-            fctiw x, x
-            stfd x, res
-        }
-        return res[1];
-    }
-
-    long int __inline__ lfastrintf(register float x)
-    {
-        long int res[2];
-
-        asm
-        {
-            fctiw x, x
-            stfd x, res
-        }
-        return res[1];
-    }
-
-#elif defined(__MACH__)  &&  defined(__APPLE__)  &&  (defined(__ppc__)  ||  defined(__powerpc__))
-    /* For Apple Mac OS/X - do recent versions still need this? */
-
-    static __inline__ long int lfastrint(register double x)
-    {
-        int res[2];
-
-        __asm__ __volatile__
-        (
-            "fctiw %1, %1\n\t"
-            "stfd %1, %0"
-            : "=m" (res)    /* Output */
-            : "f" (x)       /* Input */
-            : "memory"
-        );
-
-        return res[1];
-    }
-
-    static __inline__ long int lfastrintf(register float x)
-    {
-        int res[2];
-
-        __asm__ __volatile__
-        (
-            "fctiw %1, %1\n\t"
-            "stfd %1, %0"
-            : "=m" (res)    /* Output */
-            : "f" (x)       /* Input */
-            : "memory"
-        );
-
-        return res[1];
-    }
-#else
-    /* There is nothing else to do, but use a simple casting operation, instead of a real
-       rint() type function. Since we are only trying to use rint() to speed up conversions,
-       the accuracy issues related to changing the rounding scheme are of little concern
-       to us. */
-
-    #if !defined(__sgi)
-        #warning "No usable lrint() and lrintf() functions available."
-        #warning "Replacing these functions with a simple C cast."
-    #endif
-
-    static __inline__ long int lfastrint(double x)
-    {
-        return (long int) (x);
-    }
-
-    static __inline__ long int lfastrintf(float x)
-    {
-        return (long int) (x);
-    }
-
-#endif
-
 #if defined(__cplusplus)
 }
 #endif
index a06197351d12c00b754cbaa261d62aecac124046..fce99243ad0c02bcdf538236e43b3a093b29476a 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: fsk.c,v 1.50 2009/01/29 18:30:14 steveu Exp $
+ * $Id: fsk.c,v 1.51 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -121,9 +121,9 @@ const fsk_spec_t preset_fsk_specs[] =
 };
 
 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)
+                                           const fsk_spec_t *spec,
+                                           get_bit_func_t get_bit,
+                                           void *user_data)
 {
     if (s == NULL)
     {
@@ -231,10 +231,10 @@ SPAN_DECLARE(void) fsk_rx_set_modem_status_handler(fsk_rx_state_t *s, modem_tx_s
 /*- End of function --------------------------------------------------------*/
 
 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)
+                                           const fsk_spec_t *spec,
+                                           int sync_mode,
+                                           put_bit_func_t put_bit,
+                                           void *user_data)
 {
     int chop;
 
index 418933484985a42b7e664f338ac1eb72e20a3128..eeea9ada04965744c2506544759f116456a4e880 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: g711.c,v 1.14 2009/01/28 03:41:26 steveu Exp $
+ * $Id: g711.c,v 1.15 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -98,9 +98,9 @@ SPAN_DECLARE(uint8_t) ulaw_to_alaw(uint8_t ulaw)
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(int) g711_decode(g711_state_t *s,
-                int16_t amp[],
-                const uint8_t g711_data[],
-                int g711_bytes)
+                              int16_t amp[],
+                              const uint8_t g711_data[],
+                              int g711_bytes)
 {
     int i;
 
@@ -122,9 +122,9 @@ SPAN_DECLARE(int) g711_decode(g711_state_t *s,
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(int) g711_encode(g711_state_t *s,
-                uint8_t g711_data[],
-                const int16_t amp[],
-                int len)
+                              uint8_t g711_data[],
+                              const int16_t amp[],
+                              int len)
 {
     int i;
 
@@ -146,9 +146,9 @@ SPAN_DECLARE(int) g711_encode(g711_state_t *s,
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(int) g711_transcode(g711_state_t *s,
-                   uint8_t g711_out[],
-                   const uint8_t g711_in[],
-                   int g711_bytes)
+                                 uint8_t g711_out[],
+                                 const uint8_t g711_in[],
+                                 int g711_bytes)
 {
     int i;
 
index e0559b8ff1f4a73d1cfa52444886bba496599f2d..195c31d50cf67b98eb40589fec66d9a9567c011b 100644 (file)
@@ -28,7 +28,7 @@
  * Computer Science, Speech Group
  * Chengxiang Lu and Alex Hauptmann
  *
- * $Id: g722.c,v 1.6 2009/01/29 18:30:14 steveu Exp $
+ * $Id: g722.c,v 1.7 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -49,6 +49,7 @@
 #include "floating_fudge.h"
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/saturated.h"
 #include "spandsp/vector_int.h"
 #include "spandsp/g722.h"
index f5208d870bc8676ede6eeb23b73831448a1a6991..57a0f4bf20ee81f15f9f28edf7dcd41207b361fb 100644 (file)
@@ -48,7 +48,7 @@
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  *
- * $Id: g726.c,v 1.26 2009/01/28 03:41:26 steveu Exp $
+ * $Id: g726.c,v 1.27 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -1065,9 +1065,9 @@ SPAN_DECLARE(int) g726_release(g726_state_t *s)
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(int) g726_decode(g726_state_t *s,
-                int16_t amp[],
-                const uint8_t g726_data[],
-                int g726_bytes)
+                              int16_t amp[],
+                              const uint8_t g726_data[],
+                              int g726_bytes)
 {
     int i;
     int samples;
@@ -1121,9 +1121,9 @@ SPAN_DECLARE(int) g726_decode(g726_state_t *s,
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(int) g726_encode(g726_state_t *s,
-                uint8_t g726_data[],
-                const int16_t amp[],
-                int len)
+                              uint8_t g726_data[],
+                              const int16_t amp[],
+                              int len)
 {
     int i;
     int g726_bytes;
index 1dc0d50ca3cace3350c852289af3ca07ee6804d1..1ab1e8e6bb36ab7adff947dc3b735b1f74183d9a 100644 (file)
@@ -25,7 +25,7 @@
  * This code is based on the widely used GSM 06.10 code available from
  * http://kbs.cs.tu-berlin.de/~jutta/toast.html
  *
- * $Id: gsm0610_decode.c,v 1.24 2009/01/28 03:41:26 steveu Exp $
+ * $Id: gsm0610_decode.c,v 1.25 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -47,6 +47,7 @@
 #include <memory.h>
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/bitstream.h"
 #include "spandsp/saturated.h"
 #include "spandsp/gsm0610.h"
index a68a0efd983cc0942a3f4dda97c15a2c89920871..b599b7528b40002cf9042ca3a9b03df3b1cf49e9 100644 (file)
@@ -25,7 +25,7 @@
  * This code is based on the widely used GSM 06.10 code available from
  * http://kbs.cs.tu-berlin.de/~jutta/toast.html
  *
- * $Id: gsm0610_encode.c,v 1.28 2009/01/28 03:41:26 steveu Exp $
+ * $Id: gsm0610_encode.c,v 1.29 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -47,6 +47,7 @@
 #include <memory.h>
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/bitstream.h"
 #include "spandsp/saturated.h"
 #include "spandsp/gsm0610.h"
index 2fc1df44ae5746fd81331973562f448448c7cda1..2f695dacb84c2634cb3573255cc94c9162425050 100644 (file)
@@ -25,7 +25,7 @@
  * This code is based on the widely used GSM 06.10 code available from
  * http://kbs.cs.tu-berlin.de/~jutta/toast.html
  *
- * $Id: gsm0610_long_term.c,v 1.20 2009/01/28 03:41:26 steveu Exp $
+ * $Id: gsm0610_long_term.c,v 1.21 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -46,6 +46,7 @@
 #include <stdlib.h>
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/bitstream.h"
 #include "spandsp/saturated.h"
 #include "spandsp/gsm0610.h"
index ac91c6e1fc625263782a408dc3b4d2a6e7d2340a..827b0b815bda9a96e0f9c6b69ab75383403d2439 100644 (file)
@@ -25,7 +25,7 @@
  * This code is based on the widely used GSM 06.10 code available from
  * http://kbs.cs.tu-berlin.de/~jutta/toast.html
  *
- * $Id: gsm0610_lpc.c,v 1.27 2009/01/28 03:41:26 steveu Exp $
+ * $Id: gsm0610_lpc.c,v 1.28 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -47,6 +47,7 @@
 #include <memory.h>
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/bitstream.h"
 #include "spandsp/bit_operations.h"
 #include "spandsp/saturated.h"
index bbccaf5c72d281100325294e13cc4623488fb418..3e94fa043d902b2bb992e1474ab2757460ac0869 100644 (file)
@@ -25,7 +25,7 @@
  * This code is based on the widely used GSM 06.10 code available from
  * http://kbs.cs.tu-berlin.de/~jutta/toast.html
  *
- * $Id: gsm0610_preprocess.c,v 1.16 2009/01/28 03:41:27 steveu Exp $
+ * $Id: gsm0610_preprocess.c,v 1.17 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -46,6 +46,7 @@
 #include <stdlib.h>
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/bitstream.h"
 #include "spandsp/saturated.h"
 #include "spandsp/gsm0610.h"
index a564132706822bb399b58833e71dfda552a54278..6e48b161fb5177d9db4683b2b5d2542d24e9148b 100644 (file)
@@ -25,7 +25,7 @@
  * This code is based on the widely used GSM 06.10 code available from
  * http://kbs.cs.tu-berlin.de/~jutta/toast.html
  *
- * $Id: gsm0610_rpe.c,v 1.24 2009/01/28 03:41:27 steveu Exp $
+ * $Id: gsm0610_rpe.c,v 1.25 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -46,6 +46,7 @@
 #include <stdlib.h>
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/bitstream.h"
 #include "spandsp/saturated.h"
 #include "spandsp/gsm0610.h"
index 127d85d9dac2da2e837f60d9d14aab4e388d20d0..7b1dfe082ab6072db9788c38ee36e58f543b9c5a 100644 (file)
@@ -25,7 +25,7 @@
  * This code is based on the widely used GSM 06.10 code available from
  * http://kbs.cs.tu-berlin.de/~jutta/toast.html
  *
- * $Id: gsm0610_short_term.c,v 1.18 2009/01/28 03:41:27 steveu Exp $
+ * $Id: gsm0610_short_term.c,v 1.19 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -46,6 +46,7 @@
 #include <stdlib.h>
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/bitstream.h"
 #include "spandsp/saturated.h"
 #include "spandsp/gsm0610.h"
index abd91a849f3fa019f4ff50b5d10abc044c09b8da..644a8c602dfdf943dfb0b3ec9f911993d35b5cd7 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: hdlc.c,v 1.68 2009/01/31 09:47:59 steveu Exp $
+ * $Id: hdlc.c,v 1.69 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -296,11 +296,11 @@ SPAN_DECLARE(void) hdlc_rx_set_octet_counting_report_interval(hdlc_rx_state_t *s
 /*- End of function --------------------------------------------------------*/
 
 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)
+                                             int crc32,
+                                             int report_bad_frames,
+                                             int framing_ok_threshold,
+                                             hdlc_frame_handler_t handler,
+                                             void *user_data)
 {
     if (s == NULL)
     {
@@ -319,7 +319,7 @@ SPAN_DECLARE(hdlc_rx_state_t *) hdlc_rx_init(hdlc_rx_state_t *s,
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(int) hdlc_rx_get_stats(hdlc_rx_state_t *s,
-                      hdlc_rx_stats_t *t)
+                                    hdlc_rx_stats_t *t)
 {
     t->bytes = s->rx_bytes;
     t->good_frames = s->rx_frames;
@@ -547,11 +547,11 @@ SPAN_DECLARE(void) hdlc_tx_set_max_frame_len(hdlc_tx_state_t *s, size_t max_len)
 /*- End of function --------------------------------------------------------*/
 
 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)
+                                             int crc32,
+                                             int inter_frame_flags,
+                                             int progressive,
+                                             hdlc_underflow_handler_t handler,
+                                             void *user_data)
 {
     if (s == NULL)
     {
index 6e41857b7a436ea025bf28836ac6f930976613e4..d3daf245eb2d0d7577c8e7e8672f0696c942ce7b 100644 (file)
@@ -23,7 +23,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: ima_adpcm.c,v 1.33 2009/01/28 03:41:27 steveu Exp $
+ * $Id: ima_adpcm.c,v 1.34 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -44,6 +44,7 @@
 #include "floating_fudge.h"
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/saturated.h"
 #include "spandsp/ima_adpcm.h"
 #include "spandsp/private/ima_adpcm.h"
@@ -299,9 +300,9 @@ SPAN_DECLARE(int) ima_adpcm_release(ima_adpcm_state_t *s)
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(int) ima_adpcm_decode(ima_adpcm_state_t *s,
-                     int16_t amp[],
-                     const uint8_t ima_data[],
-                     int ima_bytes)
+                                   int16_t amp[],
+                                   const uint8_t ima_data[],
+                                   int ima_bytes)
 {
     int i;
     int j;
@@ -415,9 +416,9 @@ SPAN_DECLARE(int) ima_adpcm_decode(ima_adpcm_state_t *s,
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(int) ima_adpcm_encode(ima_adpcm_state_t *s,
-                     uint8_t ima_data[],
-                     const int16_t amp[],
-                     int len)
+                                   uint8_t ima_data[],
+                                   const int16_t amp[],
+                                   int len)
 {
     int i;
     int bytes;
index 5ae91036352958faa5d29784dbb0e41d221cc1b6..bc7855109e17434529f9b450e0410adc00927892 100644 (file)
@@ -479,6 +479,10 @@ SOURCE=.\spandsp/echo.h
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=.\spandsp/fast_convert.h\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=.\spandsp/fax.h\r
 # End Source File\r
 # Begin Source File\r
index c87cace84cb9ecab58214282c33385bac00a9731..84a56fbe2431861eb0e777fc133ac26b0c0353a6 100644 (file)
                        Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
                        UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
                        >\r
-                       <File\r
-                               RelativePath="adsi.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="async.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="at_interpreter.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="awgn.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="bell_r2_mf.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="bert.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="bit_operations.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="bitstream.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="complex_filters.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="complex_vector_float.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="complex_vector_int.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="crc.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="dds_float.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="dds_int.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="dtmf.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="echo.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="fax.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="fsk.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="g711.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="g722.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="g726.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath=".\msvc\gettimeofday.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="gsm0610_decode.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="gsm0610_encode.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="gsm0610_long_term.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="gsm0610_lpc.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="gsm0610_preprocess.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="gsm0610_rpe.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="gsm0610_short_term.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="hdlc.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="ima_adpcm.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="logging.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="lpc10_analyse.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="lpc10_decode.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="lpc10_encode.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="lpc10_placev.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="lpc10_voicing.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="modem_connect_tones.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="modem_echo.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="noise.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="oki_adpcm.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="playout.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="plc.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="power_meter.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="queue.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="schedule.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="sig_tone.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="silence_gen.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="super_tone_rx.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="super_tone_tx.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="t30.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="t30_api.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="t30_logging.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="t31.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="t35.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="t38_core.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="t38_gateway.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="t38_non_ecm_buffer.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="t38_terminal.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="t4.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="testcpuid.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="time_scale.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="tone_detect.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="tone_generate.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="v17rx.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="v17tx.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="v22bis_rx.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="v22bis_tx.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="v27ter_rx.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="v27ter_tx.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="v29rx.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="v29tx.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="v42.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="v42bis.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="v8.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="vector_float.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="vector_int.c"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Header Files"\r
-                       >\r
-                       <File\r
-                               RelativePath=".\msvc\spandsp.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/adsi.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/arctan2.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/async.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/at_interpreter.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/awgn.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/bell_r2_mf.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/bert.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/biquad.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/bit_operations.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/bitstream.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/complex.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/complex_filters.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/complex_vector_float.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/complex_vector_int.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/crc.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/dc_restore.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/dds.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/dtmf.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/echo.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/expose.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/fax.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/fax_modems.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/fir.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/fsk.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/g168models.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/g711.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/g722.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/g726.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/gsm0610.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/hdlc.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/ima_adpcm.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/logging.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/lpc10.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/modem_connect_tones.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/modem_echo.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/noise.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/oki_adpcm.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/playout.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/plc.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/power_meter.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/adsi.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/async.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/at_interpreter.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/awgn.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/bell_r2_mf.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/bert.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/bitstream.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/dtmf.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/fax.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/fax_modems.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/fsk.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/g711.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/g722.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/g726.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/gsm0610.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/hdlc.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/ima_adpcm.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/logging.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/lpc10.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/modem_connect_tones.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/noise.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/oki_adpcm.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/queue.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/schedule.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/sig_tone.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/super_tone_rx.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/super_tone_tx.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/t30.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/t31.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/t38_core.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/t38_gateway.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/t38_non_ecm_buffer.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/t38_terminal.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/t4.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/time_scale.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/tone_detect.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/tone_generate.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/v17rx.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/v17tx.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/v22bis.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/v27ter_rx.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/v27ter_tx.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/v29rx.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/v29tx.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/v42.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/v42bis.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/private/v8.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/queue.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/saturated.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/schedule.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/sig_tone.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/silence_gen.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/super_tone_rx.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/super_tone_tx.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/t30.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/t30_api.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/t30_fcf.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/t30_logging.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/t31.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/t35.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/t38_core.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/t38_gateway.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/t38_non_ecm_buffer.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/t38_terminal.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/t4.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/telephony.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/time_scale.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/timing.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/tone_detect.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/tone_generate.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/v17rx.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/v17tx.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/v22bis.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/v27ter_rx.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/v27ter_tx.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/v29rx.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/v29tx.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/v42.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/v42bis.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/v8.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/vector_float.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/vector_int.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="spandsp/version.h"\r
-                               >\r
-                       </File>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Resource Files"\r
-                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
-                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
-                       >\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
+<File RelativePath="adsi.c"></File>\r
+<File RelativePath="async.c"></File>\r
+<File RelativePath="at_interpreter.c"></File>\r
+<File RelativePath="awgn.c"></File>\r
+<File RelativePath="bell_r2_mf.c"></File>\r
+<File RelativePath="bert.c"></File>\r
+<File RelativePath="bit_operations.c"></File>\r
+<File RelativePath="bitstream.c"></File>\r
+<File RelativePath="complex_filters.c"></File>\r
+<File RelativePath="complex_vector_float.c"></File>\r
+<File RelativePath="complex_vector_int.c"></File>\r
+<File RelativePath="crc.c"></File>\r
+<File RelativePath="dds_float.c"></File>\r
+<File RelativePath="dds_int.c"></File>\r
+<File RelativePath="dtmf.c"></File>\r
+<File RelativePath="echo.c"></File>\r
+<File RelativePath="fax.c"></File>\r
+<File RelativePath="fsk.c"></File>\r
+<File RelativePath="g711.c"></File>\r
+<File RelativePath="g722.c"></File>\r
+<File RelativePath="g726.c"></File>\r
+<File RelativePath="gsm0610_decode.c"></File>\r
+<File RelativePath="gsm0610_encode.c"></File>\r
+<File RelativePath="gsm0610_long_term.c"></File>\r
+<File RelativePath="gsm0610_lpc.c"></File>\r
+<File RelativePath="gsm0610_preprocess.c"></File>\r
+<File RelativePath="gsm0610_rpe.c"></File>\r
+<File RelativePath="gsm0610_short_term.c"></File>\r
+<File RelativePath="hdlc.c"></File>\r
+<File RelativePath="ima_adpcm.c"></File>\r
+<File RelativePath="logging.c"></File>\r
+<File RelativePath="lpc10_analyse.c"></File>\r
+<File RelativePath="lpc10_decode.c"></File>\r
+<File RelativePath="lpc10_encode.c"></File>\r
+<File RelativePath="lpc10_placev.c"></File>\r
+<File RelativePath="lpc10_voicing.c"></File>\r
+<File RelativePath="modem_echo.c"></File>\r
+<File RelativePath="modem_connect_tones.c"></File>\r
+<File RelativePath="noise.c"></File>\r
+<File RelativePath="oki_adpcm.c"></File>\r
+<File RelativePath="playout.c"></File>\r
+<File RelativePath="plc.c"></File>\r
+<File RelativePath="power_meter.c"></File>\r
+<File RelativePath="queue.c"></File>\r
+<File RelativePath="schedule.c"></File>\r
+<File RelativePath="sig_tone.c"></File>\r
+<File RelativePath="silence_gen.c"></File>\r
+<File RelativePath="super_tone_rx.c"></File>\r
+<File RelativePath="super_tone_tx.c"></File>\r
+<File RelativePath="t4.c"></File>\r
+<File RelativePath="t30.c"></File>\r
+<File RelativePath="t30_api.c"></File>\r
+<File RelativePath="t30_logging.c"></File>\r
+<File RelativePath="t31.c"></File>\r
+<File RelativePath="t35.c"></File>\r
+<File RelativePath="t38_core.c"></File>\r
+<File RelativePath="t38_gateway.c"></File>\r
+<File RelativePath="t38_non_ecm_buffer.c"></File>\r
+<File RelativePath="t38_terminal.c"></File>\r
+<File RelativePath="testcpuid.c"></File>\r
+<File RelativePath="time_scale.c"></File>\r
+<File RelativePath="tone_detect.c"></File>\r
+<File RelativePath="tone_generate.c"></File>\r
+<File RelativePath="v17rx.c"></File>\r
+<File RelativePath="v17tx.c"></File>\r
+<File RelativePath="v22bis_rx.c"></File>\r
+<File RelativePath="v22bis_tx.c"></File>\r
+<File RelativePath="v27ter_rx.c"></File>\r
+<File RelativePath="v27ter_tx.c"></File>\r
+<File RelativePath="v29rx.c"></File>\r
+<File RelativePath="v29tx.c"></File>\r
+<File RelativePath="v42.c"></File>\r
+<File RelativePath="v42bis.c"></File>\r
+<File RelativePath="v8.c"></File>\r
+<File RelativePath="vector_float.c"></File>\r
+<File RelativePath="vector_int.c"></File>\r
+<File RelativePath=".\msvc\gettimeofday.c"></File>\r
+</Filter><Filter  Name="Header Files">\r
+<File RelativePath="spandsp/adsi.h"></File>\r
+<File RelativePath="spandsp/async.h"></File>\r
+<File RelativePath="spandsp/arctan2.h"></File>\r
+<File RelativePath="spandsp/at_interpreter.h"></File>\r
+<File RelativePath="spandsp/awgn.h"></File>\r
+<File RelativePath="spandsp/bell_r2_mf.h"></File>\r
+<File RelativePath="spandsp/bert.h"></File>\r
+<File RelativePath="spandsp/biquad.h"></File>\r
+<File RelativePath="spandsp/bit_operations.h"></File>\r
+<File RelativePath="spandsp/bitstream.h"></File>\r
+<File RelativePath="spandsp/crc.h"></File>\r
+<File RelativePath="spandsp/complex.h"></File>\r
+<File RelativePath="spandsp/complex_filters.h"></File>\r
+<File RelativePath="spandsp/complex_vector_float.h"></File>\r
+<File RelativePath="spandsp/complex_vector_int.h"></File>\r
+<File RelativePath="spandsp/dc_restore.h"></File>\r
+<File RelativePath="spandsp/dds.h"></File>\r
+<File RelativePath="spandsp/dtmf.h"></File>\r
+<File RelativePath="spandsp/echo.h"></File>\r
+<File RelativePath="spandsp/fast_convert.h"></File>\r
+<File RelativePath="spandsp/fax.h"></File>\r
+<File RelativePath="spandsp/fax_modems.h"></File>\r
+<File RelativePath="spandsp/fir.h"></File>\r
+<File RelativePath="spandsp/fsk.h"></File>\r
+<File RelativePath="spandsp/g168models.h"></File>\r
+<File RelativePath="spandsp/g711.h"></File>\r
+<File RelativePath="spandsp/g722.h"></File>\r
+<File RelativePath="spandsp/g726.h"></File>\r
+<File RelativePath="spandsp/gsm0610.h"></File>\r
+<File RelativePath="spandsp/hdlc.h"></File>\r
+<File RelativePath="spandsp/ima_adpcm.h"></File>\r
+<File RelativePath="spandsp/logging.h"></File>\r
+<File RelativePath="spandsp/lpc10.h"></File>\r
+<File RelativePath="spandsp/modem_echo.h"></File>\r
+<File RelativePath="spandsp/modem_connect_tones.h"></File>\r
+<File RelativePath="spandsp/noise.h"></File>\r
+<File RelativePath="spandsp/oki_adpcm.h"></File>\r
+<File RelativePath="spandsp/playout.h"></File>\r
+<File RelativePath="spandsp/plc.h"></File>\r
+<File RelativePath="spandsp/power_meter.h"></File>\r
+<File RelativePath="spandsp/queue.h"></File>\r
+<File RelativePath="spandsp/saturated.h"></File>\r
+<File RelativePath="spandsp/schedule.h"></File>\r
+<File RelativePath="spandsp/sig_tone.h"></File>\r
+<File RelativePath="spandsp/silence_gen.h"></File>\r
+<File RelativePath="spandsp/super_tone_rx.h"></File>\r
+<File RelativePath="spandsp/super_tone_tx.h"></File>\r
+<File RelativePath="spandsp/t4.h"></File>\r
+<File RelativePath="spandsp/t30.h"></File>\r
+<File RelativePath="spandsp/t30_api.h"></File>\r
+<File RelativePath="spandsp/t30_fcf.h"></File>\r
+<File RelativePath="spandsp/t30_logging.h"></File>\r
+<File RelativePath="spandsp/t31.h"></File>\r
+<File RelativePath="spandsp/t35.h"></File>\r
+<File RelativePath="spandsp/t38_core.h"></File>\r
+<File RelativePath="spandsp/t38_gateway.h"></File>\r
+<File RelativePath="spandsp/t38_non_ecm_buffer.h"></File>\r
+<File RelativePath="spandsp/t38_terminal.h"></File>\r
+<File RelativePath="spandsp/telephony.h"></File>\r
+<File RelativePath="spandsp/time_scale.h"></File>\r
+<File RelativePath="spandsp/timing.h"></File>\r
+<File RelativePath="spandsp/tone_detect.h"></File>\r
+<File RelativePath="spandsp/tone_generate.h"></File>\r
+<File RelativePath="spandsp/v17rx.h"></File>\r
+<File RelativePath="spandsp/v17tx.h"></File>\r
+<File RelativePath="spandsp/v22bis.h"></File>\r
+<File RelativePath="spandsp/v27ter_rx.h"></File>\r
+<File RelativePath="spandsp/v27ter_tx.h"></File>\r
+<File RelativePath="spandsp/v29rx.h"></File>\r
+<File RelativePath="spandsp/v29tx.h"></File>\r
+<File RelativePath="spandsp/v42.h"></File>\r
+<File RelativePath="spandsp/v42bis.h"></File>\r
+<File RelativePath="spandsp/v8.h"></File>\r
+<File RelativePath="spandsp/vector_float.h"></File>\r
+<File RelativePath="spandsp/vector_int.h"></File>\r
+<File RelativePath="spandsp/version.h"></File>\r
+<File RelativePath="spandsp/private/adsi.h"></File>\r
+<File RelativePath="spandsp/private/async.h"></File>\r
+<File RelativePath="spandsp/private/at_interpreter.h"></File>\r
+<File RelativePath="spandsp/private/awgn.h"></File>\r
+<File RelativePath="spandsp/private/bell_r2_mf.h"></File>\r
+<File RelativePath="spandsp/private/bert.h"></File>\r
+<File RelativePath="spandsp/private/bitstream.h"></File>\r
+<File RelativePath="spandsp/private/dtmf.h"></File>\r
+<File RelativePath="spandsp/private/fax.h"></File>\r
+<File RelativePath="spandsp/private/fax_modems.h"></File>\r
+<File RelativePath="spandsp/private/fsk.h"></File>\r
+<File RelativePath="spandsp/private/g711.h"></File>\r
+<File RelativePath="spandsp/private/g722.h"></File>\r
+<File RelativePath="spandsp/private/g726.h"></File>\r
+<File RelativePath="spandsp/private/gsm0610.h"></File>\r
+<File RelativePath="spandsp/private/hdlc.h"></File>\r
+<File RelativePath="spandsp/private/ima_adpcm.h"></File>\r
+<File RelativePath="spandsp/private/logging.h"></File>\r
+<File RelativePath="spandsp/private/lpc10.h"></File>\r
+<File RelativePath="spandsp/private/modem_connect_tones.h"></File>\r
+<File RelativePath="spandsp/private/noise.h"></File>\r
+<File RelativePath="spandsp/private/oki_adpcm.h"></File>\r
+<File RelativePath="spandsp/private/queue.h"></File>\r
+<File RelativePath="spandsp/private/schedule.h"></File>\r
+<File RelativePath="spandsp/private/sig_tone.h"></File>\r
+<File RelativePath="spandsp/private/super_tone_rx.h"></File>\r
+<File RelativePath="spandsp/private/super_tone_tx.h"></File>\r
+<File RelativePath="spandsp/private/t30.h"></File>\r
+<File RelativePath="spandsp/private/t31.h"></File>\r
+<File RelativePath="spandsp/private/t38_core.h"></File>\r
+<File RelativePath="spandsp/private/t38_gateway.h"></File>\r
+<File RelativePath="spandsp/private/t38_non_ecm_buffer.h"></File>\r
+<File RelativePath="spandsp/private/t38_terminal.h"></File>\r
+<File RelativePath="spandsp/private/t4.h"></File>\r
+<File RelativePath="spandsp/private/time_scale.h"></File>\r
+<File RelativePath="spandsp/private/tone_detect.h"></File>\r
+<File RelativePath="spandsp/private/tone_generate.h"></File>\r
+<File RelativePath="spandsp/private/v17rx.h"></File>\r
+<File RelativePath="spandsp/private/v17tx.h"></File>\r
+<File RelativePath="spandsp/private/v22bis.h"></File>\r
+<File RelativePath="spandsp/private/v27ter_rx.h"></File>\r
+<File RelativePath="spandsp/private/v27ter_tx.h"></File>\r
+<File RelativePath="spandsp/private/v29rx.h"></File>\r
+<File RelativePath="spandsp/private/v29tx.h"></File>\r
+<File RelativePath="spandsp/private/v42.h"></File>\r
+<File RelativePath="spandsp/private/v42bis.h"></File>\r
+<File RelativePath="spandsp/private/v8.h"></File>\r
+<File RelativePath="spandsp/expose.h"></File>\r
+<File RelativePath="spandsp.h"></File>\r
+               </Filter>\r\r
+               <Filter\r\r
+                       Name="Resource Files"\r\r
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r\r
+                       >\r\r
+               </Filter>\r\r
+       </Files>\r\r
+       <Globals>\r\r
+       </Globals>\r\r
+</VisualStudioProject>\r\r
index 07193298619a3e4abcb2c214c9166dad0fdf4344..dbc17c9b7d8a2fa28112a9abd5f70646acb99a38 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: logging.c,v 1.29 2009/01/20 04:24:45 steveu Exp $
+ * $Id: logging.c,v 1.30 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -83,7 +83,7 @@ SPAN_DECLARE(int) span_log_test(logging_state_t *s, int level)
 }
 /*- End of function --------------------------------------------------------*/
 
-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, ...)
 {
     char msg[1024 + 1];
     va_list arg_ptr;
index 977750f16dd10a156a89b943078d9ad8937aed45..6a973176c07a0fbce9cf11778563bcdffb685920 100644 (file)
@@ -26,7 +26,7 @@
  * implementation of the LPC-10 2400 bps Voice Coder. They do not
  * exert copyright claims on their code, and it may be freely used.
  *
- * $Id: lpc10_decode.c,v 1.25 2009/01/28 03:41:27 steveu Exp $
+ * $Id: lpc10_decode.c,v 1.26 2009/02/03 16:28:39 steveu Exp $
  */
 
 #if defined(HAVE_CONFIG_H)
@@ -46,6 +46,7 @@
 #include <memory.h>
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/dc_restore.h"
 #include "spandsp/lpc10.h"
 #include "spandsp/private/lpc10.h"
@@ -1102,7 +1103,7 @@ SPAN_DECLARE(int) lpc10_decode(lpc10_decode_state_t *s, int16_t amp[], const uin
         synths(s, voice, &pitch, &rms, rc, speech);
         base = i*LPC10_SAMPLES_PER_FRAME;
         for (j = 0;  j < LPC10_SAMPLES_PER_FRAME;  j++)
-            amp[base + j] = (int16_t) lrintf(32768.0f*speech[j]);
+            amp[base + j] = (int16_t) lfastrintf(32768.0f*speech[j]);
     }
 
     return len*LPC10_SAMPLES_PER_FRAME;
index 56f45932afd7e0def1246f83838500de00407552..4d9182822dd529f6a55556a862d0d9c8ce8f6e41 100644 (file)
@@ -26,7 +26,7 @@
  * implementation of the LPC-10 2400 bps Voice Coder. They do not
  * exert copyright claims on their code, and it may be freely used.
  *
- * $Id: lpc10_encode.c,v 1.26 2009/01/28 03:41:27 steveu Exp $
+ * $Id: lpc10_encode.c,v 1.27 2009/02/03 16:28:39 steveu Exp $
  */
 
 #if defined(HAVE_CONFIG_H)
index efb8120596eef1647819767d580e79205bdb81a9..d11572d21b358db835989c8c10546c88e27825e8 100644 (file)
@@ -26,7 +26,7 @@
  * implementation of the LPC-10 2400 bps Voice Coder. They do not
  * exert copyright claims on their code, and it may be freely used.
  *
- * $Id: lpc10_voicing.c,v 1.17 2009/01/28 03:41:27 steveu Exp $
+ * $Id: lpc10_voicing.c,v 1.18 2009/02/03 16:28:39 steveu Exp $
  */
 
 #if defined(HAVE_CONFIG_H)
@@ -46,6 +46,7 @@
 #include "floating_fudge.h"
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/dc_restore.h"
 #include "spandsp/lpc10.h"
 #include "spandsp/private/lpc10.h"
@@ -158,11 +159,11 @@ static void vparms(int32_t vwin[],
     /* Normalize ZC, LBE, and FBE to old fixed window length of 180. */
     /* (The fraction 90/VLEN has a range of 0.58 to 1) */
     r2 = (float) (*zc << 1);
-    *zc = lrintf(r2*(90.0f/vlen));
+    *zc = lfastrintf(r2*(90.0f/vlen));
     r1 = lp_rms/4*(90.0f/vlen);
-    *lbe = min(lrintf(r1), 32767);
+    *lbe = min(lfastrintf(r1), 32767);
     r1 = ap_rms/4*(90.0f/vlen);
-    *fbe = min(lrintf(r1), 32767);
+    *fbe = min(lfastrintf(r1), 32767);
 }
 /*- End of function --------------------------------------------------------*/
 
@@ -323,7 +324,7 @@ void lpc10_voicing(lpc10_encode_state_t *s,
     /* running average full-band voiced energy to the running average */
     /* full-band unvoiced energy. SNR filter has gain of 63. */
     r1 = (s->snr + s->fbve/(float) max(s->fbue, 1))*63/64.0f;
-    s->snr = (float) lrintf(r1);
+    s->snr = (float) lfastrintf(r1);
     snr2 = s->snr*s->fbue/max(s->lbue, 1);
     /* Quantize SNR to SNRL according to VDCL thresholds. */
     i1 = nvdcl - 1;
@@ -465,18 +466,18 @@ void lpc10_voicing(lpc10_encode_state_t *s,
     if (s->voibuf[3][half] == 0)
     {
         r1 = (s->sfbue*63 + (min(fbe, s->ofbue*3) << 3))/64.0f;
-        s->sfbue = lrintf(r1);
+        s->sfbue = lfastrintf(r1);
         s->fbue = s->sfbue/8;
         s->ofbue = fbe;
         r1 = (s->slbue*63 + (min(lbe, s->olbue*3) << 3))/64.0f;
-        s->slbue = lrintf(r1);
+        s->slbue = lfastrintf(r1);
         s->lbue = s->slbue/8;
         s->olbue = lbe;
     }
     else
     {
-        s->lbve = lrintf((s->lbve*63 + lbe)/64.0f);
-        s->fbve = lrintf((s->fbve*63 + fbe)/64.0f);
+        s->lbve = lfastrintf((s->lbve*63 + lbe)/64.0f);
+        s->fbve = lfastrintf((s->fbve*63 + fbe)/64.0f);
     }
     /* Set dither threshold to yield proper zero crossing rates in the */
     /* presence of low frequency noise and low level signal input. */
index f262ddabef1a599404ec2f41b008767c2e5f474a..2fd2bacb5325052c56627a722ad67b9a1186089f 100644 (file)
@@ -23,7 +23,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: modem_connect_tones.c,v 1.32 2009/01/29 18:30:14 steveu Exp $
+ * $Id: modem_connect_tones.c,v 1.33 2009/02/03 16:28:39 steveu Exp $
  */
  
 /*! \file */
@@ -45,6 +45,7 @@
 #include <stdio.h>
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/logging.h"
 #include "spandsp/complex.h"
 #include "spandsp/dds.h"
@@ -87,8 +88,8 @@ SPAN_DECLARE(const char *) modem_connect_tone_to_str(int tone)
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(int) modem_connect_tones_tx(modem_connect_tones_tx_state_t *s,
-                           int16_t amp[],
-                           int len)
+                                         int16_t amp[],
+                                         int len)
 {
     int16_t mod;
     int i;
@@ -197,7 +198,7 @@ SPAN_DECLARE(int) modem_connect_tones_tx(modem_connect_tones_tx_state_t *s,
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(modem_connect_tones_tx_state_t *) modem_connect_tones_tx_init(modem_connect_tones_tx_state_t *s,
-                                                            int tone_type)
+                                                                           int tone_type)
 {
     int alloced;
 
@@ -326,7 +327,7 @@ static void v21_put_bit(void *user_data, int bit)
                     s->flags_seen = 0;
                 if (++s->flags_seen >= HDLC_FRAMING_OK_THRESHOLD  &&  !s->framing_ok_announced)
                 {
-                    report_tone_state(s, MODEM_CONNECT_TONES_FAX_PREAMBLE, lrintf(fsk_rx_signal_power(&(s->v21rx))));
+                    report_tone_state(s, MODEM_CONNECT_TONES_FAX_PREAMBLE, lfastrintf(fsk_rx_signal_power(&(s->v21rx))));
                     s->framing_ok_announced = TRUE;
                 }
             }
@@ -366,7 +367,7 @@ SPAN_DECLARE(int) modem_connect_tones_rx(modem_connect_tones_rx_state_t *s, cons
             famp = v1 - 1.2994747954630f*s->z1 + s->z2;
             s->z2 = s->z1;
             s->z1 = v1;
-            notched = (int16_t) lrintf(famp);
+            notched = (int16_t) lfastrintf(famp);
 
             /* Estimate the overall energy in the channel, and the energy in
                the notch (i.e. overall channel energy - tone energy => noise).
@@ -379,7 +380,7 @@ SPAN_DECLARE(int) modem_connect_tones_rx(modem_connect_tones_rx_state_t *s, cons
                 if (s->tone_present != MODEM_CONNECT_TONES_FAX_CNG)
                 {
                     if (++s->tone_cycle_duration >= ms_to_samples(415))
-                        report_tone_state(s, MODEM_CONNECT_TONES_FAX_CNG, lrintf(log10f(s->channel_level/32768.0f)*20.0f + DBM0_MAX_POWER + 0.8f));
+                        report_tone_state(s, MODEM_CONNECT_TONES_FAX_CNG, lfastrintf(log10f(s->channel_level/32768.0f)*20.0f + DBM0_MAX_POWER + 0.8f));
                 }
             }
             else
@@ -409,7 +410,7 @@ SPAN_DECLARE(int) modem_connect_tones_rx(modem_connect_tones_rx_state_t *s, cons
             famp = v1 + 0.1567596f*s->z1 + s->z2;
             s->z2 = s->z1;
             s->z1 = v1;
-            notched = (int16_t) lrintf(famp);
+            notched = (int16_t) lfastrintf(famp);
             /* Estimate the overall energy in the channel, and the energy in
                the notch (i.e. overall channel energy - tone energy => noise).
                Use abs instead of multiply for speed (is it really faster?).
@@ -442,7 +443,7 @@ SPAN_DECLARE(int) modem_connect_tones_rx(modem_connect_tones_rx_state_t *s, cons
                     if (s->tone_cycle_duration >= ms_to_samples(450 - 25))
                     {
                         if (++s->good_cycles == 3)
-                            report_tone_state(s, MODEM_CONNECT_TONES_ANS_PR, lrintf(log10f(s->channel_level/32768.0f)*20.0f + DBM0_MAX_POWER + 0.8f));
+                            report_tone_state(s, MODEM_CONNECT_TONES_ANS_PR, lfastrintf(log10f(s->channel_level/32768.0f)*20.0f + DBM0_MAX_POWER + 0.8f));
                     }
                     else
                     {
@@ -456,7 +457,7 @@ SPAN_DECLARE(int) modem_connect_tones_rx(modem_connect_tones_rx_state_t *s, cons
                     if (s->tone_cycle_duration >= ms_to_samples(550))
                     {
                         if (s->tone_present == MODEM_CONNECT_TONES_NONE)
-                            report_tone_state(s, MODEM_CONNECT_TONES_ANS, lrintf(log10f(s->channel_level/32768.0f)*20.0f + DBM0_MAX_POWER + 0.8f));
+                            report_tone_state(s, MODEM_CONNECT_TONES_ANS, lfastrintf(log10f(s->channel_level/32768.0f)*20.0f + DBM0_MAX_POWER + 0.8f));
                         s->good_cycles = 0;
                         s->tone_cycle_duration = ms_to_samples(550);
                     }
@@ -500,9 +501,9 @@ SPAN_DECLARE(int) modem_connect_tones_rx_get(modem_connect_tones_rx_state_t *s)
 /*- End of function --------------------------------------------------------*/
 
 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)
+                                                                           int tone_type,
+                                                                           tone_report_func_t tone_callback,
+                                                                           void *user_data)
 {
     if (s == NULL)
     {
index 268085398c058c096fa1bc0fece0db91cb9157d5..8ed03c983b8ed9275a910caf9a1bae0f8e1efe81 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: modem_echo.c,v 1.24 2009/01/28 03:41:27 steveu Exp $
+ * $Id: modem_echo.c,v 1.25 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
index 52a046a8042a69a861f684cfbe245053869e91c4..c7f3be5637936c80e14be16e595379acd546ec5a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * SpanDSP - a series of DSP components for telephony
  *
- * inttypes.h - a fudge for MSVC, which lacks this header
+ * config.h - a fudge for MSVC, which lacks this header
  *
  * Written by Steve Underwood <steveu@coppice.org>
  *
@@ -10,7 +10,7 @@
  *
  * This file is released in the public domain.
  *
- * $Id: config.h,v 1.1 2009/01/29 18:30:14 steveu Exp $
+ * $Id: config.h,v 1.2 2009/02/03 16:39:41 steveu Exp $
  */
 
 #if !defined(_MSVC_CONFIG_H_)
@@ -32,6 +32,8 @@
 #define HAVE_MATH_H
 #define HAVE_TGMATH_H
 
+#define HAVE_LONG_DOUBLE
+
 #define SPANDSP_USE_EXPORT_CAPABILITY 1
 
 #ifdef __cplusplus
index 203cdaf6aecdb9cb7102bf232d3d338234d09d7b..c454e38d97cf168cdba49e4bc97a2bc0b89f7f44 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: spandsp.h.in,v 1.15 2009/01/31 08:48:10 steveu Exp $
+ * $Id: spandsp.h.in,v 1.16 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
@@ -33,6 +33,7 @@
 #undef SPANDSP_USE_FIXED_POINT
 #undef SPANDSP_MISALIGNED_ACCESS_FAILS
 
+#define SPANDSP_USE_EXPORT_CAPABILITY 1
 
 #include <stdlib.h>
 #include <inttypes.h>
@@ -43,6 +44,7 @@
 #include <tiffio.h>
 
 #include <spandsp/telephony.h>
+#include <spandsp/fast_convert.h>
 #include <spandsp/logging.h>
 #include <spandsp/complex.h>
 #include <spandsp/bit_operations.h>
index 24b2fb07ac4ebf05e11ff6ded6f6cbea89903ea6..857124d16a8404cc04e4806b75cf43e5575872a9 100644 (file)
@@ -23,7 +23,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: noise.c,v 1.29 2009/01/31 08:48:10 steveu Exp $
+ * $Id: noise.c,v 1.30 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -45,6 +45,7 @@
 #include "floating_fudge.h"
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/saturated.h"
 #include "spandsp/noise.h"
 
index 9093531cf7052d9d7577b0a4c1211e3b691c539a..ec5b54825815255cf6568bdd36fbfac5c13360bf 100644 (file)
@@ -27,7 +27,7 @@
  * The actual OKI ADPCM encode and decode method is derived from freely
  * available code, whose exact origins seem uncertain.
  *
- * $Id: oki_adpcm.c,v 1.30 2009/01/05 13:48:31 steveu Exp $
+ * $Id: oki_adpcm.c,v 1.31 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -266,9 +266,9 @@ SPAN_DECLARE(int) oki_adpcm_release(oki_adpcm_state_t *s)
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(int) oki_adpcm_decode(oki_adpcm_state_t *s,
-                     int16_t amp[],
-                     const uint8_t oki_data[],
-                     int oki_bytes)
+                                   int16_t amp[],
+                                   const uint8_t oki_data[],
+                                   int oki_bytes)
 {
     int i;
     int x;
@@ -319,9 +319,9 @@ SPAN_DECLARE(int) oki_adpcm_decode(oki_adpcm_state_t *s,
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(int) oki_adpcm_encode(oki_adpcm_state_t *s,
-                     uint8_t oki_data[],
-                     const int16_t amp[],
-                     int len)
+                                   uint8_t oki_data[],
+                                   const int16_t amp[],
+                                   int len)
 {
     int x;
     int l;
index d350e7525aada9c18ea357346ff25195524e3500..9acc3628bf8b87c10ba3a4ba71f2ed0972f2bc90 100644 (file)
@@ -29,7 +29,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: playout.c,v 1.15 2009/01/05 13:48:31 steveu Exp $
+ * $Id: playout.c,v 1.16 2009/02/03 16:28:39 steveu Exp $
  */
 
 #if defined(HAVE_CONFIG_H)
index 3153a6fafc0819ad36a6618c124670975fbcc2c2..96ed832bf8f31add770ff7c52b003b6a8d2aa67a 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: plc.c,v 1.25 2009/01/28 03:41:27 steveu Exp $
+ * $Id: plc.c,v 1.26 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
@@ -45,6 +45,7 @@
 #include <limits.h>
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/saturated.h"
 #include "spandsp/plc.h"
 
index da19307485495dec3fbe86c10df9de1b9b0c791d..e017635832b158d1b53dfc05f41c996201298fb6 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: power_meter.c,v 1.26 2009/01/28 03:41:27 steveu Exp $
+ * $Id: power_meter.c,v 1.27 2009/02/03 16:28:39 steveu Exp $
  */
 
 /*! \file */
index 51fc251c836c66dc623e99041247db2d3378c787..6b53b647865dec16980405251017e95a0aa90fff 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: queue.c,v 1.27 2009/01/31 08:48:10 steveu Exp $
+ * $Id: queue.c,v 1.28 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
index e0f64bd08533f9223df7800e6e75aa1ecf59595f..5c55f428f3a492ba2656a6f46e9d886e32f72440 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: schedule.c,v 1.20 2009/01/05 13:48:31 steveu Exp $
+ * $Id: schedule.c,v 1.21 2009/02/03 16:28:40 steveu Exp $
  */
 
 #if defined(HAVE_CONFIG_H)
index c026f2b1e12138419715f8812713e2e2d047a2be..3003ca993b8f14cd54d73319c010b106a5f9b0ce 100644 (file)
@@ -23,7 +23,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: sig_tone.c,v 1.29 2009/01/30 07:19:25 steveu Exp $
+ * $Id: sig_tone.c,v 1.30 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
@@ -47,6 +47,7 @@
 
 #undef SPANDSP_USE_FIXED_POINT
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/dc_restore.h"
 #include "spandsp/saturated.h"
 #include "spandsp/complex.h"
index abdcf4c29c17dd63c26d0cef34929b058fc9f77e..2423fe6eb2c62f0e3a7fe31f1b47fdd392608095 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: silence_gen.c,v 1.17 2009/01/28 03:41:27 steveu Exp $
+ * $Id: silence_gen.c,v 1.18 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
@@ -131,7 +131,7 @@ SPAN_DECLARE(silence_gen_state_t *) silence_gen_init(silence_gen_state_t *s, int
 /* The following dummy routines, to absorb data, don't really have a proper home,
    so they have been put here. */
 
-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)
 {
     return 0;
 }
index 40fa29e97a24e2afd9b6f3be8bf1faada05924cc..0744559ab0214a9ccc718ee7ef4d54caf4ee8290 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: spandsp.h.in,v 1.15 2009/01/31 08:48:10 steveu Exp $
+ * $Id: spandsp.h.in,v 1.16 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
@@ -44,6 +44,7 @@
 #include <tiffio.h>
 
 #include <spandsp/telephony.h>
+#include <spandsp/fast_convert.h>
 #include <spandsp/logging.h>
 #include <spandsp/complex.h>
 #include <spandsp/bit_operations.h>
index ac77d26931615f636dc3f194c7eccb05a0d08f9b..759498affcc30f12ec5ffda0582e7aae85791a9f 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: adsi.h,v 1.34 2009/01/31 08:48:11 steveu Exp $
+ * $Id: adsi.h,v 1.35 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
index 457c18f939161cf9802f28a74a8ae33593e98908..b6e52c405d3a00d2825cfb00e13c8e997c336cc2 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: async.h,v 1.20 2009/01/31 08:48:11 steveu Exp $
+ * $Id: async.h,v 1.21 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
@@ -151,18 +151,18 @@ SPAN_DECLARE(const char *) signal_status_to_str(int status);
     \param user_data An opaque pointer.
     \return A pointer to the initialised context, or NULL if there was a problem. */
 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);
+                                               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.
@@ -175,12 +175,12 @@ int async_tx_get_bit(void *user_data);
     \param user_data An opaque pointer.
     \return A pointer to the initialised context, or NULL if there was a problem. */
 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);
+                                               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 @@ SPAN_DECLARE(async_rx_state_t *) async_rx_init(async_rx_state_t *s,
         - 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)
 }
index d8e5c9a5de6bdae86b4bb0ba2e8ddd6161de558c..44a5712c26e522c25f4730fd86e8286e82042f3f 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: at_interpreter.h,v 1.21 2009/01/31 08:48:11 steveu Exp $
+ * $Id: at_interpreter.h,v 1.22 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
@@ -174,10 +174,10 @@ SPAN_DECLARE(void) at_set_class1_handler(at_state_t *s, at_class1_handler_t hand
     \param modem_control_user_data x.
     \return A pointer to the AT context, or NULL if there was a problem. */
 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);
+                                   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.
index 007e2b68c87be22cb79cab73c2bfdb1af25a5a29..7a18f27ca94db7d2a104c56cfb61d2fa8367c391 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: awgn.h,v 1.16 2009/01/31 08:48:11 steveu Exp $
+ * $Id: awgn.h,v 1.17 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
index c711c91d6f1bc7f709f779660760b4e29824f8aa..5d2a7872ab43e1a4d51a315f90a13d796dda2939 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: bell_r2_mf.h,v 1.22 2009/01/31 08:48:11 steveu Exp $
+ * $Id: bell_r2_mf.h,v 1.23 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
@@ -206,8 +206,8 @@ SPAN_DECLARE(size_t) bell_mf_rx_get(bell_mf_rx_state_t *s, char *buf, int max);
            and supplied in callbacks.
     \return A pointer to the Bell MF receiver context.*/
 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);
+                                                   digits_rx_callback_t callback,
+                                                   void *user_data);
 
 /*! \brief Free a Bell MF receiver context.
     \param s The Bell MF receiver context.
@@ -238,9 +238,9 @@ SPAN_DECLARE(int) r2_mf_rx_get(r2_mf_rx_state_t *s);
            and supplied in callbacks.
     \return A pointer to the R2 MF receiver context. */
 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);
+                                               int fwd,
+                                               tone_report_func_t callback,
+                                               void *user_data);
 
 /*! \brief Free an R2 MF receiver context.
     \param s The R2 MF receiver context.
index 9642f38ff320f5dfc9362abab616f7ab58d82d4a..240ca44cb19c2805731ae2f1b6d2f89cc0c8b12c 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: bert.h,v 1.21 2009/01/31 08:48:11 steveu Exp $
+ * $Id: bert.h,v 1.22 2009/02/03 16:28:41 steveu Exp $
  */
 
 #if !defined(_SPANDSP_BERT_H_)
index 87e6e336a014016672e77bf08754b81deff9dfbe..e97e2f35cb29a266101d6c613bf161acfc9e3c45 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: bitstream.h,v 1.12 2008/11/30 12:45:09 steveu Exp $
+ * $Id: bitstream.h,v 1.13 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
@@ -50,30 +50,30 @@ extern "C"
     \param c A pointer to the bitstream output buffer.
     \param value The value to be pushed into the output buffer.
     \param bits The number of bits of value to be pushed. 1 to 25 bits is valid. */
-void bitstream_put(bitstream_state_t *s, uint8_t **c, uint32_t value, int bits);
+SPAN_DECLARE(void) bitstream_put(bitstream_state_t *s, uint8_t **c, uint32_t value, int bits);
 
-void bitstream_put2(bitstream_state_t *s, uint8_t **c, uint32_t value, int bits);
+SPAN_DECLARE(void) bitstream_put2(bitstream_state_t *s, uint8_t **c, uint32_t value, int bits);
 
 /*! \brief Get a chunk of bits from the input buffer.
     \param s A pointer to the bitstream context.
     \param c A pointer to the bitstream input buffer.
     \param bits The number of bits of value to be grabbed. 1 to 25 bits is valid.
     \return The value retrieved from the input buffer. */
-uint32_t bitstream_get(bitstream_state_t *s, const uint8_t **c, int bits);
+SPAN_DECLARE(uint32_t) bitstream_get(bitstream_state_t *s, const uint8_t **c, int bits);
 
-uint32_t bitstream_get2(bitstream_state_t *s, const uint8_t **c, int bits);
+SPAN_DECLARE(uint32_t) bitstream_get2(bitstream_state_t *s, const uint8_t **c, int bits);
 
 /*! \brief Flush any residual bit to the output buffer.
     \param s A pointer to the bitstream context.
     \param c A pointer to the bitstream output buffer. */
-void bitstream_flush(bitstream_state_t *s, uint8_t **c);
+SPAN_DECLARE(void) bitstream_flush(bitstream_state_t *s, uint8_t **c);
 
-void bitstream_flush2(bitstream_state_t *s, uint8_t **c);
+SPAN_DECLARE(void) bitstream_flush2(bitstream_state_t *s, uint8_t **c);
 
 /*! \brief Initialise a bitstream context.
     \param s A pointer to the bitstream context.
     \return A pointer to the bitstream context. */
-bitstream_state_t *bitstream_init(bitstream_state_t *s);
+SPAN_DECLARE(bitstream_state_t *) bitstream_init(bitstream_state_t *s);
 
 #if defined(__cplusplus)
 }
index ff128a2f5ae76e1c899ce120a4335f2cf2bc36d7..efc99ab85cc03bcb829ddebc7a7addcddee554c1 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: complex_filters.h,v 1.13 2009/01/31 08:48:11 steveu Exp $
+ * $Id: complex_filters.h,v 1.14 2009/02/03 16:28:41 steveu Exp $
  */
 
 #if !defined(_SPANDSP_COMPLEX_FILTERS_H_)
index 304e1d058067b822eb7acf17e2809c7f7a70ee82..8063dcbbec91a5247470e27e4573fc988e404691 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: dtmf.h,v 1.30 2009/01/31 08:48:11 steveu Exp $
+ * $Id: dtmf.h,v 1.31 2009/02/03 16:28:41 steveu Exp $
  */
 
 #if !defined(_SPANDSP_DTMF_H_)
@@ -192,8 +192,8 @@ SPAN_DECLARE(size_t) dtmf_rx_get(dtmf_rx_state_t *s, char *digits, int max);
            and supplied in callbacks.
     \return A pointer to the DTMF receiver context. */
 SPAN_DECLARE(dtmf_rx_state_t *) dtmf_rx_init(dtmf_rx_state_t *s,
-                                            digits_rx_callback_t callback,
-                                            void *user_data);
+                                             digits_rx_callback_t callback,
+                                             void *user_data);
 
 /*! \brief Free a DTMF receiver context.
     \param s The DTMF receiver context.
index 32bf004763afa1bc451d21aa1526c9812979ad04..3564d6237dced53a8b999cb7b5f9c0f6fccc0a0b 100644 (file)
@@ -24,7 +24,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: echo.h,v 1.17 2009/01/31 08:48:11 steveu Exp $
+ * $Id: echo.h,v 1.18 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
diff --git a/libs/spandsp/src/spandsp/fast_convert.h b/libs/spandsp/src/spandsp/fast_convert.h
new file mode 100644 (file)
index 0000000..7f3b677
--- /dev/null
@@ -0,0 +1,402 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * fast_convert.h - Quick ways to convert floating point numbers to integers
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2009 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 2.1,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id: fast_convert.h,v 1.1 2009/02/03 16:28:41 steveu Exp $
+ */
+
+#if !defined(_SPANDSP_FAST_CONVERT_H_)
+#define _SPANDSP_FAST_CONVERT_H_
+
+#if defined(__cplusplus)
+extern "C"
+{
+#endif
+
+/* The following code, to handle issues with lrint() and lrintf() on various
+ * platforms, is adapted from similar code in libsndfile, which is:
+ *
+ * Copyright (C) 2001-2004 Erik de Castro Lopo <erikd@mega-nerd.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ */
+
+/*
+ *    On Intel Pentium processors (especially PIII and probably P4), converting
+ *    from float to int is very slow. To meet the C specs, the code produced by
+ *    most C compilers targeting Pentium needs to change the FPU rounding mode
+ *    before the float to int conversion is performed.
+ *
+ *    Changing the FPU rounding mode causes the FPU pipeline to be flushed. It
+ *    is this flushing of the pipeline which is so slow.
+ *
+ *    Fortunately the ISO C99 specification defines the functions lrint, lrintf,
+ *    llrint and llrintf which fix this problem as a side effect.
+ *
+ *    On Unix-like systems, the configure process should have detected the
+ *    presence of these functions. If they weren't found we have to replace them
+ *    here with a standard C cast.
+ */
+
+/*
+ *    The C99 prototypes for these functions are as follows:
+ *
+ *        int rintf(float x);
+ *        int rint(double x);
+ *        long int lrintf(float x);
+ *        long int lrint(double x);
+ *        long long int llrintf(float x);
+ *        long long int llrint(double x);
+ *
+ *    The presence of the required functions are detected during the configure
+ *    process and the values HAVE_LRINT and HAVE_LRINTF are set accordingly in
+ *    the config file.
+ */
+
+#if defined(__CYGWIN__)
+    /*
+     *    CYGWIN has lrint and lrintf functions, but they are slow and buggy:
+     *        http://sourceware.org/ml/cygwin/2005-06/msg00153.html
+     *        http://sourceware.org/ml/cygwin/2005-09/msg00047.html
+     *    The latest version of cygwin seems to have made no effort to fix this.
+     *    These replacement functions (pulled from the Public Domain MinGW
+     *    math.h header) replace the native versions.
+     */
+#if 0
+    static __inline__ long int lrint(double x)
+    {
+        long int retval;
+
+        __asm__ __volatile__
+        (
+            "fistpl %0"
+            : "=m" (retval)
+            : "t" (x)
+            : "st"
+        );
+
+        return retval;
+    }
+
+    static __inline__ long int lrintf(float x)
+    {
+        long int retval;
+
+        __asm__ __volatile__
+        (
+            "fistpl %0"
+            : "=m" (retval)
+            : "t" (x)
+            : "st"
+        );
+        return retval;
+    }
+#endif
+
+    static __inline__ long int lfastrint(double x)
+    {
+        long int retval;
+
+        __asm__ __volatile__
+        (
+            "fistpl %0"
+            : "=m" (retval)
+            : "t" (x)
+            : "st"
+        );
+
+        return retval;
+    }
+
+    static __inline__ long int lfastrintf(float x)
+    {
+        long int retval;
+
+        __asm__ __volatile__
+        (
+            "fistpl %0"
+            : "=m" (retval)
+            : "t" (x)
+            : "st"
+        );
+        return retval;
+    }
+#elif defined(HAVE_LRINT)  &&  defined(HAVE_LRINTF)
+
+#if defined(__i386__)
+    /* These routines are guaranteed fast on an i386 machine. Using the built in
+       lrint() and lrintf() should be similar, but they may not always be enabled.
+       Sometimes, especially with "-O0", you might get slow calls to routines. */
+    static __inline__ long int lfastrint(double x)
+    {
+        long int retval;
+
+        __asm__ __volatile__
+        (
+            "fistpl %0"
+            : "=m" (retval)
+            : "t" (x)
+            : "st"
+        );
+
+        return retval;
+    }
+
+    static __inline__ long int lfastrintf(float x)
+    {
+        long int retval;
+
+        __asm__ __volatile__
+        (
+            "fistpl %0"
+            : "=m" (retval)
+            : "t" (x)
+            : "st"
+        );
+        return retval;
+    }
+#elif defined(__x86_64__)
+    /* On an x86_64 machine, the fastest thing seems to be a pure assignment from a
+       double or float to an int. It looks like the design on the x86_64 took account
+       of the default behaviour specified for C. */
+    static __inline__ long int lfastrint(double x)
+    {
+        return (long int) (x);
+    }
+
+    static __inline__ long int lfastrintf(float x)
+    {
+        return (long int) (x);
+    }
+#elif defined(__ppc__)  ||   defined(__powerpc__)
+    static __inline__ long int lfastrint(register double x)
+    {
+        int res[2];
+
+        __asm__ __volatile__
+        (
+            "fctiw %1, %1\n\t"
+            "stfd %1, %0"
+            : "=m" (res)    /* Output */
+            : "f" (x)       /* Input */
+            : "memory"
+        );
+
+        return res[1];
+    }
+
+    static __inline__ long int lfastrintf(register float x)
+    {
+        int res[2];
+
+        __asm__ __volatile__
+        (
+            "fctiw %1, %1\n\t"
+            "stfd %1, %0"
+            : "=m" (res)    /* Output */
+            : "f" (x)       /* Input */
+            : "memory"
+        );
+
+        return res[1];
+    }
+#endif
+
+#elif defined(WIN32)  ||  defined(_WIN32)
+    /*
+     *    Win32 doesn't seem to have the lrint() and lrintf() functions.
+     *    Therefore implement inline versions of these functions here.
+     */
+    __inline long int lrint(double x)
+    {
+        long int i;
+
+        _asm
+        {
+            fld x
+            fistp i
+        };
+        return i;
+    }
+
+    __inline long int lrintf(float x)
+    {
+        long int i;
+
+        _asm
+        {
+            fld x
+            fistp i
+        };
+        return i;
+    }
+
+    __inline float rintf(float flt)
+    {
+       _asm
+       {       fld flt
+               frndint
+       }
+    }
+
+    __inline double rint(double dbl)
+    {
+        __asm 
+       {
+            fld dbl
+            frndint
+        }
+    }
+
+    __inline long int lfastrint(double x)
+    {
+        long int i;
+
+        _asm
+        {
+            fld x
+            fistp i
+        };
+        return i;
+    }
+
+    __inline long int lfastrintf(float x)
+    {
+        long int i;
+
+        _asm
+        {
+            fld x
+            fistp i
+        };
+        return i;
+    }
+#elif defined(WIN64)  ||  defined(_WIN64)
+    /* Win64 machines will do best with a simple assignment. */
+
+    __inline long int lfastrint(double x)
+    {
+        return (long int) (x);
+    }
+
+    __inline long int lfastrintf(float x)
+    {
+        return (long int) (x);
+    }
+#elif defined(__MWERKS__)  &&  defined(macintosh)
+    /* This MacOS 9 solution was provided by Stephane Letz */
+
+    long int __inline__ lfastrint(register double x)
+    {
+        long int res[2];
+
+        asm
+        {
+            fctiw x, x
+            stfd x, res
+        }
+        return res[1];
+    }
+
+    long int __inline__ lfastrintf(register float x)
+    {
+        long int res[2];
+
+        asm
+        {
+            fctiw x, x
+            stfd x, res
+        }
+        return res[1];
+    }
+#elif defined(__MACH__)  &&  defined(__APPLE__)  &&  (defined(__ppc__)  ||  defined(__powerpc__))
+    /* For Apple Mac OS/X - do recent versions still need this? */
+
+    static __inline__ long int lfastrint(register double x)
+    {
+        int res[2];
+
+        __asm__ __volatile__
+        (
+            "fctiw %1, %1\n\t"
+            "stfd %1, %0"
+            : "=m" (res)    /* Output */
+            : "f" (x)       /* Input */
+            : "memory"
+        );
+
+        return res[1];
+    }
+
+    static __inline__ long int lfastrintf(register float x)
+    {
+        int res[2];
+
+        __asm__ __volatile__
+        (
+            "fctiw %1, %1\n\t"
+            "stfd %1, %0"
+            : "=m" (res)    /* Output */
+            : "f" (x)       /* Input */
+            : "memory"
+        );
+
+        return res[1];
+    }
+#else
+    /* There is nothing else to do, but use a simple casting operation, instead of a real
+       rint() type function. Since we are only trying to use rint() to speed up conversions,
+       the accuracy issues related to changing the rounding scheme are of little concern
+       to us. */
+
+    #if !defined(__sgi)
+        #warning "No usable lrint() and lrintf() functions available."
+        #warning "Replacing these functions with a simple C cast."
+    #endif
+
+    static __inline__ long int lfastrint(double x)
+    {
+        return (long int) (x);
+    }
+
+    static __inline__ long int lfastrintf(float x)
+    {
+        return (long int) (x);
+    }
+#endif
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
+
+/*- End of file ------------------------------------------------------------*/
index 44b61eb0f531ececc3772e40cd8d80f62edbc60e..14f419c7dcd8ccdc725099729abbe56ec52e8769 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: fax.h,v 1.37 2009/01/31 08:48:11 steveu Exp $
+ * $Id: fax.h,v 1.38 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
index 5213573a52bededa8bf30b999da5cdf4e2f9a4ef..6a04cc236587251682d9a21dea8c51e8f78e2f66 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: fax_modems.h,v 1.7 2009/01/31 08:48:11 steveu Exp $
+ * $Id: fax_modems.h,v 1.8 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
index cec74529c5d833f8db8b030845272d1ac6daca9d..c443cf2f2f61fe1662f936a6acd6062bba03df82 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: fsk.h,v 1.34 2009/01/31 08:48:11 steveu Exp $
+ * $Id: fsk.h,v 1.35 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
@@ -144,9 +144,9 @@ extern "C"
     \param user_data An opaque pointer.
     \return A pointer to the modem context, or NULL if there was a problem. */
 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);
+                                           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.
@@ -192,10 +192,10 @@ SPAN_DECLARE(void) fsk_rx_signal_cutoff(fsk_rx_state_t *s, float cutoff);
     \param user_data An opaque pointer.
     \return A pointer to the modem context, or NULL if there was a problem. */
 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);
+                                           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.
index bc9d3c7cb8a6c180668d117264f40e23eb450f55..0ab8a79ce5b479cb0566603234c9b2c997ecfc40 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: g711.h,v 1.16 2009/01/31 08:48:11 steveu Exp $
+ * $Id: g711.h,v 1.17 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
index 657599d99b409379de0079399cc999318199a02b..3ec29b2857e4bc9bf4ac8a555603685be12c95f1 100644 (file)
@@ -28,7 +28,7 @@
  * Computer Science, Speech Group
  * Chengxiang Lu and Alex Hauptmann
  *
- * $Id: g722.h,v 1.23 2009/01/31 08:48:11 steveu Exp $
+ * $Id: g722.h,v 1.24 2009/02/03 16:28:41 steveu Exp $
  */
 
 
index 44e94e8e7780cf4a8b38216325c5c7378ea0ff81..a237fa508e6765d85e841461b1e738fd58728dd0 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: g726.h,v 1.23 2009/01/31 08:48:11 steveu Exp $
+ * $Id: g726.h,v 1.24 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
index 283af355c1b0c9c0f2bbd4c6cc2a77e651e94960..c4b9361cff2303d51936e600a8f636dd5e4dc349 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: gsm0610.h,v 1.19 2009/01/31 08:48:11 steveu Exp $
+ * $Id: gsm0610.h,v 1.20 2009/02/03 16:28:41 steveu Exp $
  */
 
 #if !defined(_SPANDSP_GSM0610_H_)
index 20adceb4df74d84193138646eea19c0132177a53..ac3172001faa6bd9cd71450b62f164905f507ba1 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: hdlc.h,v 1.41 2009/01/31 08:48:11 steveu Exp $
+ * $Id: hdlc.h,v 1.42 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
@@ -95,11 +95,11 @@ extern "C"
     \return A pointer to the HDLC receiver context.
 */
 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);
+                                             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.
@@ -151,11 +151,11 @@ SPAN_DECLARE(void) hdlc_rx_put(hdlc_rx_state_t *s, const uint8_t buf[], int len)
     \return A pointer to the HDLC transmitter context.
 */
 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);
+                                             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.
index 8c0648190964af3157a63868f6a7406689d2e1de..c1b6e8d200a863fd757e8a68a41adb272565f6f6 100644 (file)
@@ -26,7 +26,7 @@
  * Based on a bit from here, a bit from there, eye of toad,
  * ear of bat, etc - plus, of course, my own 2 cents.
  *
- * $Id: ima_adpcm.h,v 1.22 2009/01/31 08:48:11 steveu Exp $
+ * $Id: ima_adpcm.h,v 1.23 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
@@ -74,8 +74,8 @@ extern "C"
            as a chunk.
     \return A pointer to the IMA ADPCM context, or NULL for error. */
 SPAN_DECLARE(ima_adpcm_state_t *) ima_adpcm_init(ima_adpcm_state_t *s,
-                                                int variant,
-                                                int chunk_size);
+                                                 int variant,
+                                                 int chunk_size);
 
 /*! Free an IMA ADPCM encode or decode context.
     \param s The IMA ADPCM context.
index c46b8149b4d4be2fccc40580845fb7f995bd5a2d..fa5a1241e9886dea7cc236d8fd73581418e62c38 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: lpc10.h,v 1.19 2009/01/31 08:48:11 steveu Exp $
+ * $Id: lpc10.h,v 1.20 2009/02/03 16:28:41 steveu Exp $
  */
 
 #if !defined(_SPANDSP_LPC10_H_)
index 96c45af167ead28ac8493d1823496482f811c11e..c8dc4e2f5d623fbca6332b6afc7d3d82e8c0b316 100644 (file)
@@ -24,7 +24,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: modem_connect_tones.h,v 1.20 2009/01/31 08:48:11 steveu Exp $
+ * $Id: modem_connect_tones.h,v 1.21 2009/02/03 16:28:41 steveu Exp $
  */
  
 /*! \file */
@@ -105,7 +105,7 @@ extern "C"
     \param s The context.
 */
 SPAN_DECLARE(modem_connect_tones_tx_state_t *) modem_connect_tones_tx_init(modem_connect_tones_tx_state_t *s,
-                                                                          int tone_type);
+                                                                           int tone_type);
 
 /*! \brief Free an instance of the modem connect tones generator.
     \param s The context.
@@ -148,9 +148,9 @@ SPAN_DECLARE(int) modem_connect_tones_rx_get(modem_connect_tones_rx_state_t *s);
     \return A pointer to the context.
 */
 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);
+                                                                           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.
index 3e888d19b5605523aa11837cad69128eb76afdb2..cc9f06e45e215b8cf1f400e1e559cfedc84ea929 100644 (file)
@@ -25,7 +25,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: modem_echo.h,v 1.12 2009/01/31 08:48:11 steveu Exp $
+ * $Id: modem_echo.h,v 1.13 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
index 6e5f498fc0ad4d6b428d5860989a7d6e48ac79d6..d04dbe3204b4134d4e3fc3db5c8fa25429522eba 100644 (file)
@@ -23,7 +23,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: noise.h,v 1.15 2009/01/31 08:48:11 steveu Exp $
+ * $Id: noise.h,v 1.16 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
index b8b2898e88041a088cc69ea7eb541d767949a3bd..dec6b4df8d0335cf896515b064be2828404e2c53 100644 (file)
@@ -23,7 +23,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: oki_adpcm.h,v 1.22 2009/01/31 08:48:11 steveu Exp $
+ * $Id: oki_adpcm.h,v 1.23 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
@@ -62,7 +62,7 @@ extern "C"
            The valid rates are 24000 and 32000.
     \return A pointer to the Oki ADPCM context, or NULL for error. */
 SPAN_DECLARE(oki_adpcm_state_t *) oki_adpcm_init(oki_adpcm_state_t *s,
-                                                int bit_rate);
+                                                 int bit_rate);
 
 /*! Free an Oki ADPCM encode or decode context.
     \param s The Oki ADPCM context.
index d6f900e7b125eff6e1696f8fc387d26bf15df139..d6d2a6c8fd1c44b847a176cd9b78deedf5fc6923 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: playout.h,v 1.12 2009/01/31 08:48:11 steveu Exp $
+ * $Id: playout.h,v 1.13 2009/02/03 16:28:41 steveu Exp $
  */
 
 #if !defined(_SPANDSP_PLAYOUT_H_)
index f91ca9ab32ffdaecd3231c19c44718402f27417f..b01fe9af12e23ed024d206a1216d3a28d857aa2a 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: plc.h,v 1.19 2009/01/31 08:48:11 steveu Exp $
+ * $Id: plc.h,v 1.20 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
index 351632b2d082c9bb13b297a5403de1ae85dac5f4..27a3576dd888b3c5d010ebaea268deaac6995af2 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: power_meter.h,v 1.16 2009/01/31 08:48:11 steveu Exp $
+ * $Id: power_meter.h,v 1.17 2009/02/03 16:28:41 steveu Exp $
  */
 
 #if !defined(_POWER_METER_H_)
index afca056057341a42f4ef3e71ba268931f264b454..cf0d18ae78dd73acbd0e54d44e9989c7a6c0f5d3 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: queue.h,v 1.19 2009/01/31 08:48:11 steveu Exp $
+ * $Id: queue.h,v 1.20 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
index 61cc702054411050f5db6423f1d1250a0c233de2..ad9d3ff0fe66e0907755d1efc42b5eb6e4d96196 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: saturated.h,v 1.1 2008/09/19 14:02:05 steveu Exp $
+ * $Id: saturated.h,v 1.3 2009/02/03 17:25:53 steveu Exp $
  */
 
 /*! \file */
@@ -75,7 +75,8 @@ static __inline__ int16_t fsaturatef(float famp)
         return INT16_MAX;
     if (famp < (float) INT16_MIN)
         return INT16_MIN;
-    return (int16_t) rintf(famp);
+    //return (int16_t) lfastrintf(famp);
+    return (int16_t) lrintf(famp);
 }
 /*- End of function --------------------------------------------------------*/
 
@@ -85,7 +86,8 @@ static __inline__ int16_t fsaturate(double damp)
         return INT16_MAX;
     if (damp < (double) INT16_MIN)
         return INT16_MIN;
-    return (int16_t) rint(damp);
+    //return (int16_t) lfastrint(damp);
+    return (int16_t) lrint(damp);
 }
 /*- End of function --------------------------------------------------------*/
 
index 2c60ec275c05c8c8b26b7734528280cc7b4b52ca..d9f607a1868c16fe1639c77a24b3754b14296fa6 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: schedule.h,v 1.18 2009/01/31 08:48:11 steveu Exp $
+ * $Id: schedule.h,v 1.19 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
index e8573ea600cb1ed0dcb77dadeec91b629f3a1482..2f397be74911e08fae7807f5800af049f076491d 100644 (file)
@@ -23,7 +23,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: sig_tone.h,v 1.16 2009/01/31 08:48:11 steveu Exp $
+ * $Id: sig_tone.h,v 1.17 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
index 79bf0df88a60dbc0c950502e0b5d1c557c844eb1..48b471c6e15c0d07cf765892042ea4b9872d9a8c 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: silence_gen.h,v 1.13 2009/01/31 08:48:11 steveu Exp $
+ * $Id: silence_gen.h,v 1.14 2009/02/03 16:28:41 steveu Exp $
  */
 
 #if !defined(_SPANDSP_SILENCE_GEN_H_)
@@ -117,7 +117,7 @@ SPAN_DECLARE(silence_gen_state_t *) silence_gen_init(silence_gen_state_t *s, int
     \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
index 0fff5477b6e8e148068bb84f1ab4294c8bacba39..a24bc8b2efb1eb71d9f7b93efbb3b22ea0184c08 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: super_tone_rx.h,v 1.19 2009/01/31 08:48:11 steveu Exp $
+ * $Id: super_tone_rx.h,v 1.20 2009/02/03 16:28:41 steveu Exp $
  */
 
 #if !defined(_SPANDSP_SUPER_TONE_RX_H_)
@@ -111,9 +111,9 @@ SPAN_DECLARE(int) super_tone_rx_add_element(super_tone_rx_descriptor_t *desc,
     \return The supervisory tone detector context.
 */
 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);
+                                                         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.
index a36a45d14ba0af080442ababff12dc0c129fdef0..b6153f8d39dff60c790bca8a2b23b14ddf82d050 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: super_tone_tx.h,v 1.15 2009/01/31 08:48:11 steveu Exp $
+ * $Id: super_tone_tx.h,v 1.16 2009/02/03 16:28:41 steveu Exp $
  */
 
 #if !defined(_SPANDSP_SUPER_TONE_TX_H_)
@@ -51,12 +51,12 @@ extern "C"
 #endif
 
 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);
+                                                             float f1,
+                                                             float l1,
+                                                             float f2,
+                                                             float l2,
+                                                             int length,
+                                                             int cycles);
 
 SPAN_DECLARE(void) super_tone_tx_free(super_tone_tx_step_t *s);
 
index dfbdf3962813ce1c3586d74cbab87d479d4bc74f..614373055fa63d32b175166738db4f0bd8aa9c68 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t30.h,v 1.121 2009/01/31 08:48:11 steveu Exp $
+ * $Id: t30.h,v 1.122 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
@@ -559,13 +559,13 @@ extern "C"
     \param send_hdlc_user_data
     \return A pointer to the context, or NULL if there was a problem. */
 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);
+                                     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.
@@ -607,7 +607,7 @@ SPAN_DECLARE(void) t30_front_end_status(void *user_data, int status);
     \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.
@@ -627,7 +627,7 @@ SPAN_DECLARE(int) t30_non_ecm_get_chunk(void *user_data, uint8_t buf[], int max_
     \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
@@ -648,7 +648,7 @@ SPAN_DECLARE(void) t30_non_ecm_put_chunk(void *user_data, const uint8_t buf[], i
     \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.
index 8653de537b88ee1f49a106729ef5cd484b1faf31..92725a804068e2400f89d57de8201d99eaaadd10 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t30_api.h,v 1.8 2009/01/31 08:48:11 steveu Exp $
+ * $Id: t30_api.h,v 1.9 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
index 2c94777189434b94a5e6188dd1c7a641085689de..cd68fdca973e4834151d8f29b53a012f0597eb4e 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t30_logging.h,v 1.3 2009/01/31 08:48:11 steveu Exp $
+ * $Id: t30_logging.h,v 1.4 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
index 71b232f1b2d827523ee91eee405eb062c50e00c0..f33d071ac95ef77178fa7ca2154f5c7939bcfd47 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t31.h,v 1.56 2009/01/31 08:48:11 steveu Exp $
+ * $Id: t31.h,v 1.57 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
@@ -127,12 +127,12 @@ SPAN_DECLARE(t38_core_state_t *) t31_get_t38_core_state(t31_state_t *s);
     \param tx_t38_packet_user_data ???
     \return A pointer to the T.31 context. */
 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);
+                                     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.
index 01e4fded874c12f49c66c21ce702f0df5638abc7..1d31e7ff797fb66514132324afea643cff131526 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t38_core.h,v 1.35 2009/01/31 08:48:11 steveu Exp $
+ * $Id: t38_core.h,v 1.36 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
@@ -329,12 +329,12 @@ SPAN_DECLARE(void) t38_set_tep_handling(t38_core_state_t *s, int allow_for_tep);
 SPAN_DECLARE(logging_state_t *) t38_core_get_logging_state(t38_core_state_t *s);
 
 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);
+                                               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)
 }
index 9b5788ad0fe9c64e88a8900a8ed0e2bc0335ccaf..ea6dd25f0ac9a6cc4e39bd4aa98d8849ab3e6b43 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t38_gateway.h,v 1.60 2009/01/31 08:48:11 steveu Exp $
+ * $Id: t38_gateway.h,v 1.61 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
@@ -83,8 +83,8 @@ extern "C"
     \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. */
 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);
+                                                     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.
index 6a0a7be0dcf0b3d9c098422c83b767c444dd7a2c..cb6f5030232797937584676f07f33ae5d1d743b8 100644 (file)
@@ -23,7 +23,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t38_non_ecm_buffer.h,v 1.4 2009/01/31 08:48:11 steveu Exp $
+ * $Id: t38_non_ecm_buffer.h,v 1.5 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
@@ -93,7 +93,7 @@ SPAN_DECLARE(void) t38_non_ecm_buffer_report_output_status(t38_non_ecm_buffer_st
 /*! \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)
 }
index 34a023a420da879ba3aab78a18e0fb63d2da7202..4bcb1e0d28f4a832f1dbcd904ac80d13af50b4d2 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t38_terminal.h,v 1.40 2009/01/31 08:48:11 steveu Exp $
+ * $Id: t38_terminal.h,v 1.41 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
@@ -95,9 +95,9 @@ SPAN_DECLARE(logging_state_t *) t38_terminal_get_logging_state(t38_terminal_stat
     \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. */
 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);
+                                                       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.
index 5e1ea8450e319063744be7484197f151da2245c0..3717b8ad19c4ba049b779da271a2f76af803da84 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t4.h,v 1.54 2009/01/31 08:48:11 steveu Exp $
+ * $Id: t4.h,v 1.55 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
index 7520adcd80d728343d3cbda06ba5d6589e312e31..90f23615ec7b5c563b05d03bca5346b34f362045 100644 (file)
  * 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.15 2009/01/31 12:12:21 steveu Exp $
+ * $Id: telephony.h,v 1.16 2009/02/03 16:28:41 steveu Exp $
  */
 
 #if !defined(_SPANDSP_TELEPHONY_H_)
 #define _SPANDSP_TELEPHONY_H_
 
 #if defined(WIN32)
-# if defined(LIBSPANDSP_EXPORTS)
-#  define SPAN_DECLARE(type)          __declspec(dllexport) type __stdcall
-#  define SPAN_DECLARE_NONSTD(type)   __declspec(dllexport) type __cdecl
-#  define SPAN_DECLARE_DATA           __declspec(dllexport)
-# else
-#  define SPAN_DECLARE(type)          __declspec(dllimport) type __stdcall
-#  define SPAN_DECLARE_NONSTD(type)   __declspec(dllimport) type __cdecl
-#  define SPAN_DECLARE_DATA           __declspec(dllimport)
-# endif
-#elif defined(SPANDSP_USE_EXPORT_CAPABILITY) && (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")))
+#if defined(LIBSPANDSP_EXPORTS)
+#define SPAN_DECLARE(type)              __declspec(dllexport) type __stdcall
+#define SPAN_DECLARE_NONSTD(type)       __declspec(dllexport) type __cdecl
+#define SPAN_DECLARE_DATA               __declspec(dllexport)
 #else
-# define SPAN_DECLARE(type)                /**/ type
-# define SPAN_DECLARE_NONSTD(type)     /**/ type
-# define SPAN_DECLARE_DATA                 /**/
+#define SPAN_DECLARE(type)              __declspec(dllimport) type __stdcall
+#define SPAN_DECLARE_NONSTD(type)       __declspec(dllimport) type __cdecl
+#define SPAN_DECLARE_DATA               __declspec(dllimport)
+#endif
+#elif defined(SPANDSP_USE_EXPORT_CAPABILITY)  &&  (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")))
+#else
+#define SPAN_DECLARE(type)              /**/ type
+#define SPAN_DECLARE_NONSTD(type)       /**/ type
+#define SPAN_DECLARE_DATA               /**/
 #endif
 
 #define SAMPLE_RATE                 8000
index 487a793617fd4354850952364cf8315ec6a505d4..f42526d75aecf5521afeba20340fc63450108d5e 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: time_scale.h,v 1.18 2009/01/31 08:48:11 steveu Exp $
+ * $Id: time_scale.h,v 1.19 2009/02/03 16:28:41 steveu Exp $
  */
 
 #if !defined(_SPANDSP_TIME_SCALE_H_)
index 0ec112c31e773bc5b7578b171cbc6b4bb439a6f2..07fe02df58ddc994958c3ac46995d5dd6ff42906 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: tone_detect.h,v 1.43 2009/01/31 08:48:11 steveu Exp $
+ * $Id: tone_detect.h,v 1.44 2009/02/03 16:28:41 steveu Exp $
  */
 
 #if !defined(_SPANDSP_TONE_DETECT_H_)
@@ -75,29 +75,29 @@ extern "C"
 #endif
 
 /*! \brief Create a descriptor for use with either a Goertzel transform */
-void make_goertzel_descriptor(goertzel_descriptor_t *t,
-                              float freq,
-                              int samples);
+SPAN_DECLARE(void) make_goertzel_descriptor(goertzel_descriptor_t *t,
+                                            float freq,
+                                            int samples);
 
 /*! \brief Initialise the state of a Goertzel transform.
     \param s The Goertzel context. If NULL, a context is allocated with malloc.
     \param t The Goertzel descriptor.
     \return A pointer to the Goertzel state. */
-goertzel_state_t *goertzel_init(goertzel_state_t *s,
-                                goertzel_descriptor_t *t);
+SPAN_DECLARE(goertzel_state_t *) goertzel_init(goertzel_state_t *s,
+                                               goertzel_descriptor_t *t);
 
 /*! \brief Reset the state of a Goertzel transform.
     \param s The Goertzel context. */
-void goertzel_reset(goertzel_state_t *s);
+SPAN_DECLARE(void) goertzel_reset(goertzel_state_t *s);
 
 /*! \brief Update the state of a Goertzel transform.
     \param s The Goertzel context.
     \param amp The samples to be transformed.
     \param samples The number of samples.
     \return The number of samples unprocessed */
-int goertzel_update(goertzel_state_t *s,
-                    const int16_t amp[],
-                    int samples);
+SPAN_DECLARE(int) goertzel_update(goertzel_state_t *s,
+                                  const int16_t amp[],
+                                  int samples);
 
 /*! \brief Evaluate the final result of a Goertzel transform.
     \param s The Goertzel context.
@@ -106,9 +106,9 @@ int goertzel_update(goertzel_state_t *s,
     [Floating point] ((samples_per_goertzel_block*32768.0/1.4142)*10^((x - DBM0_MAX_SINE_POWER)/20.0))^2
     [Fixed point] ((samples_per_goertzel_block*256.0/1.4142)*10^((x - DBM0_MAX_SINE_POWER)/20.0))^2 */
 #if defined(SPANDSP_USE_FIXED_POINT)
-int32_t goertzel_result(goertzel_state_t *s);
+SPAN_DECLARE(int32_t) goertzel_result(goertzel_state_t *s);
 #else
-float goertzel_result(goertzel_state_t *s);
+SPAN_DECLARE(float) goertzel_result(goertzel_state_t *s);
 #endif
 
 /*! \brief Update the state of a Goertzel transform.
index 0b79209b9a6a3e1db70aac57e178a709a8ee09ad..8e78d70fc767d642e4800629c01197f830955170 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: tone_generate.h,v 1.36 2009/01/31 08:48:11 steveu Exp $
+ * $Id: tone_generate.h,v 1.37 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
index 3bbc6225398c85200df7108c17c62209a9ecd5e9..8d8d77e71eb6ffba5e1698c0556347d59dee6efd 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v17rx.h,v 1.59 2009/01/31 08:48:11 steveu Exp $
+ * $Id: v17rx.h,v 1.60 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
index 6cf5a50e125b1901f577a38caabc5dfe7afd9855..c02684b3b2104a4c39251428a01f981965dffbe6 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v17tx.h,v 1.38 2009/01/31 08:48:11 steveu Exp $
+ * $Id: v17tx.h,v 1.39 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
index 896c2525d59fdde00f810bf3cabb93baf4eba48f..4bb755312b7dd255d86a4d7f1212d122fd5a3c06 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v22bis.h,v 1.33 2009/01/31 08:48:11 steveu Exp $
+ * $Id: v22bis.h,v 1.34 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
@@ -145,12 +145,12 @@ SPAN_DECLARE(int) v22bis_restart(v22bis_state_t *s, int bit_rate);
     \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. */
 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);
+                                           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.
index 43de608f19c24ac6dfeb99d420e180224f864cff..7d660a07f8920f0ba2a67a6183f03128e9b7ffe1 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v27ter_rx.h,v 1.55 2009/01/31 08:48:11 steveu Exp $
+ * $Id: v27ter_rx.h,v 1.56 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
index 89bede7404892ee81f57dfb64828c9a6913440f7..8dcfd9442ed40f6d7feb8e80d62afbee193d6d3e 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v27ter_tx.h,v 1.38 2009/01/31 08:48:11 steveu Exp $
+ * $Id: v27ter_tx.h,v 1.39 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
index 06dbe9c2fc03d0ab11b5a53392f5ee2d4090d428..59b0e4c106751518f2cc11c935d5767ce01c5e95 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v29rx.h,v 1.66 2009/01/31 08:48:11 steveu Exp $
+ * $Id: v29rx.h,v 1.67 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
index 6334adb5b50af433453b0e21fef426da47575379..f0fd50e4576b75f83e4df090f9268a13cf713559 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v29tx.h,v 1.36 2009/01/31 08:48:11 steveu Exp $
+ * $Id: v29tx.h,v 1.37 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \file */
index c1f631f2dde288997561bb989afe717f0eda31ea..2b43c5a3960a63a72f6ea98ec0cf04c45128da0b 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v42.h,v 1.27 2009/01/31 08:48:11 steveu Exp $
+ * $Id: v42.h,v 1.28 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \page v42_page V.42 modem error correction
@@ -94,7 +94,7 @@ SPAN_DECLARE(void) lapm_dump(lapm_state_t *s, const uint8_t *frame, int len, int
 
 /*! 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
 */
index c1c98650773f27e41c43e1e967e8abf5e6b8a25a..1f74fc71f9130d075b02a4a74f071cb2460c92ad 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v42bis.h,v 1.24 2009/01/31 08:48:11 steveu Exp $
+ * $Id: v42bis.h,v 1.25 2009/02/03 16:28:41 steveu Exp $
  */
 
 /*! \page v42bis_page V.42bis modem data compression
@@ -107,15 +107,15 @@ SPAN_DECLARE(int) v42bis_decompress_flush(v42bis_state_t *s);
     \param max_data_len The maximum length that should be passed to the data handler.
     \return The V.42bis context. */
 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);
+                                           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.
index 05723900b627c08a939e496e3117b523ba02617d..61533102bd6f1a30fb21bbf39cc27634b987ef36 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v8.h,v 1.26 2009/01/31 08:48:11 steveu Exp $
+ * $Id: v8.h,v 1.27 2009/02/03 16:28:41 steveu Exp $
  */
  
 /*! \file */
@@ -129,10 +129,10 @@ extern "C"
     \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. */
 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);
+                                   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.
index d0789683cc88b04efa9dbc3909e4514127ba4231..c22108a75de64fea70cca5a352120b8ad103584c 100644 (file)
@@ -30,8 +30,8 @@
 
 /* The date and time of the version are in UTC form. */
 
-#define SPANDSP_RELEASE_DATE    20090131
-#define SPANDSP_RELEASE_TIME    122642
+#define SPANDSP_RELEASE_DATE    20090203
+#define SPANDSP_RELEASE_TIME    172817
 
 #endif
 /*- End of file ------------------------------------------------------------*/
index 39e5b97163bc6ea58da318088f52db04380a5388..840154166d224936754a662285f40b6cbd3b3b0e 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: super_tone_rx.c,v 1.31 2009/01/28 03:41:27 steveu Exp $
+ * $Id: super_tone_rx.c,v 1.32 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
@@ -47,6 +47,7 @@
 #include "floating_fudge.h"
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/complex.h"
 #include "spandsp/vector_float.h"
 #include "spandsp/complex_vector_float.h"
@@ -120,11 +121,11 @@ SPAN_DECLARE(int) super_tone_rx_add_tone(super_tone_rx_descriptor_t *desc)
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(int) super_tone_rx_add_element(super_tone_rx_descriptor_t *desc,
-                              int tone,
-                              int f1,
-                              int f2,
-                              int min,
-                              int max)
+                                            int tone,
+                                            int f1,
+                                            int f2,
+                                            int min,
+                                            int max)
 {
     int step;
 
@@ -224,16 +225,16 @@ SPAN_DECLARE(int) super_tone_rx_free_descriptor(super_tone_rx_descriptor_t *desc
 /*- End of function --------------------------------------------------------*/
 
 SPAN_DECLARE(void) super_tone_rx_segment_callback(super_tone_rx_state_t *s,
-                                    void (*callback)(void *data, int f1, int f2, int duration))
+                                                  void (*callback)(void *data, int f1, int f2, int duration))
 {
     s->segment_callback = callback;
 }
 /*- End of function --------------------------------------------------------*/
 
 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)
+                                                         super_tone_rx_descriptor_t *desc,
+                                                         tone_report_func_t callback,
+                                                         void *user_data)
 {
     int i;
 
index 4f3ad9342f1592f998e7c0f4872134c12d6285c8..99d7616a31125d82bd45e181c9684e0489e085fc 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: super_tone_tx.c,v 1.27 2009/01/28 03:41:27 steveu Exp $
+ * $Id: super_tone_tx.c,v 1.28 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
@@ -47,6 +47,7 @@
 #include "floating_fudge.h"
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/complex.h"
 #include "spandsp/dds.h"
 #include "spandsp/tone_generate.h"
 */
 
 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)
+                                                             float f1,
+                                                             float l1,
+                                                             float f2,
+                                                             float l2,
+                                                             int length,
+                                                             int cycles)
 {
     if (s == NULL)
     {
@@ -193,7 +194,7 @@ SPAN_DECLARE(int) super_tone_tx(super_tone_tx_state_t *s, int16_t amp[], int max
                     /* There must be two, and only two tones */
                     xamp = dds_modf(&s->phase[0], -s->tone[0].phase_rate, s->tone[0].gain, 0)
                          *(1.0f + dds_modf(&s->phase[1], s->tone[1].phase_rate, s->tone[1].gain, 0));
-                    amp[samples] = (int16_t) lrintf(xamp);
+                    amp[samples] = (int16_t) lfastrintf(xamp);
                 }
             }
             else
@@ -207,7 +208,7 @@ SPAN_DECLARE(int) super_tone_tx(super_tone_tx_state_t *s, int16_t amp[], int max
                             break;
                         xamp += dds_modf(&s->phase[i], s->tone[i].phase_rate, s->tone[i].gain, 0);
                     }
-                    amp[samples] = (int16_t) lrintf(xamp);
+                    amp[samples] = (int16_t) lfastrintf(xamp);
                 }
             }
             if (s->current_position)
index d546ba2bfcd4d1aec31f928b22dbf8d87f935d6b..c4c58490054914e0a13b40319dd08cdfc7b0dc5c 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t30.c,v 1.282 2009/01/31 09:47:59 steveu Exp $
+ * $Id: t30.c,v 1.283 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
@@ -4986,7 +4986,7 @@ static void t30_non_ecm_rx_status(void *user_data, int status)
 }
 /*- End of function --------------------------------------------------------*/
 
-void t30_non_ecm_put_bit(void *user_data, int bit)
+SPAN_DECLARE(void) t30_non_ecm_put_bit(void *user_data, int bit)
 {
     t30_state_t *s;
 
@@ -5102,7 +5102,7 @@ SPAN_DECLARE(void) t30_non_ecm_put_chunk(void *user_data, const uint8_t buf[], i
 }
 /*- End of function --------------------------------------------------------*/
 
-int t30_non_ecm_get_bit(void *user_data)
+SPAN_DECLARE(int) t30_non_ecm_get_bit(void *user_data)
 {
     int bit;
     t30_state_t *s;
@@ -5302,7 +5302,7 @@ static void t30_hdlc_rx_status(void *user_data, int status)
 }
 /*- End of function --------------------------------------------------------*/
 
-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)
 {
     t30_state_t *s;
 
@@ -5823,13 +5823,13 @@ SPAN_DECLARE(int) t30_restart(t30_state_t *s)
 /*- End of function --------------------------------------------------------*/
 
 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)
+                                     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)
 {
     if (s == NULL)
     {
index 58bc780626bc5eeea69fa5d2f47d3a0ff2037a03..0aa4ccf08228d88fe2e7c9df620b915323780d69 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t30_api.c,v 1.12 2009/01/28 03:41:27 steveu Exp $
+ * $Id: t30_api.c,v 1.13 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
index 77206d0cca663aabb965ec6e39cf21aef3cf7d5c..b9fce80b9d3753caa666fa5cd39b2c6600b44f5e 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t30_logging.c,v 1.10 2009/01/28 03:41:27 steveu Exp $
+ * $Id: t30_logging.c,v 1.11 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
index 9c77671534a69c3920d4bb72214cd34c15799f33..99f562d055fcb853e9b86c4346d797d7aede84aa 100644 (file)
@@ -25,7 +25,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t31.c,v 1.137 2009/01/29 01:41:06 steveu Exp $
+ * $Id: t31.c,v 1.139 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
@@ -633,17 +633,17 @@ static __inline__ int bits_to_us(t31_state_t *s, int bits)
 static void set_octets_per_data_packet(t31_state_t *s, int bit_rate)
 {
     s->t38_fe.tx_bit_rate = bit_rate;
-    if (s->t38_fe.ms_per_tx_chunk == 0)
-    {
-        s->t38_fe.octets_per_data_packet = MAX_OCTETS_PER_UNPACED_CHUNK;
-    }
-    else
+    if (s->t38_fe.ms_per_tx_chunk)
     {
         s->t38_fe.octets_per_data_packet = s->t38_fe.ms_per_tx_chunk*bit_rate/(8*1000);
         /* Make sure we have a positive number (i.e. we didn't truncate to zero). */
         if (s->t38_fe.octets_per_data_packet < 1)
             s->t38_fe.octets_per_data_packet = 1;
     }
+    else
+    {
+        s->t38_fe.octets_per_data_packet = MAX_OCTETS_PER_UNPACED_CHUNK;
+    }
 }
 /*- End of function --------------------------------------------------------*/
 
@@ -682,22 +682,34 @@ static int stream_non_ecm(t31_state_t *s)
                 bit_reverse(buf, buf, len);
             if (len < fe->octets_per_data_packet)
             {
-                /* That's the end of the image data. Do a little padding now */
-                memset(buf + len, 0, fe->octets_per_data_packet - len);
-                fe->non_ecm_trailer_bytes = 3*fe->octets_per_data_packet + len;
-                len = fe->octets_per_data_packet;
-                fe->timed_step = T38_TIMED_STEP_NON_ECM_MODEM_4;
+                /* That's the end of the image data. */
+                if (s->t38_fe.ms_per_tx_chunk)
+                {
+                    /* Pad the end of the data with some zeros. If we just stop abruptly
+                       at the end of the EOLs, some ATAs fail to clean up properly before
+                       shutting down their transmit modem, and the last few rows of the image
+                       are lost or corrupted. Simply delaying the no-signal message does not
+                       help for all implentations. It is usually ignored, which is probably
+                       the right thing to do after receiving a message saying the signal has
+                       ended. */
+                    memset(buf + len, 0, fe->octets_per_data_packet - len);
+                    fe->non_ecm_trailer_bytes = 3*fe->octets_per_data_packet + len;
+                    len = fe->octets_per_data_packet;
+                    fe->timed_step = T38_TIMED_STEP_NON_ECM_MODEM_4;
+                }
+                else
+                {
+                    /* If we are sending quickly there seems no point in doing any padding */
+                    t38_core_send_data(&fe->t38, fe->current_tx_data_type, T38_FIELD_T4_NON_ECM_SIG_END, buf, len, fe->t38.data_end_tx_count);
+                    fe->timed_step = T38_TIMED_STEP_NON_ECM_MODEM_5;
+                    delay = 0;
+                }
             }
             t38_core_send_data(&fe->t38, fe->current_tx_data_type, T38_FIELD_T4_NON_ECM_DATA, buf, len, fe->t38.data_tx_count);
             delay = bits_to_us(s, 8*len);
             break;
         case T38_TIMED_STEP_NON_ECM_MODEM_4:
-            /* This pads the end of the data with some zeros. If we just stop abruptly
-               at the end of the EOLs, some ATAs fail to clean up properly before
-               shutting down their transmit modem, and the last few rows of the image
-               are corrupted. Simply delaying the no-signal message does not help for
-               all implentations. It is usually ignored, which is probably the right
-               thing to do after receiving a message saying the signal has ended. */
+            /* Send padding */
             len = fe->octets_per_data_packet;
             fe->non_ecm_trailer_bytes -= len;
             if (fe->non_ecm_trailer_bytes <= 0)
@@ -708,7 +720,9 @@ static int stream_non_ecm(t31_state_t *s)
                 fe->timed_step = T38_TIMED_STEP_NON_ECM_MODEM_5;
                 /* Allow a bit more time than the data will take to play out, to ensure the far ATA does not
                    cut things short. */
-                delay = bits_to_us(s, 8*len) + 60000;
+                delay = bits_to_us(s, 8*len);
+                if (s->t38_fe.ms_per_tx_chunk)
+                    delay += 60000;
                 front_end_status(s, T30_FRONT_END_SEND_STEP_COMPLETE);
                 break;
             }
@@ -790,7 +804,9 @@ static int stream_hdlc(t31_state_t *s)
                         fe->timed_step = T38_TIMED_STEP_HDLC_MODEM_5;
                         /* We add a bit of extra time here, as with some implementations
                            the carrier falling too abruptly causes data loss. */
-                        delay = bits_to_us(s, i*8 + fe->hdlc_tx.extra_bits) + 100000;
+                        delay = bits_to_us(s, i*8 + fe->hdlc_tx.extra_bits);
+                        if (s->t38_fe.ms_per_tx_chunk)
+                            delay += 100000;
                         at_put_response_code(&s->at_state, AT_RESPONSE_CODE_OK);
                         t31_set_at_rx_mode(s, AT_MODE_OFFHOOK_COMMAND);
                     }
@@ -831,7 +847,9 @@ static int stream_hdlc(t31_state_t *s)
                 fe->timed_step = T38_TIMED_STEP_HDLC_MODEM_5;
                 /* We add a bit of extra time here, as with some implementations
                    the carrier falling too abruptly causes data loss. */
-                delay = bits_to_us(s, fe->hdlc_tx.extra_bits) + 100000;
+                delay = bits_to_us(s, fe->hdlc_tx.extra_bits);
+                if (s->t38_fe.ms_per_tx_chunk)
+                    delay += 100000;
                 front_end_status(s, T30_FRONT_END_SEND_STEP_COMPLETE);
                 break;
             }
@@ -2446,12 +2464,12 @@ static int t31_t38_fe_init(t31_state_t *t,
 /*- End of function --------------------------------------------------------*/
 
 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)
+                                     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)
 {
     int alloced;
     
index 63eb5f6c3eaa7c50bc6e2757ed52de26577f91df..03ea01a05bdc487efb31eadec67f308430d4fd9b 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t35.c,v 1.28 2009/01/05 13:48:31 steveu Exp $
+ * $Id: t35.c,v 1.29 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*
@@ -738,7 +738,7 @@ static const nsf_data_t known_nsf[] =
 };
 
 #if 0
-void nsf_find_station_id(int reverse_order)
+SPAN_DECLARE(void) nsf_find_station_id(int reverse_order)
 {
     const char *id = NULL;
     int idSize = 0;
index a07a38ca856522bd4f5780b32494e750bb6aa2e6..2c501dd3900e79d5f4cf10b4d4b95d7b8ae1b1de 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t38_core.c,v 1.50 2009/01/28 03:41:27 steveu Exp $
+ * $Id: t38_core.c,v 1.51 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
@@ -924,12 +924,12 @@ SPAN_DECLARE(logging_state_t *) t38_core_get_logging_state(t38_core_state_t *s)
 /*- End of function --------------------------------------------------------*/
 
 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)
+                                               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 (s == NULL)
     {
index 7c0912980f91e211ab6e994afa5fd5bfab672451..169c73f67fd999cf4967c39d9655ea9882b17284 100644 (file)
@@ -23,7 +23,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t38_gateway.c,v 1.152 2009/01/29 18:30:14 steveu Exp $
+ * $Id: t38_gateway.c,v 1.153 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
@@ -2151,10 +2151,10 @@ SPAN_DECLARE(void) t38_gateway_set_supported_modems(t38_gateway_state_t *s, int
 /*- End of function --------------------------------------------------------*/
 
 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)
+                                                    const uint8_t *from_t38,
+                                                    int from_t38_len,
+                                                    const uint8_t *from_modem,
+                                                    int from_modem_len)
 {
     s->t38x.suppress_nsx_len[0] = (from_t38_len < 0  ||  from_t38_len < MAX_NSX_SUPPRESSION)  ?  (from_t38_len + 3)  :  0;
     s->t38x.suppress_nsx_len[1] = (from_modem_len < 0  ||  from_modem_len < MAX_NSX_SUPPRESSION)  ?  (from_modem_len + 3)  :  0;
@@ -2174,8 +2174,8 @@ SPAN_DECLARE(void) t38_gateway_set_fill_bit_removal(t38_gateway_state_t *s, int
 /*- End of function --------------------------------------------------------*/
 
 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)
+                                                            t38_gateway_real_time_frame_handler_t *handler,
+                                                            void *user_data)
 {
     s->core.real_time_frame_handler = handler;
     s->core.real_time_frame_user_data = user_data;
@@ -2190,8 +2190,8 @@ static int t38_gateway_audio_init(t38_gateway_state_t *s)
 /*- End of function --------------------------------------------------------*/
 
 static int t38_gateway_t38_init(t38_gateway_state_t *t,
-                                t38_tx_packet_handler_t *tx_packet_handler,
-                                void *tx_packet_user_data)
+                                 t38_tx_packet_handler_t *tx_packet_handler,
+                                 void *tx_packet_user_data)
 {
     t38_gateway_t38_state_t *s;
 
@@ -2211,8 +2211,8 @@ static int t38_gateway_t38_init(t38_gateway_state_t *t,
 /*- End of function --------------------------------------------------------*/
 
 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)
+                                                     t38_tx_packet_handler_t *tx_packet_handler,
+                                                     void *tx_packet_user_data)
 {
     if (tx_packet_handler == NULL)
         return NULL;
index 09fa46e3201721f8f0ed2ccecd2c3c8f87fb373f..fe09d9e572155234d2e9030dae0628100bd3dcd5 100644 (file)
@@ -23,7 +23,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t38_non_ecm_buffer.c,v 1.5 2009/01/28 03:41:27 steveu Exp $
+ * $Id: t38_non_ecm_buffer.c,v 1.6 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
@@ -75,7 +75,7 @@ static void restart_buffer(t38_non_ecm_buffer_state_t *s)
 }
 /*- End of function --------------------------------------------------------*/
 
-int t38_non_ecm_buffer_get_bit(void *user_data)
+SPAN_DECLARE(int) t38_non_ecm_buffer_get_bit(void *user_data)
 {
     t38_non_ecm_buffer_state_t *s;
     int bit;
index 0814690bbcf3606b164bb5edddb971bc2ff911b5..60b6e93e023216ce7389ffe06c8dd5bcb782ac83 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t38_terminal.c,v 1.120 2009/01/29 01:41:06 steveu Exp $
+ * $Id: t38_terminal.c,v 1.122 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
@@ -585,24 +585,36 @@ static int stream_non_ecm(t38_terminal_state_t *s)
                 bit_reverse(buf, buf, len);
             if (len < fe->octets_per_data_packet)
             {
-                /* That's the end of the image data. Do a little padding now */
-                memset(buf + len, 0, fe->octets_per_data_packet - len);
-                fe->non_ecm_trailer_bytes = 3*fe->octets_per_data_packet + len;
-                len = fe->octets_per_data_packet;
-                fe->timed_step = T38_TIMED_STEP_NON_ECM_MODEM_4;
+                /* That's the end of the image data. */
+                if (s->t38_fe.ms_per_tx_chunk)
+                {
+                    /* Pad the end of the data with some zeros. If we just stop abruptly
+                       at the end of the EOLs, some ATAs fail to clean up properly before
+                       shutting down their transmit modem, and the last few rows of the image
+                       are lost or corrupted. Simply delaying the no-signal message does not
+                       help for all implentations. It is usually ignored, which is probably
+                       the right thing to do after receiving a message saying the signal has
+                       ended. */
+                    memset(buf + len, 0, fe->octets_per_data_packet - len);
+                    fe->non_ecm_trailer_bytes = 3*fe->octets_per_data_packet + len;
+                    len = fe->octets_per_data_packet;
+                    fe->timed_step = T38_TIMED_STEP_NON_ECM_MODEM_4;
+                }
+                else
+                {
+                    /* If we are sending quickly there seems no point in doing any padding */
+                    t38_core_send_data(&fe->t38, fe->current_tx_data_type, T38_FIELD_T4_NON_ECM_SIG_END, buf, len, fe->t38.data_end_tx_count);
+                    fe->timed_step = T38_TIMED_STEP_NON_ECM_MODEM_5;
+                    delay = 0;
+                }
             }
             t38_core_send_data(&fe->t38, fe->current_tx_data_type, T38_FIELD_T4_NON_ECM_DATA, buf, len, fe->t38.data_tx_count);
             delay = bits_to_us(s, 8*len);
             break;
         case T38_TIMED_STEP_NON_ECM_MODEM_4:
-            /* This pads the end of the data with some zeros. If we just stop abruptly
-               at the end of the EOLs, some ATAs fail to clean up properly before
-               shutting down their transmit modem, and the last few rows of the image
-               are corrupted. Simply delaying the no-signal message does not help for
-               all implentations. It is usually ignored, which is probably the right
-               thing to do after receiving a message saying the signal has ended. */
+            /* Send padding */
             len = fe->octets_per_data_packet;
-            fe->non_ecm_trailer_bytes -= len;
+            fe->non_ecm_trailer_bytes -= fe->octets_per_data_packet;
             if (fe->non_ecm_trailer_bytes <= 0)
             {
                 len += fe->non_ecm_trailer_bytes;
@@ -611,7 +623,9 @@ static int stream_non_ecm(t38_terminal_state_t *s)
                 fe->timed_step = T38_TIMED_STEP_NON_ECM_MODEM_5;
                 /* Allow a bit more time than the data will take to play out, to ensure the far ATA does not
                    cut things short. */
-                delay = bits_to_us(s, 8*len) + 60000;
+                delay = bits_to_us(s, 8*len);
+                if (s->t38_fe.ms_per_tx_chunk)
+                    delay += 60000;
                 front_end_status(s, T30_FRONT_END_SEND_STEP_COMPLETE);
                 break;
             }
@@ -687,7 +701,9 @@ static int stream_hdlc(t38_terminal_state_t *s)
                         fe->timed_step = T38_TIMED_STEP_HDLC_MODEM_5;
                         /* We add a bit of extra time here, as with some implementations
                            the carrier falling too abruptly causes data loss. */
-                        delay = bits_to_us(s, i*8 + fe->hdlc_tx.extra_bits) + 100000;
+                        delay = bits_to_us(s, i*8 + fe->hdlc_tx.extra_bits);
+                        if (s->t38_fe.ms_per_tx_chunk)
+                            delay += 100000;
                         front_end_status(s, T30_FRONT_END_SEND_STEP_COMPLETE);
                     }
                     else
@@ -726,7 +742,9 @@ static int stream_hdlc(t38_terminal_state_t *s)
                 fe->timed_step = T38_TIMED_STEP_HDLC_MODEM_5;
                 /* We add a bit of extra time here, as with some implementations
                    the carrier falling too abruptly causes data loss. */
-                delay = bits_to_us(s, fe->hdlc_tx.extra_bits) + 100000;
+                delay = bits_to_us(s, fe->hdlc_tx.extra_bits);
+                if (s->t38_fe.ms_per_tx_chunk)
+                    delay += 100000;
                 front_end_status(s, T30_FRONT_END_SEND_STEP_COMPLETE);
                 break;
             }
@@ -1097,9 +1115,9 @@ SPAN_DECLARE(logging_state_t *) t38_terminal_get_logging_state(t38_terminal_stat
 /*- End of function --------------------------------------------------------*/
 
 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)
+                                                       int calling_party,
+                                                       t38_tx_packet_handler_t *tx_packet_handler,
+                                                       void *tx_packet_user_data)
 {
     if (tx_packet_handler == NULL)
         return NULL;
index c39d6b2e9c4f677ac0385ef5464b1d73abe61e2d..b9198b6e2fe123b73d64f359c32a54d7dda99882 100644 (file)
@@ -24,7 +24,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t4.c,v 1.120 2009/01/31 08:48:10 steveu Exp $
+ * $Id: t4.c,v 1.121 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*
index a4eee53235609ef0dc3b9e8c60d685ecdbf75f6e..e968f95badf5d19537707d23e5656af5d929d3a8 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: time_scale.c,v 1.28 2009/01/29 01:41:06 steveu Exp $
+ * $Id: time_scale.c,v 1.29 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
@@ -47,6 +47,7 @@
 #include "floating_fudge.h"
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/time_scale.h"
 #include "spandsp/saturated.h"
 
index 9ae8924bcc3d97e21c528ba3ff01d19249bf0913..db2141d7334e93f7809ff733db6892cfccee6294 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: tone_detect.c,v 1.49 2009/01/28 03:41:27 steveu Exp $
+ * $Id: tone_detect.c,v 1.50 2009/02/03 16:28:40 steveu Exp $
  */
  
 /*! \file tone_detect.h */
@@ -58,7 +58,7 @@
 #define M_PI 3.14159265358979323846264338327
 #endif
 
-void make_goertzel_descriptor(goertzel_descriptor_t *t, float freq, int samples)
+SPAN_DECLARE(void) make_goertzel_descriptor(goertzel_descriptor_t *t, float freq, int samples)
 {
 #if defined(SPANDSP_USE_FIXED_POINT)
     t->fac = 16383.0f*2.0f*cosf(2.0f*M_PI*(freq/(float) SAMPLE_RATE));
@@ -69,8 +69,8 @@ void make_goertzel_descriptor(goertzel_descriptor_t *t, float freq, int samples)
 }
 /*- End of function --------------------------------------------------------*/
 
-goertzel_state_t *goertzel_init(goertzel_state_t *s,
-                                goertzel_descriptor_t *t)
+SPAN_DECLARE(goertzel_state_t *) goertzel_init(goertzel_state_t *s,
+                                               goertzel_descriptor_t *t)
 {
     if (s == NULL)
     {
@@ -91,7 +91,7 @@ goertzel_state_t *goertzel_init(goertzel_state_t *s,
 }
 /*- End of function --------------------------------------------------------*/
 
-void goertzel_reset(goertzel_state_t *s)
+SPAN_DECLARE(void) goertzel_reset(goertzel_state_t *s)
 {
 #if defined(SPANDSP_USE_FIXED_POINT)
     s->v2 =
@@ -104,9 +104,9 @@ void goertzel_reset(goertzel_state_t *s)
 }
 /*- End of function --------------------------------------------------------*/
 
-int goertzel_update(goertzel_state_t *s,
-                    const int16_t amp[],
-                    int samples)
+SPAN_DECLARE(int) goertzel_update(goertzel_state_t *s,
+                                  const int16_t amp[],
+                                  int samples)
 {
     int i;
 #if defined(SPANDSP_USE_FIXED_POINT)
@@ -139,9 +139,9 @@ int goertzel_update(goertzel_state_t *s,
 /*- End of function --------------------------------------------------------*/
 
 #if defined(SPANDSP_USE_FIXED_POINT)
-int32_t goertzel_result(goertzel_state_t *s)
+SPAN_DECLARE(int32_t) goertzel_result(goertzel_state_t *s)
 #else
-float goertzel_result(goertzel_state_t *s)
+SPAN_DECLARE(float) goertzel_result(goertzel_state_t *s)
 #endif
 {
 #if defined(SPANDSP_USE_FIXED_POINT)
index 6d2f801f527ee20c0ed97ebcd2b80b93cbbe1296..d6e5658bda3b236ad1ebd4b3d571498dc4446776 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: tone_generate.c,v 1.48 2009/01/28 03:41:27 steveu Exp $
+ * $Id: tone_generate.c,v 1.49 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
@@ -46,6 +46,7 @@
 #include "floating_fudge.h"
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/dc_restore.h"
 #include "spandsp/complex.h"
 #include "spandsp/dds.h"
 #define ms_to_samples(t)            (((t)*SAMPLE_RATE)/1000)
 
 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)
+                                            int f1,
+                                            int l1,
+                                            int f2,
+                                            int l2,
+                                            int d1,
+                                            int d2,
+                                            int d3,
+                                            int d4,
+                                            int repeat)
 {
     memset(s, 0, sizeof(*s));
     if (f1)
@@ -170,7 +171,7 @@ SPAN_DECLARE(int) tone_gen(tone_gen_state_t *s, int16_t amp[], int max_samples)
 #else
                     xamp = dds_modf(&s->phase[0], -s->tone[0].phase_rate, s->tone[0].gain, 0)
                          *(1.0f + dds_modf(&s->phase[1], s->tone[1].phase_rate, s->tone[1].gain, 0));
-                    amp[samples] = (int16_t) lrintf(xamp);
+                    amp[samples] = (int16_t) lfastrintf(xamp);
 #endif
                 }
             }
@@ -200,7 +201,7 @@ SPAN_DECLARE(int) tone_gen(tone_gen_state_t *s, int16_t amp[], int max_samples)
 #if defined(SPANDSP_USE_FIXED_POINT)
                     amp[samples] = xamp;
 #else
-                    amp[samples] = (int16_t) lrintf(xamp);
+                    amp[samples] = (int16_t) lfastrintf(xamp);
 #endif
                 }
             }
index 826bf7f601b895debf321ee056f38598c1757df9..5b6602f1dfa510783875f946ca869a3d9915c51a 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v17rx.c,v 1.131 2009/01/30 10:22:23 steveu Exp $
+ * $Id: v17rx.c,v 1.132 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
index 6f9cef0b268fcb291afeb71227f59edf1b572cf6..84b1cd266f8b52f620b1a97ffa552f801e45e7af 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v17tx.c,v 1.69 2009/01/28 03:41:27 steveu Exp $
+ * $Id: v17tx.c,v 1.70 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
@@ -44,6 +44,7 @@
 #include "floating_fudge.h"
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/logging.h"
 #include "spandsp/complex.h"
 #include "spandsp/vector_float.h"
@@ -301,7 +302,7 @@ SPAN_DECLARE(int) v17_tx(v17_tx_state_t *s, int16_t amp[], int len)
         /* Now create and modulate the carrier */
         z = dds_complexf(&(s->carrier_phase), s->carrier_phase_rate);
         /* Don't bother saturating. We should never clip. */
-        amp[sample] = (int16_t) lrintf((x.re*z.re - x.im*z.im)*s->gain);
+        amp[sample] = (int16_t) lfastrintf((x.re*z.re - x.im*z.im)*s->gain);
 #endif
     }
     return sample;
index c8ed427de3001271ec87856048ebe96187d84b5e..57cf3d5a80afafbcb30f2f0d3973544cd4e11240 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v22bis_rx.c,v 1.46 2009/01/28 03:41:27 steveu Exp $
+ * $Id: v22bis_rx.c,v 1.47 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
index 6ce2ff45b235528ca80ab321c658159edfa41122..65a6ec2834de6121a2feec5016e71aba2f7ec3bd 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v22bis_tx.c,v 1.49 2009/01/28 03:41:27 steveu Exp $
+ * $Id: v22bis_tx.c,v 1.50 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
@@ -46,6 +46,7 @@
 #include "floating_fudge.h"
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/logging.h"
 #include "spandsp/complex.h"
 #include "spandsp/vector_float.h"
@@ -558,7 +559,7 @@ SPAN_DECLARE(int) v22bis_tx(v22bis_state_t *s, int16_t amp[], int len)
             famp += dds_modf(&(s->tx.guard_phase), s->tx.guard_phase_rate, s->tx.guard_level, 0);
         }
         /* Don't bother saturating. We should never clip. */
-        amp[sample] = (int16_t) lrintf(famp);
+        amp[sample] = (int16_t) lfastrintf(famp);
     }
     return sample;
 }
@@ -623,12 +624,12 @@ SPAN_DECLARE(int) v22bis_restart(v22bis_state_t *s, int bit_rate)
 /*- End of function --------------------------------------------------------*/
 
 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)
+                                           int bit_rate,
+                                           int guard,
+                                           int caller,
+                                           get_bit_func_t get_bit,
+                                           put_bit_func_t put_bit,
+                                           void *user_data)
 {
     if (s == NULL)
     {
index ca6b9d1517da6429f9eec6507aba1806ba9f50c2..760c2de934ed886b3b897e7a380e5fc336b099ab 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v27ter_rx.c,v 1.115 2009/01/30 10:22:23 steveu Exp $
+ * $Id: v27ter_rx.c,v 1.116 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
index ecf264f94c7bebbbea7cfc806415fb521ad50384..1c0c9c054ff653e0b0dffc0cb4fd3aabbff22964 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v27ter_tx.c,v 1.71 2009/01/28 03:41:27 steveu Exp $
+ * $Id: v27ter_tx.c,v 1.72 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
@@ -44,6 +44,7 @@
 #include "floating_fudge.h"
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/logging.h"
 #include "spandsp/complex.h"
 #include "spandsp/vector_float.h"
@@ -292,7 +293,7 @@ SPAN_DECLARE(int) v27ter_tx(v27ter_tx_state_t *s, int16_t amp[], int len)
             /* Now create and modulate the carrier */
             z = dds_complexf(&(s->carrier_phase), s->carrier_phase_rate);
             /* Don't bother saturating. We should never clip. */
-            amp[sample] = (int16_t) lrintf((x.re*z.re - x.im*z.im)*s->gain_4800);
+            amp[sample] = (int16_t) lfastrintf((x.re*z.re - x.im*z.im)*s->gain_4800);
 #endif
         }
     }
@@ -333,7 +334,7 @@ SPAN_DECLARE(int) v27ter_tx(v27ter_tx_state_t *s, int16_t amp[], int len)
             /* Now create and modulate the carrier */
             z = dds_complexf(&(s->carrier_phase), s->carrier_phase_rate);
             /* Don't bother saturating. We should never clip. */
-            amp[sample] = (int16_t) lrintf((x.re*z.re - x.im*z.im)*s->gain_2400);
+            amp[sample] = (int16_t) lfastrintf((x.re*z.re - x.im*z.im)*s->gain_2400);
 #endif
         }
     }
index 80d9ab307b00b1d26f297966d3eeedf782de0bce..cdd2f5e9a5a13f3cc7b21c63d6f50dc9d8fd0b8c 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v29rx.c,v 1.152 2009/01/30 10:22:23 steveu Exp $
+ * $Id: v29rx.c,v 1.153 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
index b7964fea6840ed36f4e2783cc9ada0d96c1c081f..573b2dfbd749dc6d0962f4afc1345e8d6adfd53d 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v29tx.c,v 1.84 2009/01/28 03:41:27 steveu Exp $
+ * $Id: v29tx.c,v 1.85 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
@@ -44,6 +44,7 @@
 #include "floating_fudge.h"
 
 #include "spandsp/telephony.h"
+#include "spandsp/fast_convert.h"
 #include "spandsp/logging.h"
 #include "spandsp/complex.h"
 #include "spandsp/vector_float.h"
@@ -245,7 +246,7 @@ SPAN_DECLARE(int) v29_tx(v29_tx_state_t *s, int16_t amp[], int len)
         /* Now create and modulate the carrier */
         z = dds_complexf(&(s->carrier_phase), s->carrier_phase_rate);
         /* Don't bother saturating. We should never clip. */
-        amp[sample] = (int16_t) lrintf((x.re*z.re - x.im*z.im)*s->gain);
+        amp[sample] = (int16_t) lfastrintf((x.re*z.re - x.im*z.im)*s->gain);
 #endif
     }
     return sample;
index c4384040aa908a7f885e3f90ec551818194d9bc1..a00e4faf474191208ec0d42688c2bb826c95d0a2 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v42.c,v 1.47 2009/01/05 13:48:32 steveu Exp $
+ * $Id: v42.c,v 1.48 2009/02/03 16:28:40 steveu Exp $
  */
 
 /* THIS IS A WORK IN PROGRESS. IT IS NOT FINISHED. */
@@ -89,8 +89,8 @@
 static void t401_expired(span_sched_state_t *s, void *user_data);
 static void t403_expired(span_sched_state_t *s, void *user_data);
 
-void lapm_reset(lapm_state_t *s);
-void lapm_restart(lapm_state_t *s);
+SPAN_DECLARE(void) lapm_reset(lapm_state_t *s);
+SPAN_DECLARE(void) lapm_restart(lapm_state_t *s);
 
 static void lapm_link_down(lapm_state_t *s);
 
@@ -667,7 +667,7 @@ static void lapm_link_down(lapm_state_t *s)
 }
 /*- End of function --------------------------------------------------------*/
 
-void lapm_reset(lapm_state_t *s)
+SPAN_DECLARE(void) lapm_reset(lapm_state_t *s)
 {
     lapm_frame_queue_t *f;
     lapm_frame_queue_t *p;
@@ -709,7 +709,7 @@ fprintf(stderr, "Deleting T403 e %d\n", s->t403_timer);
 }
 /*- End of function --------------------------------------------------------*/
 
-void lapm_receive(void *user_data, const uint8_t *frame, int len, int ok)
+SPAN_DECLARE(void) lapm_receive(void *user_data, const uint8_t *frame, int len, int ok)
 {
     lapm_state_t *s;
     lapm_frame_queue_t *f;
@@ -1068,7 +1068,7 @@ static void lapm_hdlc_underflow(void *user_data)
 }
 /*- End of function --------------------------------------------------------*/
 
-void lapm_restart(lapm_state_t *s)
+SPAN_DECLARE(void) lapm_restart(lapm_state_t *s)
 {
 #if 0
     if (s->state != LAPM_RELEASE)
index 5c3c53c82c6d793b24c8c0bca728e3bd65af176d..cc07c8d79194328177714405f899ddc7ea702acf 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v42bis.c,v 1.35 2009/01/05 13:48:32 steveu Exp $
+ * $Id: v42bis.c,v 1.36 2009/02/03 16:28:40 steveu Exp $
  */
 
 /* THIS IS A WORK IN PROGRESS. IT IS NOT FINISHED. 
@@ -353,7 +353,7 @@ SPAN_DECLARE(int) v42bis_compress_flush(v42bis_state_t *s)
 /*- End of function --------------------------------------------------------*/
 
 #if 0
-int v42bis_compress_dump(v42bis_state_t *s)
+SPAN_DECLARE(int) v42bis_compress_dump(v42bis_state_t *s)
 {
     int i;
     
@@ -583,7 +583,7 @@ SPAN_DECLARE(int) v42bis_decompress_flush(v42bis_state_t *s)
 /*- End of function --------------------------------------------------------*/
 
 #if 0
-int v42bis_decompress_dump(v42bis_state_t *s)
+SPAN_DECLARE(int) v42bis_decompress_dump(v42bis_state_t *s)
 {
     int i;
     
@@ -615,15 +615,15 @@ SPAN_DECLARE(void) v42bis_compression_control(v42bis_state_t *s, int mode)
 /*- End of function --------------------------------------------------------*/
 
 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)
+                                           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)
 {
     int i;
 
index 7aa30ec8eb0b8510b5d336e484bd089e339bba80..52ad70b900f8f8838b58ea9f94b08ece36b60be1 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: v8.c,v 1.37 2009/01/28 03:41:27 steveu Exp $
+ * $Id: v8.c,v 1.38 2009/02/03 16:28:40 steveu Exp $
  */
  
 /*! \file */
@@ -857,10 +857,10 @@ SPAN_DECLARE(logging_state_t *) v8_get_logging_state(v8_state_t *s)
 /*- End of function --------------------------------------------------------*/
 
 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)
+                                   int caller,
+                                   int available_modulations,
+                                   v8_result_handler_t *result_handler,
+                                   void *user_data)
 {
     if (s == NULL)
     {
index 8b189cf78c9dd6adddb1a698bfb14dcf666a2e80..2fcf9597ab0dd29f68960ee454e9827a5e5eead1 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: vector_float.c,v 1.19 2009/01/28 03:41:27 steveu Exp $
+ * $Id: vector_float.c,v 1.20 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
@@ -118,7 +118,7 @@ SPAN_DECLARE(void) vec_copy(double z[], const double x[], int n)
 /*- End of function --------------------------------------------------------*/
 
 #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)
 {
     int i;
     
@@ -178,7 +178,7 @@ SPAN_DECLARE(void) vec_negate(double z[], const double x[], int n)
 /*- End of function --------------------------------------------------------*/
 
 #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)
 {
     int i;
     
@@ -232,7 +232,7 @@ SPAN_DECLARE(void) vec_zero(double z[], int n)
 /*- End of function --------------------------------------------------------*/
 
 #if defined(HAVE_LONG_DOUBLE)
-void vec_zerol(long double z[], int n)
+SPAN_DECLARE(void) vec_zerol(long double z[], int n)
 {
     int i;
     
@@ -286,7 +286,7 @@ SPAN_DECLARE(void) vec_set(double z[], double x, int n)
 /*- End of function --------------------------------------------------------*/
 
 #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)
 {
     int i;
     
@@ -344,7 +344,8 @@ SPAN_DECLARE(void) vec_add(double z[], const double x[], const double y[], int n
 }
 /*- End of function --------------------------------------------------------*/
 
-void vec_addl(long double z[], const long double x[], const long double y[], int n)
+#if defined(HAVE_LONG_DOUBLE)
+SPAN_DECLARE(void) vec_addl(long double z[], const long double x[], const long double y[], int n)
 {
     int i;
 
@@ -352,6 +353,7 @@ void vec_addl(long double z[], const long double x[], const long double y[], int
         z[i] = x[i] + y[i];
 }
 /*- End of function --------------------------------------------------------*/
+#endif
 
 #if defined(__GNUC__)  &&  defined(SPANDSP_USE_SSE2)
 SPAN_DECLARE(void) vec_scaledxy_addf(float z[], const float x[], float x_scale, const float y[], float y_scale, int n)
@@ -408,7 +410,7 @@ SPAN_DECLARE(void) vec_scaledxy_add(double z[], const double x[], double x_scale
 /*- End of function --------------------------------------------------------*/
 
 #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)
 {
     int i;
 
@@ -470,7 +472,7 @@ SPAN_DECLARE(void) vec_scaledy_add(double z[], const double x[], const double y[
 /*- End of function --------------------------------------------------------*/
 
 #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)
 {
     int i;
 
@@ -529,7 +531,7 @@ SPAN_DECLARE(void) vec_sub(double z[], const double x[], const double y[], int n
 /*- End of function --------------------------------------------------------*/
 
 #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)
 {
     int i;
 
@@ -558,7 +560,7 @@ SPAN_DECLARE(void) vec_scaledxy_sub(double z[], const double x[], double x_scale
 /*- End of function --------------------------------------------------------*/
 
 #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)
 {
     int i;
 
@@ -665,7 +667,7 @@ SPAN_DECLARE(void) vec_scalar_add(double z[], const double x[], double y, int n)
 /*- End of function --------------------------------------------------------*/
 
 #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)
 {
     int i;
 
@@ -724,7 +726,7 @@ SPAN_DECLARE(void) vec_scalar_sub(double z[], const double x[], double y, int n)
 /*- End of function --------------------------------------------------------*/
 
 #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)
 {
     int i;
 
@@ -784,7 +786,7 @@ SPAN_DECLARE(void) vec_mul(double z[], const double x[], const double y[], int n
 /*- End of function --------------------------------------------------------*/
 
 #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)
 {
     int i;
 
@@ -858,7 +860,7 @@ SPAN_DECLARE(double) vec_dot_prod(const double x[], const double y[], int n)
 /*- End of function --------------------------------------------------------*/
 
 #if defined(HAVE_LONG_DOUBLE)
-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)
 {
     int i;
     long double z;
index b082f549aeac4aedab93decf59a8da1a7881a609..09e057a6f3b5f28d1d65ae8686bcc5adac0af115 100644 (file)
@@ -22,7 +22,7 @@
  * License along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: vector_int.c,v 1.23 2009/01/28 03:41:27 steveu Exp $
+ * $Id: vector_int.c,v 1.24 2009/02/03 16:28:40 steveu Exp $
  */
 
 /*! \file */
index 64b7cae0547adda8c704435f37b0a18a83d5a115..099a5254d59ad389f1d32034094a64631a60b208 100644 (file)
@@ -22,7 +22,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: t31_tests.c,v 1.69 2009/01/23 16:07:14 steveu Exp $
+ * $Id: t31_tests.c,v 1.70 2009/02/02 13:05:28 steveu Exp $
  */
 
 /*! \file */
@@ -106,7 +106,8 @@ static const struct command_response_s fax_send_test_seq[] =
     RESPONSE("\r\nOK\r\n"),
     EXCHANGE("AT+FRH=3\r", "\r\nCONNECT\r\n"),
     //<DIS frame data>
-    RESPONSE("\xFF\x13\x80\x00\xEE\xF8\x80\x80\x91\x80\x80\x80\x18\x78\x57\x10\x03"),
+    RESPONSE("\xFF\x13\x80\x00\xEE\xF8\x80\x80\x91\x80\x80\x80\x18\x78\x57\x10\x03"), // For audio FAXing
+    //RESPONSE("\xFF\x13\x80\x04\xEE\xF8\x80\x80\x91\x80\x80\x80\x18\xE4\xE7\x10\x03"),   // For T.38 FAXing
     RESPONSE("\r\nOK\r\n"),
     //EXCHANGE("AT+FRH=3\r", "\r\nNO CARRIER\r\n"),
     EXCHANGE("AT+FTH=3\r", "\r\nCONNECT\r\n"),