Freeswitch-svn
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- 12151 discussions
03 Feb '09
Author: mikej
Date: Tue Feb 3 12:55:31 2009
New Revision: 11613
Log:
fix windows build
Modified:
freeswitch/trunk/libs/spandsp/src/async.c
freeswitch/trunk/libs/spandsp/src/silence_gen.c
freeswitch/trunk/libs/spandsp/src/spandsp/async.h
freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_float.h
freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h
freeswitch/trunk/libs/spandsp/src/spandsp/t30.h
freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h
freeswitch/trunk/libs/spandsp/src/spandsp/v42.h
freeswitch/trunk/libs/spandsp/src/t30.c
freeswitch/trunk/libs/spandsp/src/t38_non_ecm_buffer.c
freeswitch/trunk/libs/spandsp/src/v42.c
Modified: freeswitch/trunk/libs/spandsp/src/async.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/async.c (original)
+++ freeswitch/trunk/libs/spandsp/src/async.c Tue Feb 3 12:55:31 2009
@@ -103,7 +103,7 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(void) async_rx_put_bit(void *user_data, int bit)
+SPAN_DECLARE_NONSTD(void) async_rx_put_bit(void *user_data, int bit)
{
async_rx_state_t *s;
@@ -216,7 +216,7 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(int) async_tx_get_bit(void *user_data)
+SPAN_DECLARE_NONSTD(int) async_tx_get_bit(void *user_data)
{
async_tx_state_t *s;
int bit;
Modified: freeswitch/trunk/libs/spandsp/src/silence_gen.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/silence_gen.c (original)
+++ freeswitch/trunk/libs/spandsp/src/silence_gen.c Tue Feb 3 12:55:31 2009
@@ -131,7 +131,7 @@
/* The following dummy routines, to absorb data, don't really have a proper home,
so they have been put here. */
-SPAN_DECLARE(int) span_dummy_rx(void *user_data, const int16_t amp[], int len)
+SPAN_DECLARE_NONSTD(int) span_dummy_rx(void *user_data, const int16_t amp[], int len)
{
return 0;
}
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/async.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/async.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/async.h Tue Feb 3 12:55:31 2009
@@ -162,7 +162,7 @@
\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. */
-SPAN_DECLARE(int) async_tx_get_bit(void *user_data);
+SPAN_DECLARE_NONSTD(int) async_tx_get_bit(void *user_data);
/*! Initialise an asynchronous data receiver context.
\brief Initialise an asynchronous data receiver context.
@@ -191,7 +191,7 @@
- SIG_STATUS_TRAINING_SUCCEEDED
- SIG_STATUS_TRAINING_FAILED
- SIG_STATUS_END_OF_DATA */
-SPAN_DECLARE(void) async_rx_put_bit(void *user_data, int bit);
+SPAN_DECLARE_NONSTD(void) async_rx_put_bit(void *user_data, int bit);
#if defined(__cplusplus)
}
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_float.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_float.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_float.h Tue Feb 3 12:55:31 2009
@@ -125,7 +125,7 @@
SPAN_DECLARE(void) cvec_mul(complex_t z[], const complex_t x[], const complex_t y[], int n);
#if defined(HAVE_LONG_DOUBLE)
-void cvec_mull(complexl_t z[], const complexl_t x[], const complexl_t y[], int n);
+SPAN_DECLARE(void) cvec_mull(complexl_t z[], const complexl_t x[], const complexl_t y[], int n);
#endif
/*! \brief Find the dot product of two complex float vectors.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h Tue Feb 3 12:55:31 2009
@@ -117,7 +117,7 @@
\param len The length of the signal buffer
\return 0.
*/
-SPAN_DECLARE(int) span_dummy_rx(void *user_data, const int16_t amp[], int len);
+SPAN_DECLARE_NONSTD(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
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t30.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t30.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t30.h Tue Feb 3 12:55:31 2009
@@ -607,7 +607,7 @@
\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. */
-SPAN_DECLARE(int) t30_non_ecm_get_bit(void *user_data);
+SPAN_DECLARE_NONSTD(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 @@
\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. */
-SPAN_DECLARE(void) t30_non_ecm_put_bit(void *user_data, int bit);
+SPAN_DECLARE_NONSTD(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 @@
\param msg The HDLC message.
\param len The length of the message, in octets.
\param ok TRUE if the frame was received without error. */
-SPAN_DECLARE(void) t30_hdlc_accept(void *user_data, const uint8_t *msg, int len, int ok);
+SPAN_DECLARE_NONSTD(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.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h Tue Feb 3 12:55:31 2009
@@ -93,7 +93,7 @@
/*! \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. */
-SPAN_DECLARE(int) t38_non_ecm_buffer_get_bit(void *user_data);
+SPAN_DECLARE_NONSTD(int) t38_non_ecm_buffer_get_bit(void *user_data);
#if defined(__cplusplus)
}
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v42.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v42.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v42.h Tue Feb 3 12:55:31 2009
@@ -94,7 +94,7 @@
/*! Accept an HDLC packet
*/
-SPAN_DECLARE(void) lapm_receive(void *user_data, const uint8_t *buf, int len, int ok);
+SPAN_DECLARE_NONSTD(void) lapm_receive(void *user_data, const uint8_t *buf, int len, int ok);
/*! Transmit a LAP.M frame
*/
Modified: freeswitch/trunk/libs/spandsp/src/t30.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t30.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t30.c Tue Feb 3 12:55:31 2009
@@ -4986,7 +4986,7 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(void) t30_non_ecm_put_bit(void *user_data, int bit)
+SPAN_DECLARE_NONSTD(void) t30_non_ecm_put_bit(void *user_data, int bit)
{
t30_state_t *s;
@@ -5102,7 +5102,7 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(int) t30_non_ecm_get_bit(void *user_data)
+SPAN_DECLARE_NONSTD(int) t30_non_ecm_get_bit(void *user_data)
{
int bit;
t30_state_t *s;
@@ -5302,7 +5302,7 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(void) t30_hdlc_accept(void *user_data, const uint8_t *msg, int len, int ok)
+SPAN_DECLARE_NONSTD(void) t30_hdlc_accept(void *user_data, const uint8_t *msg, int len, int ok)
{
t30_state_t *s;
Modified: freeswitch/trunk/libs/spandsp/src/t38_non_ecm_buffer.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t38_non_ecm_buffer.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t38_non_ecm_buffer.c Tue Feb 3 12:55:31 2009
@@ -75,7 +75,7 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(int) t38_non_ecm_buffer_get_bit(void *user_data)
+SPAN_DECLARE_NONSTD(int) t38_non_ecm_buffer_get_bit(void *user_data)
{
t38_non_ecm_buffer_state_t *s;
int bit;
Modified: freeswitch/trunk/libs/spandsp/src/v42.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v42.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v42.c Tue Feb 3 12:55:31 2009
@@ -709,7 +709,7 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(void) lapm_receive(void *user_data, const uint8_t *frame, int len, int ok)
+SPAN_DECLARE_NONSTD(void) lapm_receive(void *user_data, const uint8_t *frame, int len, int ok)
{
lapm_state_t *s;
lapm_frame_queue_t *f;
1
0
[commit] r11612 - in freeswitch/trunk/libs/spandsp: spandsp-sim src src/msvc src/spandsp tests
by FreeSWITCH SVN 03 Feb '09
by FreeSWITCH SVN 03 Feb '09
03 Feb '09
Author: mikej
Date: Tue Feb 3 12:50:18 2009
New Revision: 11612
Log:
update to snapshot spandsp-20090204
Added:
freeswitch/trunk/libs/spandsp/src/spandsp/fast_convert.h
Modified:
freeswitch/trunk/libs/spandsp/spandsp-sim/g1050.c
freeswitch/trunk/libs/spandsp/spandsp-sim/line_model.c
freeswitch/trunk/libs/spandsp/spandsp-sim/make_line_models.c
freeswitch/trunk/libs/spandsp/spandsp-sim/rfc2198_sim.c
freeswitch/trunk/libs/spandsp/spandsp-sim/test_utils.c
freeswitch/trunk/libs/spandsp/src/Makefile.am
freeswitch/trunk/libs/spandsp/src/adsi.c
freeswitch/trunk/libs/spandsp/src/async.c
freeswitch/trunk/libs/spandsp/src/at_interpreter.c
freeswitch/trunk/libs/spandsp/src/awgn.c
freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c
freeswitch/trunk/libs/spandsp/src/bert.c
freeswitch/trunk/libs/spandsp/src/bit_operations.c
freeswitch/trunk/libs/spandsp/src/bitstream.c
freeswitch/trunk/libs/spandsp/src/complex_filters.c
freeswitch/trunk/libs/spandsp/src/complex_vector_float.c
freeswitch/trunk/libs/spandsp/src/complex_vector_int.c
freeswitch/trunk/libs/spandsp/src/crc.c
freeswitch/trunk/libs/spandsp/src/dds_float.c
freeswitch/trunk/libs/spandsp/src/dds_int.c
freeswitch/trunk/libs/spandsp/src/dtmf.c
freeswitch/trunk/libs/spandsp/src/echo.c
freeswitch/trunk/libs/spandsp/src/fax.c
freeswitch/trunk/libs/spandsp/src/floating_fudge.h
freeswitch/trunk/libs/spandsp/src/fsk.c
freeswitch/trunk/libs/spandsp/src/g711.c
freeswitch/trunk/libs/spandsp/src/g722.c
freeswitch/trunk/libs/spandsp/src/g726.c
freeswitch/trunk/libs/spandsp/src/gsm0610_decode.c
freeswitch/trunk/libs/spandsp/src/gsm0610_encode.c
freeswitch/trunk/libs/spandsp/src/gsm0610_long_term.c
freeswitch/trunk/libs/spandsp/src/gsm0610_lpc.c
freeswitch/trunk/libs/spandsp/src/gsm0610_preprocess.c
freeswitch/trunk/libs/spandsp/src/gsm0610_rpe.c
freeswitch/trunk/libs/spandsp/src/gsm0610_short_term.c
freeswitch/trunk/libs/spandsp/src/hdlc.c
freeswitch/trunk/libs/spandsp/src/ima_adpcm.c
freeswitch/trunk/libs/spandsp/src/libspandsp.dsp
freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj
freeswitch/trunk/libs/spandsp/src/logging.c
freeswitch/trunk/libs/spandsp/src/lpc10_decode.c
freeswitch/trunk/libs/spandsp/src/lpc10_encode.c
freeswitch/trunk/libs/spandsp/src/lpc10_voicing.c
freeswitch/trunk/libs/spandsp/src/modem_connect_tones.c
freeswitch/trunk/libs/spandsp/src/modem_echo.c
freeswitch/trunk/libs/spandsp/src/msvc/config.h
freeswitch/trunk/libs/spandsp/src/msvc/spandsp.h
freeswitch/trunk/libs/spandsp/src/noise.c
freeswitch/trunk/libs/spandsp/src/oki_adpcm.c
freeswitch/trunk/libs/spandsp/src/playout.c
freeswitch/trunk/libs/spandsp/src/plc.c
freeswitch/trunk/libs/spandsp/src/power_meter.c
freeswitch/trunk/libs/spandsp/src/queue.c
freeswitch/trunk/libs/spandsp/src/schedule.c
freeswitch/trunk/libs/spandsp/src/sig_tone.c
freeswitch/trunk/libs/spandsp/src/silence_gen.c
freeswitch/trunk/libs/spandsp/src/spandsp.h.in
freeswitch/trunk/libs/spandsp/src/spandsp/adsi.h
freeswitch/trunk/libs/spandsp/src/spandsp/async.h
freeswitch/trunk/libs/spandsp/src/spandsp/at_interpreter.h
freeswitch/trunk/libs/spandsp/src/spandsp/awgn.h
freeswitch/trunk/libs/spandsp/src/spandsp/bell_r2_mf.h
freeswitch/trunk/libs/spandsp/src/spandsp/bert.h
freeswitch/trunk/libs/spandsp/src/spandsp/bitstream.h
freeswitch/trunk/libs/spandsp/src/spandsp/complex_filters.h
freeswitch/trunk/libs/spandsp/src/spandsp/dtmf.h
freeswitch/trunk/libs/spandsp/src/spandsp/echo.h
freeswitch/trunk/libs/spandsp/src/spandsp/fax.h
freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h
freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h
freeswitch/trunk/libs/spandsp/src/spandsp/g711.h
freeswitch/trunk/libs/spandsp/src/spandsp/g722.h
freeswitch/trunk/libs/spandsp/src/spandsp/g726.h
freeswitch/trunk/libs/spandsp/src/spandsp/gsm0610.h
freeswitch/trunk/libs/spandsp/src/spandsp/hdlc.h
freeswitch/trunk/libs/spandsp/src/spandsp/ima_adpcm.h
freeswitch/trunk/libs/spandsp/src/spandsp/lpc10.h
freeswitch/trunk/libs/spandsp/src/spandsp/modem_connect_tones.h
freeswitch/trunk/libs/spandsp/src/spandsp/modem_echo.h
freeswitch/trunk/libs/spandsp/src/spandsp/noise.h
freeswitch/trunk/libs/spandsp/src/spandsp/oki_adpcm.h
freeswitch/trunk/libs/spandsp/src/spandsp/playout.h
freeswitch/trunk/libs/spandsp/src/spandsp/plc.h
freeswitch/trunk/libs/spandsp/src/spandsp/power_meter.h
freeswitch/trunk/libs/spandsp/src/spandsp/queue.h
freeswitch/trunk/libs/spandsp/src/spandsp/saturated.h
freeswitch/trunk/libs/spandsp/src/spandsp/schedule.h
freeswitch/trunk/libs/spandsp/src/spandsp/sig_tone.h
freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h
freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_rx.h
freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_tx.h
freeswitch/trunk/libs/spandsp/src/spandsp/t30.h
freeswitch/trunk/libs/spandsp/src/spandsp/t30_api.h
freeswitch/trunk/libs/spandsp/src/spandsp/t30_logging.h
freeswitch/trunk/libs/spandsp/src/spandsp/t31.h
freeswitch/trunk/libs/spandsp/src/spandsp/t38_core.h
freeswitch/trunk/libs/spandsp/src/spandsp/t38_gateway.h
freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h
freeswitch/trunk/libs/spandsp/src/spandsp/t38_terminal.h
freeswitch/trunk/libs/spandsp/src/spandsp/t4.h
freeswitch/trunk/libs/spandsp/src/spandsp/telephony.h
freeswitch/trunk/libs/spandsp/src/spandsp/time_scale.h
freeswitch/trunk/libs/spandsp/src/spandsp/tone_detect.h
freeswitch/trunk/libs/spandsp/src/spandsp/tone_generate.h
freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h
freeswitch/trunk/libs/spandsp/src/spandsp/v17tx.h
freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h
freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h
freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_tx.h
freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h
freeswitch/trunk/libs/spandsp/src/spandsp/v29tx.h
freeswitch/trunk/libs/spandsp/src/spandsp/v42.h
freeswitch/trunk/libs/spandsp/src/spandsp/v42bis.h
freeswitch/trunk/libs/spandsp/src/spandsp/v8.h
freeswitch/trunk/libs/spandsp/src/spandsp/version.h
freeswitch/trunk/libs/spandsp/src/super_tone_rx.c
freeswitch/trunk/libs/spandsp/src/super_tone_tx.c
freeswitch/trunk/libs/spandsp/src/t30.c
freeswitch/trunk/libs/spandsp/src/t30_api.c
freeswitch/trunk/libs/spandsp/src/t30_logging.c
freeswitch/trunk/libs/spandsp/src/t31.c
freeswitch/trunk/libs/spandsp/src/t35.c
freeswitch/trunk/libs/spandsp/src/t38_core.c
freeswitch/trunk/libs/spandsp/src/t38_gateway.c
freeswitch/trunk/libs/spandsp/src/t38_non_ecm_buffer.c
freeswitch/trunk/libs/spandsp/src/t38_terminal.c
freeswitch/trunk/libs/spandsp/src/t4.c
freeswitch/trunk/libs/spandsp/src/time_scale.c
freeswitch/trunk/libs/spandsp/src/tone_detect.c
freeswitch/trunk/libs/spandsp/src/tone_generate.c
freeswitch/trunk/libs/spandsp/src/v17rx.c
freeswitch/trunk/libs/spandsp/src/v17tx.c
freeswitch/trunk/libs/spandsp/src/v22bis_rx.c
freeswitch/trunk/libs/spandsp/src/v22bis_tx.c
freeswitch/trunk/libs/spandsp/src/v27ter_rx.c
freeswitch/trunk/libs/spandsp/src/v27ter_tx.c
freeswitch/trunk/libs/spandsp/src/v29rx.c
freeswitch/trunk/libs/spandsp/src/v29tx.c
freeswitch/trunk/libs/spandsp/src/v42.c
freeswitch/trunk/libs/spandsp/src/v42bis.c
freeswitch/trunk/libs/spandsp/src/v8.c
freeswitch/trunk/libs/spandsp/src/vector_float.c
freeswitch/trunk/libs/spandsp/src/vector_int.c
freeswitch/trunk/libs/spandsp/tests/t31_tests.c
Modified: freeswitch/trunk/libs/spandsp/spandsp-sim/g1050.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/spandsp-sim/g1050.c (original)
+++ freeswitch/trunk/libs/spandsp/spandsp-sim/g1050.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: g1050.c,v 1.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"
Modified: freeswitch/trunk/libs/spandsp/spandsp-sim/line_model.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/spandsp-sim/line_model.c (original)
+++ freeswitch/trunk/libs/spandsp/spandsp-sim/line_model.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: 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"
Modified: freeswitch/trunk/libs/spandsp/spandsp-sim/make_line_models.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/spandsp-sim/make_line_models.c (original)
+++ freeswitch/trunk/libs/spandsp/spandsp-sim/make_line_models.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: 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
@@ -41,18 +41,18 @@
#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"
Modified: freeswitch/trunk/libs/spandsp/spandsp-sim/rfc2198_sim.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/spandsp-sim/rfc2198_sim.c (original)
+++ freeswitch/trunk/libs/spandsp/spandsp-sim/rfc2198_sim.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: 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"
Modified: freeswitch/trunk/libs/spandsp/spandsp-sim/test_utils.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/spandsp-sim/test_utils.c (original)
+++ freeswitch/trunk/libs/spandsp/spandsp-sim/test_utils.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: test_utils.c,v 1.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 */
@@ -35,13 +35,13 @@
#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>
Modified: freeswitch/trunk/libs/spandsp/src/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/Makefile.am (original)
+++ freeswitch/trunk/libs/spandsp/src/Makefile.am Tue Feb 3 12:50:18 2009
@@ -16,7 +16,7 @@
## License along with this program; if not, write to the Free Software
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
-## $Id: Makefile.am,v 1.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 @@
spandsp/dds.h \
spandsp/dtmf.h \
spandsp/echo.h \
+ spandsp/fast_convert.h \
spandsp/fax.h \
spandsp/fax_modems.h \
spandsp/fir.h \
Modified: freeswitch/trunk/libs/spandsp/src/adsi.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/adsi.c (original)
+++ freeswitch/trunk/libs/spandsp/src/adsi.c Tue Feb 3 12:50:18 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: 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 @@
/*- 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 @@
/*- 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)
{
Modified: freeswitch/trunk/libs/spandsp/src/async.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/async.c (original)
+++ freeswitch/trunk/libs/spandsp/src/async.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: async.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 @@
/*- 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 @@
}
/*- 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 @@
/*- 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 @@
}
/*- 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;
Modified: freeswitch/trunk/libs/spandsp/src/at_interpreter.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/at_interpreter.c (original)
+++ freeswitch/trunk/libs/spandsp/src/at_interpreter.c Tue Feb 3 12:50:18 2009
@@ -25,7 +25,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: 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 @@
/*- 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)
{
Modified: freeswitch/trunk/libs/spandsp/src/awgn.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/awgn.c (original)
+++ freeswitch/trunk/libs/spandsp/src/awgn.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: awgn.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"
Modified: freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c (original)
+++ freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: bell_r2_mf.c,v 1.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 @@
/*- 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 @@
/*- 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;
Modified: freeswitch/trunk/libs/spandsp/src/bert.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/bert.c (original)
+++ freeswitch/trunk/libs/spandsp/src/bert.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: bert.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)
Modified: freeswitch/trunk/libs/spandsp/src/bit_operations.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/bit_operations.c (original)
+++ freeswitch/trunk/libs/spandsp/src/bit_operations.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: bit_operations.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 @@
/*- 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);
Modified: freeswitch/trunk/libs/spandsp/src/bitstream.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/bitstream.c (original)
+++ freeswitch/trunk/libs/spandsp/src/bitstream.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: 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 @@
}
/*- 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 @@
}
/*- 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 @@
}
/*- 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 @@
}
/*- 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 @@
}
/*- 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 @@
}
/*- 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;
Modified: freeswitch/trunk/libs/spandsp/src/complex_filters.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/complex_filters.c (original)
+++ freeswitch/trunk/libs/spandsp/src/complex_filters.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: complex_filters.c,v 1.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 @@
}
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 @@
}
return cfi;
}
+/*- End of function --------------------------------------------------------*/
SPAN_DECLARE(void) cfilter_delete(cfilter_t *cfi)
{
@@ -94,6 +98,7 @@
filter_delete(cfi->imf);
}
}
+/*- End of function --------------------------------------------------------*/
SPAN_DECLARE(complexf_t) cfilter_step(cfilter_t *cfi, const complexf_t *z)
{
@@ -103,3 +108,5 @@
cc.im = filter_step(cfi->imf, z->im);
return cc;
}
+/*- End of function --------------------------------------------------------*/
+/*- End of file ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/complex_vector_float.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/complex_vector_float.c (original)
+++ freeswitch/trunk/libs/spandsp/src/complex_vector_float.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: complex_vector_float.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 @@
/*- 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 @@
/*- 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;
Modified: freeswitch/trunk/libs/spandsp/src/complex_vector_int.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/complex_vector_int.c (original)
+++ freeswitch/trunk/libs/spandsp/src/complex_vector_int.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: complex_vector_int.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 */
Modified: freeswitch/trunk/libs/spandsp/src/crc.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/crc.c (original)
+++ freeswitch/trunk/libs/spandsp/src/crc.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: crc.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 */
Modified: freeswitch/trunk/libs/spandsp/src/dds_float.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/dds_float.c (original)
+++ freeswitch/trunk/libs/spandsp/src/dds_float.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: dds_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 */
Modified: freeswitch/trunk/libs/spandsp/src/dds_int.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/dds_int.c (original)
+++ freeswitch/trunk/libs/spandsp/src/dds_int.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: dds_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 */
Modified: freeswitch/trunk/libs/spandsp/src/dtmf.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/dtmf.c (original)
+++ freeswitch/trunk/libs/spandsp/src/dtmf.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: dtmf.c,v 1.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 @@
/* 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 @@
/*- 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 @@
/*- 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 @@
/*- 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;
Modified: freeswitch/trunk/libs/spandsp/src/echo.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/echo.c (original)
+++ freeswitch/trunk/libs/spandsp/src/echo.c Tue Feb 3 12:50:18 2009
@@ -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"
Modified: freeswitch/trunk/libs/spandsp/src/fax.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/fax.c (original)
+++ freeswitch/trunk/libs/spandsp/src/fax.c Tue Feb 3 12:50:18 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: 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 */
Modified: freeswitch/trunk/libs/spandsp/src/floating_fudge.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/floating_fudge.h (original)
+++ freeswitch/trunk/libs/spandsp/src/floating_fudge.h Tue Feb 3 12:50:18 2009
@@ -25,7 +25,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: 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 @@
}
#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(a)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
Modified: freeswitch/trunk/libs/spandsp/src/fsk.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/fsk.c (original)
+++ freeswitch/trunk/libs/spandsp/src/fsk.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: fsk.c,v 1.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 @@
};
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 @@
/*- 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;
Modified: freeswitch/trunk/libs/spandsp/src/g711.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/g711.c (original)
+++ freeswitch/trunk/libs/spandsp/src/g711.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: g711.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 @@
/*- 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 @@
/*- 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 @@
/*- 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;
Modified: freeswitch/trunk/libs/spandsp/src/g722.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/g722.c (original)
+++ freeswitch/trunk/libs/spandsp/src/g722.c Tue Feb 3 12:50:18 2009
@@ -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"
Modified: freeswitch/trunk/libs/spandsp/src/g726.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/g726.c (original)
+++ freeswitch/trunk/libs/spandsp/src/g726.c Tue Feb 3 12:50:18 2009
@@ -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 @@
/*- 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 @@
/*- 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;
Modified: freeswitch/trunk/libs/spandsp/src/gsm0610_decode.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/gsm0610_decode.c (original)
+++ freeswitch/trunk/libs/spandsp/src/gsm0610_decode.c Tue Feb 3 12:50:18 2009
@@ -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"
Modified: freeswitch/trunk/libs/spandsp/src/gsm0610_encode.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/gsm0610_encode.c (original)
+++ freeswitch/trunk/libs/spandsp/src/gsm0610_encode.c Tue Feb 3 12:50:18 2009
@@ -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"
Modified: freeswitch/trunk/libs/spandsp/src/gsm0610_long_term.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/gsm0610_long_term.c (original)
+++ freeswitch/trunk/libs/spandsp/src/gsm0610_long_term.c Tue Feb 3 12:50:18 2009
@@ -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"
Modified: freeswitch/trunk/libs/spandsp/src/gsm0610_lpc.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/gsm0610_lpc.c (original)
+++ freeswitch/trunk/libs/spandsp/src/gsm0610_lpc.c Tue Feb 3 12:50:18 2009
@@ -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"
Modified: freeswitch/trunk/libs/spandsp/src/gsm0610_preprocess.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/gsm0610_preprocess.c (original)
+++ freeswitch/trunk/libs/spandsp/src/gsm0610_preprocess.c Tue Feb 3 12:50:18 2009
@@ -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"
Modified: freeswitch/trunk/libs/spandsp/src/gsm0610_rpe.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/gsm0610_rpe.c (original)
+++ freeswitch/trunk/libs/spandsp/src/gsm0610_rpe.c Tue Feb 3 12:50:18 2009
@@ -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"
Modified: freeswitch/trunk/libs/spandsp/src/gsm0610_short_term.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/gsm0610_short_term.c (original)
+++ freeswitch/trunk/libs/spandsp/src/gsm0610_short_term.c Tue Feb 3 12:50:18 2009
@@ -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"
Modified: freeswitch/trunk/libs/spandsp/src/hdlc.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/hdlc.c (original)
+++ freeswitch/trunk/libs/spandsp/src/hdlc.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: hdlc.c,v 1.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 @@
/*- 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 @@
/*- 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 @@
/*- 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)
{
Modified: freeswitch/trunk/libs/spandsp/src/ima_adpcm.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/ima_adpcm.c (original)
+++ freeswitch/trunk/libs/spandsp/src/ima_adpcm.c Tue Feb 3 12:50:18 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: 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 @@
/*- 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 @@
/*- 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;
Modified: freeswitch/trunk/libs/spandsp/src/libspandsp.dsp
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/libspandsp.dsp (original)
+++ freeswitch/trunk/libs/spandsp/src/libspandsp.dsp Tue Feb 3 12:50:18 2009
@@ -479,6 +479,10 @@
# End Source File
# Begin Source File
+SOURCE=.\spandsp/fast_convert.h
+# End Source File
+# Begin Source File
+
SOURCE=.\spandsp/fax.h
# End Source File
# Begin Source File
Modified: freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj (original)
+++ freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj Tue Feb 3 12:50:18 2009
@@ -178,822 +178,217 @@
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
- <File
- RelativePath="adsi.c"
- >
- </File>
- <File
- RelativePath="async.c"
- >
- </File>
- <File
- RelativePath="at_interpreter.c"
- >
- </File>
- <File
- RelativePath="awgn.c"
- >
- </File>
- <File
- RelativePath="bell_r2_mf.c"
- >
- </File>
- <File
- RelativePath="bert.c"
- >
- </File>
- <File
- RelativePath="bit_operations.c"
- >
- </File>
- <File
- RelativePath="bitstream.c"
- >
- </File>
- <File
- RelativePath="complex_filters.c"
- >
- </File>
- <File
- RelativePath="complex_vector_float.c"
- >
- </File>
- <File
- RelativePath="complex_vector_int.c"
- >
- </File>
- <File
- RelativePath="crc.c"
- >
- </File>
- <File
- RelativePath="dds_float.c"
- >
- </File>
- <File
- RelativePath="dds_int.c"
- >
- </File>
- <File
- RelativePath="dtmf.c"
- >
- </File>
- <File
- RelativePath="echo.c"
- >
- </File>
- <File
- RelativePath="fax.c"
- >
- </File>
- <File
- RelativePath="fsk.c"
- >
- </File>
- <File
- RelativePath="g711.c"
- >
- </File>
- <File
- RelativePath="g722.c"
- >
- </File>
- <File
- RelativePath="g726.c"
- >
- </File>
- <File
- RelativePath=".\msvc\gettimeofday.c"
- >
- </File>
- <File
- RelativePath="gsm0610_decode.c"
- >
- </File>
- <File
- RelativePath="gsm0610_encode.c"
- >
- </File>
- <File
- RelativePath="gsm0610_long_term.c"
- >
- </File>
- <File
- RelativePath="gsm0610_lpc.c"
- >
- </File>
- <File
- RelativePath="gsm0610_preprocess.c"
- >
- </File>
- <File
- RelativePath="gsm0610_rpe.c"
- >
- </File>
- <File
- RelativePath="gsm0610_short_term.c"
- >
- </File>
- <File
- RelativePath="hdlc.c"
- >
- </File>
- <File
- RelativePath="ima_adpcm.c"
- >
- </File>
- <File
- RelativePath="logging.c"
- >
- </File>
- <File
- RelativePath="lpc10_analyse.c"
- >
- </File>
- <File
- RelativePath="lpc10_decode.c"
- >
- </File>
- <File
- RelativePath="lpc10_encode.c"
- >
- </File>
- <File
- RelativePath="lpc10_placev.c"
- >
- </File>
- <File
- RelativePath="lpc10_voicing.c"
- >
- </File>
- <File
- RelativePath="modem_connect_tones.c"
- >
- </File>
- <File
- RelativePath="modem_echo.c"
- >
- </File>
- <File
- RelativePath="noise.c"
- >
- </File>
- <File
- RelativePath="oki_adpcm.c"
- >
- </File>
- <File
- RelativePath="playout.c"
- >
- </File>
- <File
- RelativePath="plc.c"
- >
- </File>
- <File
- RelativePath="power_meter.c"
- >
- </File>
- <File
- RelativePath="queue.c"
- >
- </File>
- <File
- RelativePath="schedule.c"
- >
- </File>
- <File
- RelativePath="sig_tone.c"
- >
- </File>
- <File
- RelativePath="silence_gen.c"
- >
- </File>
- <File
- RelativePath="super_tone_rx.c"
- >
- </File>
- <File
- RelativePath="super_tone_tx.c"
- >
- </File>
- <File
- RelativePath="t30.c"
- >
- </File>
- <File
- RelativePath="t30_api.c"
- >
- </File>
- <File
- RelativePath="t30_logging.c"
- >
- </File>
- <File
- RelativePath="t31.c"
- >
- </File>
- <File
- RelativePath="t35.c"
- >
- </File>
- <File
- RelativePath="t38_core.c"
- >
- </File>
- <File
- RelativePath="t38_gateway.c"
- >
- </File>
- <File
- RelativePath="t38_non_ecm_buffer.c"
- >
- </File>
- <File
- RelativePath="t38_terminal.c"
- >
- </File>
- <File
- RelativePath="t4.c"
- >
- </File>
- <File
- RelativePath="testcpuid.c"
- >
- </File>
- <File
- RelativePath="time_scale.c"
- >
- </File>
- <File
- RelativePath="tone_detect.c"
- >
- </File>
- <File
- RelativePath="tone_generate.c"
- >
- </File>
- <File
- RelativePath="v17rx.c"
- >
- </File>
- <File
- RelativePath="v17tx.c"
- >
- </File>
- <File
- RelativePath="v22bis_rx.c"
- >
- </File>
- <File
- RelativePath="v22bis_tx.c"
- >
- </File>
- <File
- RelativePath="v27ter_rx.c"
- >
- </File>
- <File
- RelativePath="v27ter_tx.c"
- >
- </File>
- <File
- RelativePath="v29rx.c"
- >
- </File>
- <File
- RelativePath="v29tx.c"
- >
- </File>
- <File
- RelativePath="v42.c"
- >
- </File>
- <File
- RelativePath="v42bis.c"
- >
- </File>
- <File
- RelativePath="v8.c"
- >
- </File>
- <File
- RelativePath="vector_float.c"
- >
- </File>
- <File
- RelativePath="vector_int.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- >
- <File
- RelativePath=".\msvc\spandsp.h"
- >
- </File>
- <File
- RelativePath="spandsp/adsi.h"
- >
- </File>
- <File
- RelativePath="spandsp/arctan2.h"
- >
- </File>
- <File
- RelativePath="spandsp/async.h"
- >
- </File>
- <File
- RelativePath="spandsp/at_interpreter.h"
- >
- </File>
- <File
- RelativePath="spandsp/awgn.h"
- >
- </File>
- <File
- RelativePath="spandsp/bell_r2_mf.h"
- >
- </File>
- <File
- RelativePath="spandsp/bert.h"
- >
- </File>
- <File
- RelativePath="spandsp/biquad.h"
- >
- </File>
- <File
- RelativePath="spandsp/bit_operations.h"
- >
- </File>
- <File
- RelativePath="spandsp/bitstream.h"
- >
- </File>
- <File
- RelativePath="spandsp/complex.h"
- >
- </File>
- <File
- RelativePath="spandsp/complex_filters.h"
- >
- </File>
- <File
- RelativePath="spandsp/complex_vector_float.h"
- >
- </File>
- <File
- RelativePath="spandsp/complex_vector_int.h"
- >
- </File>
- <File
- RelativePath="spandsp/crc.h"
- >
- </File>
- <File
- RelativePath="spandsp/dc_restore.h"
- >
- </File>
- <File
- RelativePath="spandsp/dds.h"
- >
- </File>
- <File
- RelativePath="spandsp/dtmf.h"
- >
- </File>
- <File
- RelativePath="spandsp/echo.h"
- >
- </File>
- <File
- RelativePath="spandsp/expose.h"
- >
- </File>
- <File
- RelativePath="spandsp/fax.h"
- >
- </File>
- <File
- RelativePath="spandsp/fax_modems.h"
- >
- </File>
- <File
- RelativePath="spandsp/fir.h"
- >
- </File>
- <File
- RelativePath="spandsp/fsk.h"
- >
- </File>
- <File
- RelativePath="spandsp/g168models.h"
- >
- </File>
- <File
- RelativePath="spandsp/g711.h"
- >
- </File>
- <File
- RelativePath="spandsp/g722.h"
- >
- </File>
- <File
- RelativePath="spandsp/g726.h"
- >
- </File>
- <File
- RelativePath="spandsp/gsm0610.h"
- >
- </File>
- <File
- RelativePath="spandsp/hdlc.h"
- >
- </File>
- <File
- RelativePath="spandsp/ima_adpcm.h"
- >
- </File>
- <File
- RelativePath="spandsp/logging.h"
- >
- </File>
- <File
- RelativePath="spandsp/lpc10.h"
- >
- </File>
- <File
- RelativePath="spandsp/modem_connect_tones.h"
- >
- </File>
- <File
- RelativePath="spandsp/modem_echo.h"
- >
- </File>
- <File
- RelativePath="spandsp/noise.h"
- >
- </File>
- <File
- RelativePath="spandsp/oki_adpcm.h"
- >
- </File>
- <File
- RelativePath="spandsp/playout.h"
- >
- </File>
- <File
- RelativePath="spandsp/plc.h"
- >
- </File>
- <File
- RelativePath="spandsp/power_meter.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/adsi.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/async.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/at_interpreter.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/awgn.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/bell_r2_mf.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/bert.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/bitstream.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/dtmf.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/fax.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/fax_modems.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/fsk.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/g711.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/g722.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/g726.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/gsm0610.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/hdlc.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/ima_adpcm.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/logging.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/lpc10.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/modem_connect_tones.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/noise.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/oki_adpcm.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/queue.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/schedule.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/sig_tone.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/super_tone_rx.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/super_tone_tx.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/t30.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/t31.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/t38_core.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/t38_gateway.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/t38_non_ecm_buffer.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/t38_terminal.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/t4.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/time_scale.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/tone_detect.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/tone_generate.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/v17rx.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/v17tx.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/v22bis.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/v27ter_rx.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/v27ter_tx.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/v29rx.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/v29tx.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/v42.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/v42bis.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/v8.h"
- >
- </File>
- <File
- RelativePath="spandsp/queue.h"
- >
- </File>
- <File
- RelativePath="spandsp/saturated.h"
- >
- </File>
- <File
- RelativePath="spandsp/schedule.h"
- >
- </File>
- <File
- RelativePath="spandsp/sig_tone.h"
- >
- </File>
- <File
- RelativePath="spandsp/silence_gen.h"
- >
- </File>
- <File
- RelativePath="spandsp/super_tone_rx.h"
- >
- </File>
- <File
- RelativePath="spandsp/super_tone_tx.h"
- >
- </File>
- <File
- RelativePath="spandsp/t30.h"
- >
- </File>
- <File
- RelativePath="spandsp/t30_api.h"
- >
- </File>
- <File
- RelativePath="spandsp/t30_fcf.h"
- >
- </File>
- <File
- RelativePath="spandsp/t30_logging.h"
- >
- </File>
- <File
- RelativePath="spandsp/t31.h"
- >
- </File>
- <File
- RelativePath="spandsp/t35.h"
- >
- </File>
- <File
- RelativePath="spandsp/t38_core.h"
- >
- </File>
- <File
- RelativePath="spandsp/t38_gateway.h"
- >
- </File>
- <File
- RelativePath="spandsp/t38_non_ecm_buffer.h"
- >
- </File>
- <File
- RelativePath="spandsp/t38_terminal.h"
- >
- </File>
- <File
- RelativePath="spandsp/t4.h"
- >
- </File>
- <File
- RelativePath="spandsp/telephony.h"
- >
- </File>
- <File
- RelativePath="spandsp/time_scale.h"
- >
- </File>
- <File
- RelativePath="spandsp/timing.h"
- >
- </File>
- <File
- RelativePath="spandsp/tone_detect.h"
- >
- </File>
- <File
- RelativePath="spandsp/tone_generate.h"
- >
- </File>
- <File
- RelativePath="spandsp/v17rx.h"
- >
- </File>
- <File
- RelativePath="spandsp/v17tx.h"
- >
- </File>
- <File
- RelativePath="spandsp/v22bis.h"
- >
- </File>
- <File
- RelativePath="spandsp/v27ter_rx.h"
- >
- </File>
- <File
- RelativePath="spandsp/v27ter_tx.h"
- >
- </File>
- <File
- RelativePath="spandsp/v29rx.h"
- >
- </File>
- <File
- RelativePath="spandsp/v29tx.h"
- >
- </File>
- <File
- RelativePath="spandsp/v42.h"
- >
- </File>
- <File
- RelativePath="spandsp/v42bis.h"
- >
- </File>
- <File
- RelativePath="spandsp/v8.h"
- >
- </File>
- <File
- RelativePath="spandsp/vector_float.h"
- >
- </File>
- <File
- RelativePath="spandsp/vector_int.h"
- >
- </File>
- <File
- RelativePath="spandsp/version.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+<File RelativePath="adsi.c"></File>
+<File RelativePath="async.c"></File>
+<File RelativePath="at_interpreter.c"></File>
+<File RelativePath="awgn.c"></File>
+<File RelativePath="bell_r2_mf.c"></File>
+<File RelativePath="bert.c"></File>
+<File RelativePath="bit_operations.c"></File>
+<File RelativePath="bitstream.c"></File>
+<File RelativePath="complex_filters.c"></File>
+<File RelativePath="complex_vector_float.c"></File>
+<File RelativePath="complex_vector_int.c"></File>
+<File RelativePath="crc.c"></File>
+<File RelativePath="dds_float.c"></File>
+<File RelativePath="dds_int.c"></File>
+<File RelativePath="dtmf.c"></File>
+<File RelativePath="echo.c"></File>
+<File RelativePath="fax.c"></File>
+<File RelativePath="fsk.c"></File>
+<File RelativePath="g711.c"></File>
+<File RelativePath="g722.c"></File>
+<File RelativePath="g726.c"></File>
+<File RelativePath="gsm0610_decode.c"></File>
+<File RelativePath="gsm0610_encode.c"></File>
+<File RelativePath="gsm0610_long_term.c"></File>
+<File RelativePath="gsm0610_lpc.c"></File>
+<File RelativePath="gsm0610_preprocess.c"></File>
+<File RelativePath="gsm0610_rpe.c"></File>
+<File RelativePath="gsm0610_short_term.c"></File>
+<File RelativePath="hdlc.c"></File>
+<File RelativePath="ima_adpcm.c"></File>
+<File RelativePath="logging.c"></File>
+<File RelativePath="lpc10_analyse.c"></File>
+<File RelativePath="lpc10_decode.c"></File>
+<File RelativePath="lpc10_encode.c"></File>
+<File RelativePath="lpc10_placev.c"></File>
+<File RelativePath="lpc10_voicing.c"></File>
+<File RelativePath="modem_echo.c"></File>
+<File RelativePath="modem_connect_tones.c"></File>
+<File RelativePath="noise.c"></File>
+<File RelativePath="oki_adpcm.c"></File>
+<File RelativePath="playout.c"></File>
+<File RelativePath="plc.c"></File>
+<File RelativePath="power_meter.c"></File>
+<File RelativePath="queue.c"></File>
+<File RelativePath="schedule.c"></File>
+<File RelativePath="sig_tone.c"></File>
+<File RelativePath="silence_gen.c"></File>
+<File RelativePath="super_tone_rx.c"></File>
+<File RelativePath="super_tone_tx.c"></File>
+<File RelativePath="t4.c"></File>
+<File RelativePath="t30.c"></File>
+<File RelativePath="t30_api.c"></File>
+<File RelativePath="t30_logging.c"></File>
+<File RelativePath="t31.c"></File>
+<File RelativePath="t35.c"></File>
+<File RelativePath="t38_core.c"></File>
+<File RelativePath="t38_gateway.c"></File>
+<File RelativePath="t38_non_ecm_buffer.c"></File>
+<File RelativePath="t38_terminal.c"></File>
+<File RelativePath="testcpuid.c"></File>
+<File RelativePath="time_scale.c"></File>
+<File RelativePath="tone_detect.c"></File>
+<File RelativePath="tone_generate.c"></File>
+<File RelativePath="v17rx.c"></File>
+<File RelativePath="v17tx.c"></File>
+<File RelativePath="v22bis_rx.c"></File>
+<File RelativePath="v22bis_tx.c"></File>
+<File RelativePath="v27ter_rx.c"></File>
+<File RelativePath="v27ter_tx.c"></File>
+<File RelativePath="v29rx.c"></File>
+<File RelativePath="v29tx.c"></File>
+<File RelativePath="v42.c"></File>
+<File RelativePath="v42bis.c"></File>
+<File RelativePath="v8.c"></File>
+<File RelativePath="vector_float.c"></File>
+<File RelativePath="vector_int.c"></File>
+<File RelativePath=".\msvc\gettimeofday.c"></File>
+</Filter><Filter Name="Header Files">
+<File RelativePath="spandsp/adsi.h"></File>
+<File RelativePath="spandsp/async.h"></File>
+<File RelativePath="spandsp/arctan2.h"></File>
+<File RelativePath="spandsp/at_interpreter.h"></File>
+<File RelativePath="spandsp/awgn.h"></File>
+<File RelativePath="spandsp/bell_r2_mf.h"></File>
+<File RelativePath="spandsp/bert.h"></File>
+<File RelativePath="spandsp/biquad.h"></File>
+<File RelativePath="spandsp/bit_operations.h"></File>
+<File RelativePath="spandsp/bitstream.h"></File>
+<File RelativePath="spandsp/crc.h"></File>
+<File RelativePath="spandsp/complex.h"></File>
+<File RelativePath="spandsp/complex_filters.h"></File>
+<File RelativePath="spandsp/complex_vector_float.h"></File>
+<File RelativePath="spandsp/complex_vector_int.h"></File>
+<File RelativePath="spandsp/dc_restore.h"></File>
+<File RelativePath="spandsp/dds.h"></File>
+<File RelativePath="spandsp/dtmf.h"></File>
+<File RelativePath="spandsp/echo.h"></File>
+<File RelativePath="spandsp/fast_convert.h"></File>
+<File RelativePath="spandsp/fax.h"></File>
+<File RelativePath="spandsp/fax_modems.h"></File>
+<File RelativePath="spandsp/fir.h"></File>
+<File RelativePath="spandsp/fsk.h"></File>
+<File RelativePath="spandsp/g168models.h"></File>
+<File RelativePath="spandsp/g711.h"></File>
+<File RelativePath="spandsp/g722.h"></File>
+<File RelativePath="spandsp/g726.h"></File>
+<File RelativePath="spandsp/gsm0610.h"></File>
+<File RelativePath="spandsp/hdlc.h"></File>
+<File RelativePath="spandsp/ima_adpcm.h"></File>
+<File RelativePath="spandsp/logging.h"></File>
+<File RelativePath="spandsp/lpc10.h"></File>
+<File RelativePath="spandsp/modem_echo.h"></File>
+<File RelativePath="spandsp/modem_connect_tones.h"></File>
+<File RelativePath="spandsp/noise.h"></File>
+<File RelativePath="spandsp/oki_adpcm.h"></File>
+<File RelativePath="spandsp/playout.h"></File>
+<File RelativePath="spandsp/plc.h"></File>
+<File RelativePath="spandsp/power_meter.h"></File>
+<File RelativePath="spandsp/queue.h"></File>
+<File RelativePath="spandsp/saturated.h"></File>
+<File RelativePath="spandsp/schedule.h"></File>
+<File RelativePath="spandsp/sig_tone.h"></File>
+<File RelativePath="spandsp/silence_gen.h"></File>
+<File RelativePath="spandsp/super_tone_rx.h"></File>
+<File RelativePath="spandsp/super_tone_tx.h"></File>
+<File RelativePath="spandsp/t4.h"></File>
+<File RelativePath="spandsp/t30.h"></File>
+<File RelativePath="spandsp/t30_api.h"></File>
+<File RelativePath="spandsp/t30_fcf.h"></File>
+<File RelativePath="spandsp/t30_logging.h"></File>
+<File RelativePath="spandsp/t31.h"></File>
+<File RelativePath="spandsp/t35.h"></File>
+<File RelativePath="spandsp/t38_core.h"></File>
+<File RelativePath="spandsp/t38_gateway.h"></File>
+<File RelativePath="spandsp/t38_non_ecm_buffer.h"></File>
+<File RelativePath="spandsp/t38_terminal.h"></File>
+<File RelativePath="spandsp/telephony.h"></File>
+<File RelativePath="spandsp/time_scale.h"></File>
+<File RelativePath="spandsp/timing.h"></File>
+<File RelativePath="spandsp/tone_detect.h"></File>
+<File RelativePath="spandsp/tone_generate.h"></File>
+<File RelativePath="spandsp/v17rx.h"></File>
+<File RelativePath="spandsp/v17tx.h"></File>
+<File RelativePath="spandsp/v22bis.h"></File>
+<File RelativePath="spandsp/v27ter_rx.h"></File>
+<File RelativePath="spandsp/v27ter_tx.h"></File>
+<File RelativePath="spandsp/v29rx.h"></File>
+<File RelativePath="spandsp/v29tx.h"></File>
+<File RelativePath="spandsp/v42.h"></File>
+<File RelativePath="spandsp/v42bis.h"></File>
+<File RelativePath="spandsp/v8.h"></File>
+<File RelativePath="spandsp/vector_float.h"></File>
+<File RelativePath="spandsp/vector_int.h"></File>
+<File RelativePath="spandsp/version.h"></File>
+<File RelativePath="spandsp/private/adsi.h"></File>
+<File RelativePath="spandsp/private/async.h"></File>
+<File RelativePath="spandsp/private/at_interpreter.h"></File>
+<File RelativePath="spandsp/private/awgn.h"></File>
+<File RelativePath="spandsp/private/bell_r2_mf.h"></File>
+<File RelativePath="spandsp/private/bert.h"></File>
+<File RelativePath="spandsp/private/bitstream.h"></File>
+<File RelativePath="spandsp/private/dtmf.h"></File>
+<File RelativePath="spandsp/private/fax.h"></File>
+<File RelativePath="spandsp/private/fax_modems.h"></File>
+<File RelativePath="spandsp/private/fsk.h"></File>
+<File RelativePath="spandsp/private/g711.h"></File>
+<File RelativePath="spandsp/private/g722.h"></File>
+<File RelativePath="spandsp/private/g726.h"></File>
+<File RelativePath="spandsp/private/gsm0610.h"></File>
+<File RelativePath="spandsp/private/hdlc.h"></File>
+<File RelativePath="spandsp/private/ima_adpcm.h"></File>
+<File RelativePath="spandsp/private/logging.h"></File>
+<File RelativePath="spandsp/private/lpc10.h"></File>
+<File RelativePath="spandsp/private/modem_connect_tones.h"></File>
+<File RelativePath="spandsp/private/noise.h"></File>
+<File RelativePath="spandsp/private/oki_adpcm.h"></File>
+<File RelativePath="spandsp/private/queue.h"></File>
+<File RelativePath="spandsp/private/schedule.h"></File>
+<File RelativePath="spandsp/private/sig_tone.h"></File>
+<File RelativePath="spandsp/private/super_tone_rx.h"></File>
+<File RelativePath="spandsp/private/super_tone_tx.h"></File>
+<File RelativePath="spandsp/private/t30.h"></File>
+<File RelativePath="spandsp/private/t31.h"></File>
+<File RelativePath="spandsp/private/t38_core.h"></File>
+<File RelativePath="spandsp/private/t38_gateway.h"></File>
+<File RelativePath="spandsp/private/t38_non_ecm_buffer.h"></File>
+<File RelativePath="spandsp/private/t38_terminal.h"></File>
+<File RelativePath="spandsp/private/t4.h"></File>
+<File RelativePath="spandsp/private/time_scale.h"></File>
+<File RelativePath="spandsp/private/tone_detect.h"></File>
+<File RelativePath="spandsp/private/tone_generate.h"></File>
+<File RelativePath="spandsp/private/v17rx.h"></File>
+<File RelativePath="spandsp/private/v17tx.h"></File>
+<File RelativePath="spandsp/private/v22bis.h"></File>
+<File RelativePath="spandsp/private/v27ter_rx.h"></File>
+<File RelativePath="spandsp/private/v27ter_tx.h"></File>
+<File RelativePath="spandsp/private/v29rx.h"></File>
+<File RelativePath="spandsp/private/v29tx.h"></File>
+<File RelativePath="spandsp/private/v42.h"></File>
+<File RelativePath="spandsp/private/v42bis.h"></File>
+<File RelativePath="spandsp/private/v8.h"></File>
+<File RelativePath="spandsp/expose.h"></File>
+<File RelativePath="spandsp.h"></File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Modified: freeswitch/trunk/libs/spandsp/src/logging.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/logging.c (original)
+++ freeswitch/trunk/libs/spandsp/src/logging.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: logging.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 @@
}
/*- 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;
Modified: freeswitch/trunk/libs/spandsp/src/lpc10_decode.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/lpc10_decode.c (original)
+++ freeswitch/trunk/libs/spandsp/src/lpc10_decode.c Tue Feb 3 12:50:18 2009
@@ -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 @@
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;
Modified: freeswitch/trunk/libs/spandsp/src/lpc10_encode.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/lpc10_encode.c (original)
+++ freeswitch/trunk/libs/spandsp/src/lpc10_encode.c Tue Feb 3 12:50:18 2009
@@ -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)
Modified: freeswitch/trunk/libs/spandsp/src/lpc10_voicing.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/lpc10_voicing.c (original)
+++ freeswitch/trunk/libs/spandsp/src/lpc10_voicing.c Tue Feb 3 12:50:18 2009
@@ -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 @@
/* 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 @@
/* 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 @@
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. */
Modified: freeswitch/trunk/libs/spandsp/src/modem_connect_tones.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/modem_connect_tones.c (original)
+++ freeswitch/trunk/libs/spandsp/src/modem_connect_tones.c Tue Feb 3 12:50:18 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: modem_connect_tones.c,v 1.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 @@
/*- 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 @@
/*- 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
/*- 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)
{
Modified: freeswitch/trunk/libs/spandsp/src/modem_echo.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/modem_echo.c (original)
+++ freeswitch/trunk/libs/spandsp/src/modem_echo.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: 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 */
Modified: freeswitch/trunk/libs/spandsp/src/msvc/config.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/msvc/config.h (original)
+++ freeswitch/trunk/libs/spandsp/src/msvc/config.h Tue Feb 3 12:50:18 2009
@@ -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(a)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
Modified: freeswitch/trunk/libs/spandsp/src/msvc/spandsp.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/msvc/spandsp.h (original)
+++ freeswitch/trunk/libs/spandsp/src/msvc/spandsp.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: spandsp.h.in,v 1.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>
Modified: freeswitch/trunk/libs/spandsp/src/noise.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/noise.c (original)
+++ freeswitch/trunk/libs/spandsp/src/noise.c Tue Feb 3 12:50:18 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: noise.c,v 1.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"
Modified: freeswitch/trunk/libs/spandsp/src/oki_adpcm.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/oki_adpcm.c (original)
+++ freeswitch/trunk/libs/spandsp/src/oki_adpcm.c Tue Feb 3 12:50:18 2009
@@ -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 @@
/*- 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 @@
/*- 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;
Modified: freeswitch/trunk/libs/spandsp/src/playout.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/playout.c (original)
+++ freeswitch/trunk/libs/spandsp/src/playout.c Tue Feb 3 12:50:18 2009
@@ -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)
Modified: freeswitch/trunk/libs/spandsp/src/plc.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/plc.c (original)
+++ freeswitch/trunk/libs/spandsp/src/plc.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: plc.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"
Modified: freeswitch/trunk/libs/spandsp/src/power_meter.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/power_meter.c (original)
+++ freeswitch/trunk/libs/spandsp/src/power_meter.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: power_meter.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 */
Modified: freeswitch/trunk/libs/spandsp/src/queue.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/queue.c (original)
+++ freeswitch/trunk/libs/spandsp/src/queue.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: queue.c,v 1.27 2009/01/31 08:48:10 steveu Exp $
+ * $Id: queue.c,v 1.28 2009/02/03 16:28:40 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/schedule.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/schedule.c (original)
+++ freeswitch/trunk/libs/spandsp/src/schedule.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: schedule.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)
Modified: freeswitch/trunk/libs/spandsp/src/sig_tone.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/sig_tone.c (original)
+++ freeswitch/trunk/libs/spandsp/src/sig_tone.c Tue Feb 3 12:50:18 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: sig_tone.c,v 1.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"
Modified: freeswitch/trunk/libs/spandsp/src/silence_gen.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/silence_gen.c (original)
+++ freeswitch/trunk/libs/spandsp/src/silence_gen.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: silence_gen.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 @@
/* 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;
}
Modified: freeswitch/trunk/libs/spandsp/src/spandsp.h.in
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp.h.in (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp.h.in Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: spandsp.h.in,v 1.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>
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/adsi.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/adsi.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/adsi.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: adsi.h,v 1.34 2009/01/31 08:48:11 steveu Exp $
+ * $Id: adsi.h,v 1.35 2009/02/03 16:28:40 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/async.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/async.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/async.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: async.h,v 1.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 @@
\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 @@
\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 @@
- SIG_STATUS_TRAINING_SUCCEEDED
- SIG_STATUS_TRAINING_FAILED
- SIG_STATUS_END_OF_DATA */
-void async_rx_put_bit(void *user_data, int bit);
+SPAN_DECLARE(void) async_rx_put_bit(void *user_data, int bit);
#if defined(__cplusplus)
}
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/at_interpreter.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/at_interpreter.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/at_interpreter.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: at_interpreter.h,v 1.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 @@
\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.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/awgn.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/awgn.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/awgn.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: awgn.h,v 1.16 2009/01/31 08:48:11 steveu Exp $
+ * $Id: awgn.h,v 1.17 2009/02/03 16:28:40 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/bell_r2_mf.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/bell_r2_mf.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/bell_r2_mf.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: bell_r2_mf.h,v 1.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 @@
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 @@
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.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/bert.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/bert.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/bert.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: bert.h,v 1.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_)
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/bitstream.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/bitstream.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/bitstream.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: 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 @@
\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)
}
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/complex_filters.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/complex_filters.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/complex_filters.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: complex_filters.h,v 1.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_)
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/dtmf.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/dtmf.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/dtmf.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: dtmf.h,v 1.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 @@
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.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/echo.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/echo.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/echo.h Tue Feb 3 12:50:18 2009
@@ -24,7 +24,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: echo.h,v 1.17 2009/01/31 08:48:11 steveu Exp $
+ * $Id: echo.h,v 1.18 2009/02/03 16:28:41 steveu Exp $
*/
/*! \file */
Added: freeswitch/trunk/libs/spandsp/src/spandsp/fast_convert.h
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/fast_convert.h Tue Feb 3 12:50:18 2009
@@ -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(a)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(a)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 ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/fax.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/fax.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/fax.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: fax.h,v 1.37 2009/01/31 08:48:11 steveu Exp $
+ * $Id: fax.h,v 1.38 2009/02/03 16:28:41 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: fax_modems.h,v 1.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 */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: fsk.h,v 1.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 @@
\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 @@
\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.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/g711.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/g711.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/g711.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: g711.h,v 1.16 2009/01/31 08:48:11 steveu Exp $
+ * $Id: g711.h,v 1.17 2009/02/03 16:28:41 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/g722.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/g722.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/g722.h Tue Feb 3 12:50:18 2009
@@ -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 $
*/
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/g726.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/g726.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/g726.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: g726.h,v 1.23 2009/01/31 08:48:11 steveu Exp $
+ * $Id: g726.h,v 1.24 2009/02/03 16:28:41 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/gsm0610.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/gsm0610.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/gsm0610.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: gsm0610.h,v 1.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_)
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/hdlc.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/hdlc.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/hdlc.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: hdlc.h,v 1.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 @@
\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 @@
\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.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/ima_adpcm.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/ima_adpcm.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/ima_adpcm.h Tue Feb 3 12:50:18 2009
@@ -26,7 +26,7 @@
* Based on a bit from here, a bit from there, eye of toad,
* ear of bat, etc - plus, of course, my own 2 cents.
*
- * $Id: ima_adpcm.h,v 1.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 @@
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.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/lpc10.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/lpc10.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/lpc10.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: lpc10.h,v 1.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_)
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/modem_connect_tones.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/modem_connect_tones.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/modem_connect_tones.h Tue Feb 3 12:50:18 2009
@@ -24,7 +24,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: modem_connect_tones.h,v 1.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 @@
\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 @@
\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.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/modem_echo.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/modem_echo.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/modem_echo.h Tue Feb 3 12:50:18 2009
@@ -25,7 +25,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: modem_echo.h,v 1.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 */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/noise.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/noise.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/noise.h Tue Feb 3 12:50:18 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: noise.h,v 1.15 2009/01/31 08:48:11 steveu Exp $
+ * $Id: noise.h,v 1.16 2009/02/03 16:28:41 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/oki_adpcm.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/oki_adpcm.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/oki_adpcm.h Tue Feb 3 12:50:18 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: oki_adpcm.h,v 1.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 @@
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.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/playout.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/playout.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/playout.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: playout.h,v 1.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_)
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/plc.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/plc.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/plc.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: plc.h,v 1.19 2009/01/31 08:48:11 steveu Exp $
+ * $Id: plc.h,v 1.20 2009/02/03 16:28:41 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/power_meter.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/power_meter.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/power_meter.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: power_meter.h,v 1.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_)
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/queue.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/queue.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/queue.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: queue.h,v 1.19 2009/01/31 08:48:11 steveu Exp $
+ * $Id: queue.h,v 1.20 2009/02/03 16:28:41 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/saturated.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/saturated.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/saturated.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: 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 @@
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 @@
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 --------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/schedule.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/schedule.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/schedule.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: schedule.h,v 1.18 2009/01/31 08:48:11 steveu Exp $
+ * $Id: schedule.h,v 1.19 2009/02/03 16:28:41 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/sig_tone.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/sig_tone.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/sig_tone.h Tue Feb 3 12:50:18 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: sig_tone.h,v 1.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 */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: silence_gen.h,v 1.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 @@
\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
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_rx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_rx.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: super_tone_rx.h,v 1.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 @@
\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.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_tx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_tx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_tx.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: super_tone_tx.h,v 1.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 @@
#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);
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t30.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t30.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t30.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t30.h,v 1.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 @@
\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 @@
\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 @@
\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 @@
\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.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t30_api.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t30_api.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t30_api.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t30_api.h,v 1.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 */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t30_logging.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t30_logging.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t30_logging.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t30_logging.h,v 1.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 */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t31.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t31.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t31.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t31.h,v 1.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 @@
\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.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t38_core.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t38_core.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t38_core.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_core.h,v 1.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(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)
}
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t38_gateway.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t38_gateway.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t38_gateway.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_gateway.h,v 1.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 @@
\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.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h Tue Feb 3 12:50:18 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_non_ecm_buffer.h,v 1.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 @@
/*! \brief Get the next bit of data from a T.38 rate adapting non-ECM buffer context.
\param user_data The buffer context, cast to a void pointer.
\return The next bit, or one of the values indicating a change of modem status. */
-int t38_non_ecm_buffer_get_bit(void *user_data);
+SPAN_DECLARE(int) t38_non_ecm_buffer_get_bit(void *user_data);
#if defined(__cplusplus)
}
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t38_terminal.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t38_terminal.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t38_terminal.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_terminal.h,v 1.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 @@
\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.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t4.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t4.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t4.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t4.h,v 1.54 2009/01/31 08:48:11 steveu Exp $
+ * $Id: t4.h,v 1.55 2009/02/03 16:28:41 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/telephony.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/telephony.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/telephony.h Tue Feb 3 12:50:18 2009
@@ -22,30 +22,30 @@
* 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
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/time_scale.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/time_scale.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/time_scale.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: time_scale.h,v 1.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_)
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/tone_detect.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/tone_detect.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/tone_detect.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: tone_detect.h,v 1.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 @@
#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 @@
[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.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/tone_generate.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/tone_generate.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/tone_generate.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: tone_generate.h,v 1.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 */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v17rx.h,v 1.59 2009/01/31 08:48:11 steveu Exp $
+ * $Id: v17rx.h,v 1.60 2009/02/03 16:28:41 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v17tx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v17tx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v17tx.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v17tx.h,v 1.38 2009/01/31 08:48:11 steveu Exp $
+ * $Id: v17tx.h,v 1.39 2009/02/03 16:28:41 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v22bis.h,v 1.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 @@
\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.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v27ter_rx.h,v 1.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 */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_tx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_tx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_tx.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v27ter_tx.h,v 1.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 */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v29rx.h,v 1.66 2009/01/31 08:48:11 steveu Exp $
+ * $Id: v29rx.h,v 1.67 2009/02/03 16:28:41 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v29tx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v29tx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v29tx.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v29tx.h,v 1.36 2009/01/31 08:48:11 steveu Exp $
+ * $Id: v29tx.h,v 1.37 2009/02/03 16:28:41 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v42.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v42.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v42.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v42.h,v 1.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 @@
/*! 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
*/
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v42bis.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v42bis.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v42bis.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v42bis.h,v 1.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 @@
\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.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v8.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v8.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v8.h Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v8.h,v 1.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 @@
\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.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/version.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/version.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/version.h Tue Feb 3 12:50:18 2009
@@ -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 ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/super_tone_rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/super_tone_rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/super_tone_rx.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: super_tone_rx.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 @@
/*- 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 @@
/*- 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;
Modified: freeswitch/trunk/libs/spandsp/src/super_tone_tx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/super_tone_tx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/super_tone_tx.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: super_tone_tx.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"
@@ -70,12 +71,12 @@
*/
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 @@
/* 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 @@
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)
Modified: freeswitch/trunk/libs/spandsp/src/t30.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t30.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t30.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t30.c,v 1.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 @@
}
/*- 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 @@
}
/*- 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 @@
}
/*- 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 @@
/*- 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)
{
Modified: freeswitch/trunk/libs/spandsp/src/t30_api.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t30_api.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t30_api.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t30_api.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 */
Modified: freeswitch/trunk/libs/spandsp/src/t30_logging.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t30_logging.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t30_logging.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t30_logging.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 */
Modified: freeswitch/trunk/libs/spandsp/src/t31.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t31.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t31.c Tue Feb 3 12:50:18 2009
@@ -25,7 +25,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: 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 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 @@
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 @@
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 @@
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 @@
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 @@
/*- 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;
Modified: freeswitch/trunk/libs/spandsp/src/t35.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t35.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t35.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t35.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 @@
};
#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;
Modified: freeswitch/trunk/libs/spandsp/src/t38_core.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t38_core.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t38_core.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_core.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 @@
/*- 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)
{
Modified: freeswitch/trunk/libs/spandsp/src/t38_gateway.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t38_gateway.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t38_gateway.c Tue Feb 3 12:50:18 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_gateway.c,v 1.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 @@
/*- 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 @@
/*- 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 @@
/*- 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 @@
/*- 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;
Modified: freeswitch/trunk/libs/spandsp/src/t38_non_ecm_buffer.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t38_non_ecm_buffer.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t38_non_ecm_buffer.c Tue Feb 3 12:50:18 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_non_ecm_buffer.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 @@
}
/*- 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;
Modified: freeswitch/trunk/libs/spandsp/src/t38_terminal.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t38_terminal.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t38_terminal.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_terminal.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 @@
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 @@
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 @@
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 @@
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 @@
/*- 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;
Modified: freeswitch/trunk/libs/spandsp/src/t4.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t4.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t4.c Tue Feb 3 12:50:18 2009
@@ -24,7 +24,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t4.c,v 1.120 2009/01/31 08:48:10 steveu Exp $
+ * $Id: t4.c,v 1.121 2009/02/03 16:28:40 steveu Exp $
*/
/*
Modified: freeswitch/trunk/libs/spandsp/src/time_scale.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/time_scale.c (original)
+++ freeswitch/trunk/libs/spandsp/src/time_scale.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: time_scale.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"
Modified: freeswitch/trunk/libs/spandsp/src/tone_detect.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/tone_detect.c (original)
+++ freeswitch/trunk/libs/spandsp/src/tone_detect.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: tone_detect.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 @@
}
/*- 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 @@
}
/*- 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 @@
}
/*- 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 @@
/*- 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)
Modified: freeswitch/trunk/libs/spandsp/src/tone_generate.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/tone_generate.c (original)
+++ freeswitch/trunk/libs/spandsp/src/tone_generate.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: tone_generate.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"
@@ -61,15 +62,15 @@
#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 @@
#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 @@
#if defined(SPANDSP_USE_FIXED_POINT)
amp[samples] = xamp;
#else
- amp[samples] = (int16_t) lrintf(xamp);
+ amp[samples] = (int16_t) lfastrintf(xamp);
#endif
}
}
Modified: freeswitch/trunk/libs/spandsp/src/v17rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v17rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v17rx.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v17rx.c,v 1.131 2009/01/30 10:22:23 steveu Exp $
+ * $Id: v17rx.c,v 1.132 2009/02/03 16:28:40 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/v17tx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v17tx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v17tx.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v17tx.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 @@
/* 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;
Modified: freeswitch/trunk/libs/spandsp/src/v22bis_rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v22bis_rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v22bis_rx.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v22bis_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 */
Modified: freeswitch/trunk/libs/spandsp/src/v22bis_tx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v22bis_tx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v22bis_tx.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v22bis_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 @@
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 @@
/*- 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)
{
Modified: freeswitch/trunk/libs/spandsp/src/v27ter_rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v27ter_rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v27ter_rx.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v27ter_rx.c,v 1.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 */
Modified: freeswitch/trunk/libs/spandsp/src/v27ter_tx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v27ter_tx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v27ter_tx.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v27ter_tx.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 @@
/* 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 @@
/* 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
}
}
Modified: freeswitch/trunk/libs/spandsp/src/v29rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v29rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v29rx.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v29rx.c,v 1.152 2009/01/30 10:22:23 steveu Exp $
+ * $Id: v29rx.c,v 1.153 2009/02/03 16:28:40 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/v29tx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v29tx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v29tx.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v29tx.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 @@
/* 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;
Modified: freeswitch/trunk/libs/spandsp/src/v42.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v42.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v42.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v42.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 @@
}
/*- 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 @@
}
/*- 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 @@
}
/*- 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)
Modified: freeswitch/trunk/libs/spandsp/src/v42bis.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v42bis.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v42bis.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v42bis.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 @@
/*- 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 @@
/*- 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 @@
/*- 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;
Modified: freeswitch/trunk/libs/spandsp/src/v8.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v8.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v8.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v8.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 @@
/*- 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)
{
Modified: freeswitch/trunk/libs/spandsp/src/vector_float.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/vector_float.c (original)
+++ freeswitch/trunk/libs/spandsp/src/vector_float.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: vector_float.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 @@
/*- 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 @@
/*- 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 @@
/*- 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 @@
/*- 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 @@
}
/*- 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 @@
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 @@
/*- 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 @@
/*- 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 @@
/*- 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 @@
/*- 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 @@
/*- 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 @@
/*- 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 @@
/*- 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 @@
/*- 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;
Modified: freeswitch/trunk/libs/spandsp/src/vector_int.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/vector_int.c (original)
+++ freeswitch/trunk/libs/spandsp/src/vector_int.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: vector_int.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 */
Modified: freeswitch/trunk/libs/spandsp/tests/t31_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/t31_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/t31_tests.c Tue Feb 3 12:50:18 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: 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 @@
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"),
1
0
03 Feb '09
Author: rupa
Date: Tue Feb 3 12:49:25 2009
New Revision: 11611
Log:
fix memory leak on each sql execution
Modified:
freeswitch/trunk/src/mod/applications/mod_easyroute/mod_easyroute.c
Modified: freeswitch/trunk/src/mod/applications/mod_easyroute/mod_easyroute.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_easyroute/mod_easyroute.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_easyroute/mod_easyroute.c Tue Feb 3 12:49:25 2009
@@ -281,6 +281,7 @@
#else
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "mod_easyroute requires core ODBC support. Please refer to the documentation on how to enable this\n");
#endif
+ switch_safe_free(sql);
if (globals.mutex){
switch_mutex_unlock(globals.mutex);
}
1
0
Author: anthm
Date: Tue Feb 3 11:17:31 2009
New Revision: 11610
Log:
Modify state machine behaviour.
Endpoint handlers can still veto all other state handlers by returning SWITCH_STATUS_FALSE
Application handlers can only veto each other by returning SWITCH_STATUS_FALSE.
Global handlers will still be called when application vetos but they can still veto each other.
Default handler will not be called if application or global vetos or if state has changed from any handler.
Modified:
freeswitch/trunk/src/switch_core_state_machine.c
freeswitch/trunk/src/switch_ivr_originate.c
Modified: freeswitch/trunk/src/switch_core_state_machine.c
==============================================================================
--- freeswitch/trunk/src/switch_core_state_machine.c (original)
+++ freeswitch/trunk/src/switch_core_state_machine.c Tue Feb 3 11:17:31 2009
@@ -276,12 +276,12 @@
midstate = state; \
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) State %s\n", switch_channel_get_name(session->channel), __STATE_STR); \
if (!driver_state_handler->on_##__STATE || (driver_state_handler->on_##__STATE(session) == SWITCH_STATUS_SUCCESS \
- && midstate == switch_channel_get_state(session->channel))) { \
+ )) { \
while (do_extra_handlers && (application_state_handler = switch_channel_get_state_handler(session->channel, index++)) != 0) { \
if (!application_state_handler || !application_state_handler->on_##__STATE \
|| (application_state_handler->on_##__STATE \
&& application_state_handler->on_##__STATE(session) == SWITCH_STATUS_SUCCESS \
- && midstate == switch_channel_get_state(session->channel))) { \
+ )) { \
proceed++; \
continue; \
} else { \
@@ -290,11 +290,13 @@
} \
} \
index = 0; \
+ if (!proceed) global_proceed = 0; \
+ proceed = 1; \
while (do_extra_handlers && proceed && (application_state_handler = switch_core_get_state_handler(index++)) != 0) { \
if (!application_state_handler || !application_state_handler->on_##__STATE || \
(application_state_handler->on_##__STATE && \
application_state_handler->on_##__STATE(session) == SWITCH_STATUS_SUCCESS \
- && midstate == switch_channel_get_state(session->channel))) { \
+ )) { \
proceed++; \
continue; \
} else { \
@@ -302,7 +304,8 @@
break; \
} \
} \
- if (proceed) { \
+ if (!proceed || midstate != switch_channel_get_state(session->channel)) global_proceed = 0; \
+ if (global_proceed) { \
switch_core_standard_on_##__STATE(session); \
} \
} \
@@ -374,6 +377,7 @@
if (state != switch_channel_get_running_state(session->channel) || state == CS_HANGUP) {
int index = 0;
int proceed = 1;
+ int global_proceed = 1;
int do_extra_handlers = 1;
switch_channel_set_running_state(session->channel, state);
Modified: freeswitch/trunk/src/switch_ivr_originate.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_originate.c (original)
+++ freeswitch/trunk/src/switch_ivr_originate.c Tue Feb 3 11:17:31 2009
@@ -58,8 +58,10 @@
{
switch_channel_t *channel = switch_core_session_get_channel(session);
- /* put the channel in a passive state until it is answered */
- switch_channel_set_state(channel, CS_CONSUME_MEDIA);
+ if (switch_channel_get_state(channel) == CS_ROUTING) {
+ /* put the channel in a passive state until it is answered */
+ switch_channel_set_state(channel, CS_CONSUME_MEDIA);
+ }
return SWITCH_STATUS_FALSE;
}
1
0
03 Feb '09
Author: rupa
Date: Tue Feb 3 09:59:46 2009
New Revision: 11609
Log:
add mutex around odbc calls
Modified:
freeswitch/trunk/src/mod/applications/mod_lcr/mod_lcr.c
Modified: freeswitch/trunk/src/mod/applications/mod_lcr/mod_lcr.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_lcr/mod_lcr.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_lcr/mod_lcr.c Tue Feb 3 09:59:46 2009
@@ -120,6 +120,7 @@
char *dbname;
char *odbc_dsn;
switch_mutex_t *mutex;
+ switch_mutex_t *db_mutex;
switch_odbc_handle_t *master_odbc;
switch_hash_t *profile_hash;
profile_t *default_profile;
@@ -155,7 +156,7 @@
, destination_number, cur_route->suffix, cur_route->gw_suffix);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Returning Dialstring %s\n", data);
- switch_safe_free(orig_destination_number);
+ switch_safe_free(orig_destination_number); /* don't need to free destination_number */
return data;
}
@@ -243,7 +244,7 @@
p = (char *)str;
len = strlen(str);
- switch_zmalloc(newstr, len+1); /* worst case, same string */
+ switch_zmalloc(newstr, len+1);
np = newstr;
while(*p) {
@@ -260,15 +261,19 @@
static switch_bool_t lcr_execute_sql_callback(char *sql, switch_core_db_callback_func_t callback, void *pdata)
{
+ switch_bool_t retval = SWITCH_FALSE;
+
+ switch_mutex_lock(globals.db_mutex);
if (globals.odbc_dsn) {
if(switch_odbc_handle_callback_exec(globals.master_odbc, sql, callback, pdata)
== SWITCH_ODBC_FAIL) {
- return SWITCH_FALSE;
+ retval = SWITCH_FALSE;
} else {
- return SWITCH_TRUE;
+ retval = SWITCH_TRUE;
}
}
- return SWITCH_FALSE;
+ switch_mutex_unlock(globals.db_mutex);
+ return retval;
}
int route_add_callback(void *pArg, int argc, char **argv, char **columnNames)
@@ -766,6 +771,9 @@
if (switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, globals.pool) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "failed to initialize mutex\n");
}
+ if (switch_mutex_init(&globals.db_mutex, SWITCH_MUTEX_UNNESTED, globals.pool) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "failed to initialize db_mutex\n");
+ }
if(set_db_random() == SWITCH_TRUE) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Database RANDOM function set to %s\n", db_random);
1
0
03 Feb '09
Author: mrene
Date: Mon Feb 2 21:46:53 2009
New Revision: 11608
Log:
write different channel variables per realm_id
Modified:
freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c
Modified: freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c Mon Feb 2 21:46:53 2009
@@ -938,9 +938,17 @@
}
/* Save current usage & rate into channel variables so it can be used later in the dialplan, or added to CDR records */
- switch_channel_set_variable(channel, "limit_usage", switch_core_session_sprintf(session, "%d", item->total_usage));
- switch_channel_set_variable(channel, "limit_rate", switch_core_session_sprintf(session, "%d", item->rate_usage));
-
+ {
+ const char *susage = switch_core_session_sprintf(session, "%d", item->total_usage);
+ const char *srate = switch_core_session_sprintf(session, "%d", item->rate_usage);
+
+ switch_channel_set_variable(channel, "limit_usage", susage);
+ switch_channel_set_variable(channel, switch_core_session_sprintf(session, "limit_usage_%s", hashkey), susage);
+
+ switch_channel_set_variable(channel, "limit_rate", srate);
+ switch_channel_set_variable(channel, switch_core_session_sprintf(session, "limit_rate_%s", hashkey), srate);
+ }
+
if (!pvt->have_state_handler) {
switch_core_event_hook_add_state_change(session, hash_state_handler);
pvt->have_state_handler = 1;
1
0
Author: intralanman
Date: Mon Feb 2 21:19:16 2009
New Revision: 11607
Log:
adding branch for skopii... hopefully in the right place this time ;-)
Added:
freeswitch/branches/jskopis/
1
0
03 Feb '09
Author: mrene
Date: Mon Feb 2 20:34:37 2009
New Revision: 11604
Log:
Fix transfer bug, fix leak and make the channel hangup if the extension is \!hangup_cause
Modified:
freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c
Modified: freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c Mon Feb 2 20:34:37 2009
@@ -57,12 +57,16 @@
#endif
} globals;
-struct limit_hash_item {
+typedef struct {
uint32_t total_usage;
uint32_t rate_usage;
time_t last_check;
-};
-typedef struct limit_hash_item limit_hash_item_t;
+} limit_hash_item_t;
+
+typedef struct {
+ uint8_t have_state_handler;
+ switch_hash_t *hash;
+ } limit_hash_private_t;
static char limit_sql[] =
@@ -295,7 +299,7 @@
{
switch_channel_t *channel = switch_core_session_get_channel(session);
switch_channel_state_t state = switch_channel_get_state(channel);
- switch_hash_t *channel_hash = switch_channel_get_private(channel, "limit_hash");
+ limit_hash_private_t *pvt = switch_channel_get_private(channel, "limit_hash");
/* The call is either hung up, or is going back into the dialplan, decrement appropriate couters */
if (state == CS_HANGUP || state == CS_ROUTING) {
@@ -303,7 +307,8 @@
switch_mutex_lock(globals.limit_hash_mutex);
/* Loop through the channel's hashtable which contains mapping to all the limit_hash_item_t referenced by that channel */
- for(hi = switch_hash_first(NULL, channel_hash); hi; hi = switch_hash_next(hi))
+ //for(hi = switch_hash_first(NULL, pvt->hash); hi; hi = switch_hash_next(hi))
+ while((hi = switch_hash_first(NULL, pvt->hash)))
{
void *val = NULL;
const void *key;
@@ -316,9 +321,21 @@
/* We keep the structure even though the count is 0 so we do not allocate too often */
item->total_usage--;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Usage for %s is now %d\n", (const char*)key, item->total_usage);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Usage for %s is now %d\n", (const char*)key, item->total_usage);
+
+ if (item->total_usage == 0) {
+ /* Noone is using this item anymore */
+ switch_core_hash_delete(globals.limit_hash, (const char*)key);
+ free(item);
+ }
+
+ switch_core_hash_delete(pvt->hash, (const char*)key);
}
+
+ /* Remove handler */
switch_core_event_hook_remove_state_change(session, hash_state_handler);
+ pvt->have_state_handler = 0;
+
switch_mutex_unlock(globals.limit_hash_mutex);
}
@@ -812,9 +829,8 @@
limit_hash_item_t *item = NULL;
switch_channel_t *channel = switch_core_session_get_channel(session);
time_t now = switch_epoch_time_now(NULL);
- switch_hash_t *channel_hash = NULL;
+ limit_hash_private_t *pvt = NULL;
uint8_t increment = 1;
- uint8_t new_channel = 0;
/* Parse application data */
if (!switch_strlen_zero(data)) {
@@ -857,22 +873,25 @@
/* Check if that realm+id has ever been checked */
if (!(item = (limit_hash_item_t*)switch_core_hash_find(globals.limit_hash, hashkey))) {
/* No, create an empty structure and add it, then continue like as if it existed */
- item = (limit_hash_item_t*)switch_core_alloc(globals.pool, sizeof(limit_hash_item_t));
+ item = (limit_hash_item_t*)malloc(sizeof(limit_hash_item_t));
memset(item, 0, sizeof(limit_hash_item_t));
switch_core_hash_insert(globals.limit_hash, hashkey, item);
}
/* Did we already run on this channel before? */
- if ((channel_hash = switch_channel_get_private(channel, "limit_hash")))
+ if ((pvt = switch_channel_get_private(channel, "limit_hash")))
{
/* Yes, but check if we did that realm+id
If we didnt, allow incrementing the counter.
If we did, dont touch it but do the validation anyways
*/
- increment = !switch_core_hash_find(channel_hash, hashkey);
+ increment = !switch_core_hash_find(pvt->hash, hashkey);
} else {
/* This is the first limit check on this channel, create a hashtable, set our prviate data and add a state handler */
- new_channel = 1;
+ pvt = (limit_hash_private_t*)switch_core_session_alloc(session, sizeof(limit_hash_private_t));
+ memset(pvt, 0, sizeof(limit_hash_private_t));
+ switch_core_hash_init(&pvt->hash, switch_core_session_get_pool(session));
+ switch_channel_set_private(channel, "limit_hash", pvt);
}
if (interval > 0) {
@@ -885,22 +904,29 @@
if ((max >= 0) && (item->rate_usage > (uint32_t)max)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Usage for %s exceeds maximum rate of %d/%ds, now at %d\n", hashkey, max, interval, item->rate_usage);
- switch_ivr_session_transfer(session, xfer_exten, argv[4], argv[5]);
+ if (*xfer_exten == '!') {
+ switch_channel_hangup(channel, switch_channel_str2cause(xfer_exten+1));
+ } else {
+ switch_ivr_session_transfer(session, xfer_exten, argv[4], argv[5]);
+ }
goto end;
}
}
} else if ((max >= 0) && (item->total_usage + increment > (uint32_t)max)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Usage for %s is already at max value (%d)\n", hashkey, item->total_usage);
- switch_ivr_session_transfer(session, xfer_exten, argv[4], argv[5]);
+ if (*xfer_exten == '!') {
+ switch_channel_hangup(channel, switch_channel_str2cause(xfer_exten+1));
+ } else {
+ switch_ivr_session_transfer(session, xfer_exten, argv[4], argv[5]);
+ }
goto end;
}
if (increment) {
item->total_usage++;
- if (!new_channel) {
- switch_core_hash_insert(channel_hash, hashkey, item);
- }
+
+ switch_core_hash_insert(pvt->hash, hashkey, item);
if (max == -1) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Usage for %s is now %d\n", hashkey, item->total_usage);
@@ -915,11 +941,9 @@
switch_channel_set_variable(channel, "limit_usage", switch_core_session_sprintf(session, "%d", item->total_usage));
switch_channel_set_variable(channel, "limit_rate", switch_core_session_sprintf(session, "%d", item->rate_usage));
- if (new_channel) {
- switch_core_hash_init(&channel_hash, switch_core_session_get_pool(session));
- switch_core_hash_insert(channel_hash, hashkey, item);
- switch_channel_set_private(channel, "limit_hash", channel_hash);
+ if (!pvt->have_state_handler) {
switch_core_event_hook_add_state_change(session, hash_state_handler);
+ pvt->have_state_handler = 1;
}
end:
1
0
Author: mikej
Date: Mon Feb 2 17:04:08 2009
New Revision: 11603
Log:
fail configure if you don't have a working c++ compiler
Modified:
freeswitch/trunk/configure.in
Modified: freeswitch/trunk/configure.in
==============================================================================
--- freeswitch/trunk/configure.in (original)
+++ freeswitch/trunk/configure.in Mon Feb 2 17:04:08 2009
@@ -53,6 +53,18 @@
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
+
+#check if the g++ compiler works
+AC_CACHE_CHECK([whether the C++ compiler works], [ac_cv_sys_cxx_works], [
+ AC_LANG_PUSH([C++])
+ AC_COMPILE_IFELSE([int main() { }], [ac_cv_sys_cxx_works=yes],
+ [ac_cv_sys_cxx_works=no])
+ AC_LANG_POP([C++])
+ ])
+[ if [ "x$ac_cv_sys_cxx_works" = "xno" ]; then ]
+ AC_MSG_FAILURE([The C++ compiler does not work. Please (re)install the C++ compiler])
+[ fi ]
+
AC_PROG_AWK
AC_PROG_MAKE_SET
AC_PROG_INSTALL
1
0
02 Feb '09
Author: mikej
Date: Mon Feb 2 15:36:29 2009
New Revision: 11602
Log:
fix windows build issues from snapshot spandsp-20090131
Modified:
freeswitch/trunk/libs/spandsp/src/adsi.c
freeswitch/trunk/libs/spandsp/src/async.c
freeswitch/trunk/libs/spandsp/src/at_interpreter.c
freeswitch/trunk/libs/spandsp/src/awgn.c
freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c
freeswitch/trunk/libs/spandsp/src/bert.c
freeswitch/trunk/libs/spandsp/src/bit_operations.c
freeswitch/trunk/libs/spandsp/src/complex_filters.c
freeswitch/trunk/libs/spandsp/src/complex_vector_float.c
freeswitch/trunk/libs/spandsp/src/complex_vector_int.c
freeswitch/trunk/libs/spandsp/src/crc.c
freeswitch/trunk/libs/spandsp/src/dds_float.c
freeswitch/trunk/libs/spandsp/src/dds_int.c
freeswitch/trunk/libs/spandsp/src/dtmf.c
freeswitch/trunk/libs/spandsp/src/echo.c
freeswitch/trunk/libs/spandsp/src/fax.c
freeswitch/trunk/libs/spandsp/src/fsk.c
freeswitch/trunk/libs/spandsp/src/g711.c
freeswitch/trunk/libs/spandsp/src/g722.c
freeswitch/trunk/libs/spandsp/src/g726.c
freeswitch/trunk/libs/spandsp/src/gsm0610_decode.c
freeswitch/trunk/libs/spandsp/src/gsm0610_encode.c
freeswitch/trunk/libs/spandsp/src/hdlc.c
freeswitch/trunk/libs/spandsp/src/ima_adpcm.c
freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj
freeswitch/trunk/libs/spandsp/src/logging.c
freeswitch/trunk/libs/spandsp/src/lpc10_decode.c
freeswitch/trunk/libs/spandsp/src/lpc10_encode.c
freeswitch/trunk/libs/spandsp/src/modem_connect_tones.c
freeswitch/trunk/libs/spandsp/src/modem_echo.c
freeswitch/trunk/libs/spandsp/src/msvc/config.h
freeswitch/trunk/libs/spandsp/src/msvc/spandsp.h
freeswitch/trunk/libs/spandsp/src/msvc/vc8proj.head
freeswitch/trunk/libs/spandsp/src/noise.c
freeswitch/trunk/libs/spandsp/src/oki_adpcm.c
freeswitch/trunk/libs/spandsp/src/playout.c
freeswitch/trunk/libs/spandsp/src/plc.c
freeswitch/trunk/libs/spandsp/src/power_meter.c
freeswitch/trunk/libs/spandsp/src/queue.c
freeswitch/trunk/libs/spandsp/src/schedule.c
freeswitch/trunk/libs/spandsp/src/sig_tone.c
freeswitch/trunk/libs/spandsp/src/silence_gen.c
freeswitch/trunk/libs/spandsp/src/spandsp/adsi.h
freeswitch/trunk/libs/spandsp/src/spandsp/async.h
freeswitch/trunk/libs/spandsp/src/spandsp/at_interpreter.h
freeswitch/trunk/libs/spandsp/src/spandsp/awgn.h
freeswitch/trunk/libs/spandsp/src/spandsp/bell_r2_mf.h
freeswitch/trunk/libs/spandsp/src/spandsp/bert.h
freeswitch/trunk/libs/spandsp/src/spandsp/complex_filters.h
freeswitch/trunk/libs/spandsp/src/spandsp/dtmf.h
freeswitch/trunk/libs/spandsp/src/spandsp/echo.h
freeswitch/trunk/libs/spandsp/src/spandsp/fax.h
freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h
freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h
freeswitch/trunk/libs/spandsp/src/spandsp/g711.h
freeswitch/trunk/libs/spandsp/src/spandsp/g722.h
freeswitch/trunk/libs/spandsp/src/spandsp/g726.h
freeswitch/trunk/libs/spandsp/src/spandsp/gsm0610.h
freeswitch/trunk/libs/spandsp/src/spandsp/hdlc.h
freeswitch/trunk/libs/spandsp/src/spandsp/ima_adpcm.h
freeswitch/trunk/libs/spandsp/src/spandsp/lpc10.h
freeswitch/trunk/libs/spandsp/src/spandsp/modem_connect_tones.h
freeswitch/trunk/libs/spandsp/src/spandsp/modem_echo.h
freeswitch/trunk/libs/spandsp/src/spandsp/noise.h
freeswitch/trunk/libs/spandsp/src/spandsp/oki_adpcm.h
freeswitch/trunk/libs/spandsp/src/spandsp/playout.h
freeswitch/trunk/libs/spandsp/src/spandsp/plc.h
freeswitch/trunk/libs/spandsp/src/spandsp/power_meter.h
freeswitch/trunk/libs/spandsp/src/spandsp/queue.h
freeswitch/trunk/libs/spandsp/src/spandsp/schedule.h
freeswitch/trunk/libs/spandsp/src/spandsp/sig_tone.h
freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h
freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_rx.h
freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_tx.h
freeswitch/trunk/libs/spandsp/src/spandsp/t30.h
freeswitch/trunk/libs/spandsp/src/spandsp/t30_api.h
freeswitch/trunk/libs/spandsp/src/spandsp/t30_logging.h
freeswitch/trunk/libs/spandsp/src/spandsp/t31.h
freeswitch/trunk/libs/spandsp/src/spandsp/t38_core.h
freeswitch/trunk/libs/spandsp/src/spandsp/t38_gateway.h
freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h
freeswitch/trunk/libs/spandsp/src/spandsp/t38_terminal.h
freeswitch/trunk/libs/spandsp/src/spandsp/t4.h
freeswitch/trunk/libs/spandsp/src/spandsp/telephony.h
freeswitch/trunk/libs/spandsp/src/spandsp/time_scale.h
freeswitch/trunk/libs/spandsp/src/spandsp/tone_generate.h
freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h
freeswitch/trunk/libs/spandsp/src/spandsp/v17tx.h
freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h
freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h
freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_tx.h
freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h
freeswitch/trunk/libs/spandsp/src/spandsp/v29tx.h
freeswitch/trunk/libs/spandsp/src/spandsp/v42.h
freeswitch/trunk/libs/spandsp/src/spandsp/v42bis.h
freeswitch/trunk/libs/spandsp/src/spandsp/v8.h
freeswitch/trunk/libs/spandsp/src/super_tone_rx.c
freeswitch/trunk/libs/spandsp/src/super_tone_tx.c
freeswitch/trunk/libs/spandsp/src/t30.c
freeswitch/trunk/libs/spandsp/src/t30_api.c
freeswitch/trunk/libs/spandsp/src/t30_logging.c
freeswitch/trunk/libs/spandsp/src/t31.c
freeswitch/trunk/libs/spandsp/src/t35.c
freeswitch/trunk/libs/spandsp/src/t38_core.c
freeswitch/trunk/libs/spandsp/src/t38_gateway.c
freeswitch/trunk/libs/spandsp/src/t38_non_ecm_buffer.c
freeswitch/trunk/libs/spandsp/src/t38_terminal.c
freeswitch/trunk/libs/spandsp/src/t4.c
freeswitch/trunk/libs/spandsp/src/time_scale.c
freeswitch/trunk/libs/spandsp/src/tone_detect.c
freeswitch/trunk/libs/spandsp/src/tone_generate.c
freeswitch/trunk/libs/spandsp/src/v17rx.c
freeswitch/trunk/libs/spandsp/src/v17tx.c
freeswitch/trunk/libs/spandsp/src/v22bis_rx.c
freeswitch/trunk/libs/spandsp/src/v22bis_tx.c
freeswitch/trunk/libs/spandsp/src/v27ter_rx.c
freeswitch/trunk/libs/spandsp/src/v27ter_tx.c
freeswitch/trunk/libs/spandsp/src/v29rx.c
freeswitch/trunk/libs/spandsp/src/v29tx.c
freeswitch/trunk/libs/spandsp/src/v42.c
freeswitch/trunk/libs/spandsp/src/v42bis.c
freeswitch/trunk/libs/spandsp/src/v8.c
freeswitch/trunk/libs/spandsp/src/vector_float.c
freeswitch/trunk/libs/spandsp/src/vector_int.c
Modified: freeswitch/trunk/libs/spandsp/src/adsi.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/adsi.c (original)
+++ freeswitch/trunk/libs/spandsp/src/adsi.c Mon Feb 2 15:36:29 2009
@@ -392,7 +392,7 @@
}
/*- End of function --------------------------------------------------------*/
-int adsi_rx(adsi_rx_state_t *s, const int16_t *amp, int len)
+SPAN_DECLARE(int) adsi_rx(adsi_rx_state_t *s, const int16_t *amp, int len)
{
switch (s->standard)
{
@@ -411,7 +411,7 @@
}
/*- End of function --------------------------------------------------------*/
-adsi_rx_state_t *adsi_rx_init(adsi_rx_state_t *s,
+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)
@@ -448,14 +448,14 @@
}
/*- End of function --------------------------------------------------------*/
-int adsi_rx_free(adsi_rx_state_t *s)
+SPAN_DECLARE(int) adsi_rx_free(adsi_rx_state_t *s)
{
free(s);
return 0;
}
/*- End of function --------------------------------------------------------*/
-int adsi_tx(adsi_tx_state_t *s, int16_t *amp, int max_len)
+SPAN_DECLARE(int) adsi_tx(adsi_tx_state_t *s, int16_t *amp, int max_len)
{
int len;
int lenx;
@@ -483,13 +483,13 @@
}
/*- End of function --------------------------------------------------------*/
-void adsi_tx_send_alert_tone(adsi_tx_state_t *s)
+SPAN_DECLARE(void) adsi_tx_send_alert_tone(adsi_tx_state_t *s)
{
tone_gen_init(&(s->alert_tone_gen), &(s->alert_tone_desc));
}
/*- End of function --------------------------------------------------------*/
-void adsi_tx_set_preamble(adsi_tx_state_t *s,
+SPAN_DECLARE(void) adsi_tx_set_preamble(adsi_tx_state_t *s,
int preamble_len,
int preamble_ones_len,
int postamble_ones_len,
@@ -542,7 +542,7 @@
}
/*- End of function --------------------------------------------------------*/
-int adsi_tx_put_message(adsi_tx_state_t *s, const uint8_t *msg, int len)
+SPAN_DECLARE(int) adsi_tx_put_message(adsi_tx_state_t *s, const uint8_t *msg, int len)
{
int i;
int j;
@@ -631,7 +631,7 @@
}
/*- End of function --------------------------------------------------------*/
-adsi_tx_state_t *adsi_tx_init(adsi_tx_state_t *s, int standard)
+SPAN_DECLARE(adsi_tx_state_t *) adsi_tx_init(adsi_tx_state_t *s, int standard)
{
if (s == NULL)
{
@@ -657,7 +657,7 @@
}
/*- End of function --------------------------------------------------------*/
-int adsi_tx_free(adsi_tx_state_t *s)
+SPAN_DECLARE(int) adsi_tx_free(adsi_tx_state_t *s)
{
free(s);
return 0;
@@ -846,7 +846,7 @@
}
/*- End of function --------------------------------------------------------*/
-int adsi_next_field(adsi_rx_state_t *s, const uint8_t *msg, int msg_len, int pos, uint8_t *field_type, uint8_t const **field_body, int *field_len)
+SPAN_DECLARE(int) adsi_next_field(adsi_rx_state_t *s, const uint8_t *msg, int msg_len, int pos, uint8_t *field_type, uint8_t const **field_body, int *field_len)
{
int i;
@@ -966,7 +966,7 @@
}
/*- End of function --------------------------------------------------------*/
-int adsi_add_field(adsi_tx_state_t *s, uint8_t *msg, int len, uint8_t field_type, uint8_t const *field_body, int field_len)
+SPAN_DECLARE(int) adsi_add_field(adsi_tx_state_t *s, uint8_t *msg, int len, uint8_t field_type, uint8_t const *field_body, int field_len)
{
int i;
int x;
@@ -1068,7 +1068,7 @@
}
/*- End of function --------------------------------------------------------*/
-const char *adsi_standard_to_str(int standard)
+SPAN_DECLARE(const char *) adsi_standard_to_str(int standard)
{
switch (standard)
{
Modified: freeswitch/trunk/libs/spandsp/src/async.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/async.c (original)
+++ freeswitch/trunk/libs/spandsp/src/async.c Mon Feb 2 15:36:29 2009
@@ -41,7 +41,7 @@
#include "spandsp/private/async.h"
-const char *signal_status_to_str(int status)
+SPAN_DECLARE(const char *) signal_status_to_str(int status)
{
switch (status)
{
@@ -72,7 +72,7 @@
}
/*- End of function --------------------------------------------------------*/
-async_rx_state_t *async_rx_init(async_rx_state_t *s,
+SPAN_DECLARE(async_rx_state_t *) async_rx_init(async_rx_state_t *s,
int data_bits,
int parity,
int stop_bits,
@@ -184,7 +184,7 @@
}
/*- End of function --------------------------------------------------------*/
-async_tx_state_t *async_tx_init(async_tx_state_t *s,
+SPAN_DECLARE(async_tx_state_t *) async_tx_init(async_tx_state_t *s,
int data_bits,
int parity,
int stop_bits,
Modified: freeswitch/trunk/libs/spandsp/src/at_interpreter.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/at_interpreter.c (original)
+++ freeswitch/trunk/libs/spandsp/src/at_interpreter.c Mon Feb 2 15:36:29 2009
@@ -138,7 +138,7 @@
"+FRH:3"
};
-void at_set_at_rx_mode(at_state_t *s, int new_mode)
+SPAN_DECLARE(void) at_set_at_rx_mode(at_state_t *s, int new_mode)
{
/* The use of a DTE timeout is mode dependent. Set the timeout appropriately in
the modem. */
@@ -156,7 +156,7 @@
}
/*- End of function --------------------------------------------------------*/
-void at_put_response(at_state_t *s, const char *t)
+SPAN_DECLARE(void) at_put_response(at_state_t *s, const char *t)
{
uint8_t buf[3];
@@ -170,7 +170,7 @@
}
/*- End of function --------------------------------------------------------*/
-void at_put_numeric_response(at_state_t *s, int val)
+SPAN_DECLARE(void) at_put_numeric_response(at_state_t *s, int val)
{
char buf[20];
@@ -179,7 +179,7 @@
}
/*- End of function --------------------------------------------------------*/
-void at_put_response_code(at_state_t *s, int code)
+SPAN_DECLARE(void) at_put_response_code(at_state_t *s, int code)
{
uint8_t buf[20];
@@ -211,7 +211,7 @@
}
/*- End of function --------------------------------------------------------*/
-void at_call_event(at_state_t *s, int event)
+SPAN_DECLARE(void) at_call_event(at_state_t *s, int event)
{
span_log(&s->logging, SPAN_LOG_FLOW, "Call event %d received\n", event);
switch (event)
@@ -311,7 +311,7 @@
}
/*- End of function --------------------------------------------------------*/
-void at_reset_call_info(at_state_t *s)
+SPAN_DECLARE(void) at_reset_call_info(at_state_t *s)
{
at_call_id_t *call_id;
at_call_id_t *next;
@@ -327,7 +327,7 @@
}
/*- End of function --------------------------------------------------------*/
-void at_set_call_info(at_state_t *s, char const *id, char const *value)
+SPAN_DECLARE(void) at_set_call_info(at_state_t *s, char const *id, char const *value)
{
at_call_id_t *new_call_id;
at_call_id_t *call_id;
@@ -355,7 +355,7 @@
}
/*- End of function --------------------------------------------------------*/
-void at_display_call_info(at_state_t *s)
+SPAN_DECLARE(void) at_display_call_info(at_state_t *s)
{
char buf[132 + 1];
at_call_id_t *call_id = s->call_id;
@@ -5143,7 +5143,7 @@
}
/*- End of function --------------------------------------------------------*/
-int at_modem_control(at_state_t *s, int op, const char *num)
+SPAN_DECLARE(int) at_modem_control(at_state_t *s, int op, const char *num)
{
switch (op)
{
@@ -5177,7 +5177,7 @@
}
/*- End of function --------------------------------------------------------*/
-void at_interpreter(at_state_t *s, const char *cmd, int len)
+SPAN_DECLARE(void) at_interpreter(at_state_t *s, const char *cmd, int len)
{
int i;
int c;
@@ -5284,14 +5284,14 @@
}
/*- End of function --------------------------------------------------------*/
-void at_set_class1_handler(at_state_t *s, at_class1_handler_t handler, void *user_data)
+SPAN_DECLARE(void) at_set_class1_handler(at_state_t *s, at_class1_handler_t handler, void *user_data)
{
s->class1_handler = handler;
s->class1_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
-at_state_t *at_init(at_state_t *s,
+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,
@@ -5318,7 +5318,7 @@
}
/*- End of function --------------------------------------------------------*/
-int at_free(at_state_t *s)
+SPAN_DECLARE(int) at_free(at_state_t *s)
{
at_reset_call_info(s);
if (s->local_id)
Modified: freeswitch/trunk/libs/spandsp/src/awgn.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/awgn.c (original)
+++ freeswitch/trunk/libs/spandsp/src/awgn.c Mon Feb 2 15:36:29 2009
@@ -95,13 +95,13 @@
}
/*- End of function --------------------------------------------------------*/
-awgn_state_t *awgn_init_dbm0(awgn_state_t *s, int idum, float level)
+SPAN_DECLARE(awgn_state_t *) awgn_init_dbm0(awgn_state_t *s, int idum, float level)
{
return awgn_init_dbov(s, idum, level - DBM0_MAX_POWER);
}
/*- End of function --------------------------------------------------------*/
-awgn_state_t *awgn_init_dbov(awgn_state_t *s, int idum, float level)
+SPAN_DECLARE(awgn_state_t *) awgn_init_dbov(awgn_state_t *s, int idum, float level)
{
int j;
@@ -133,7 +133,7 @@
}
/*- End of function --------------------------------------------------------*/
-int16_t awgn(awgn_state_t *s)
+SPAN_DECLARE(int16_t) awgn(awgn_state_t *s)
{
double fac;
double r;
Modified: freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c (original)
+++ freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c Mon Feb 2 15:36:29 2009
@@ -276,7 +276,7 @@
}
/*- End of function --------------------------------------------------------*/
-int bell_mf_tx(bell_mf_tx_state_t *s, int16_t amp[], int max_samples)
+SPAN_DECLARE(int) bell_mf_tx(bell_mf_tx_state_t *s, int16_t amp[], int max_samples)
{
int len;
const char *cp;
@@ -300,7 +300,7 @@
}
/*- End of function --------------------------------------------------------*/
-int bell_mf_tx_put(bell_mf_tx_state_t *s, const char *digits, int len)
+SPAN_DECLARE(int) bell_mf_tx_put(bell_mf_tx_state_t *s, const char *digits, int len)
{
size_t space;
@@ -320,7 +320,7 @@
}
/*- End of function --------------------------------------------------------*/
-bell_mf_tx_state_t *bell_mf_tx_init(bell_mf_tx_state_t *s)
+SPAN_DECLARE(bell_mf_tx_state_t *) bell_mf_tx_init(bell_mf_tx_state_t *s)
{
if (s == NULL)
{
@@ -339,14 +339,14 @@
}
/*- End of function --------------------------------------------------------*/
-int bell_mf_tx_free(bell_mf_tx_state_t *s)
+SPAN_DECLARE(int) bell_mf_tx_free(bell_mf_tx_state_t *s)
{
free(s);
return 0;
}
/*- End of function --------------------------------------------------------*/
-int r2_mf_tx(r2_mf_tx_state_t *s, int16_t amp[], int samples)
+SPAN_DECLARE(int) r2_mf_tx(r2_mf_tx_state_t *s, int16_t amp[], int samples)
{
int len;
@@ -363,7 +363,7 @@
}
/*- End of function --------------------------------------------------------*/
-int r2_mf_tx_put(r2_mf_tx_state_t *s, char digit)
+SPAN_DECLARE(int) r2_mf_tx_put(r2_mf_tx_state_t *s, char digit)
{
char *cp;
@@ -383,7 +383,7 @@
}
/*- End of function --------------------------------------------------------*/
-r2_mf_tx_state_t *r2_mf_tx_init(r2_mf_tx_state_t *s, int fwd)
+SPAN_DECLARE(r2_mf_tx_state_t *) r2_mf_tx_init(r2_mf_tx_state_t *s, int fwd)
{
int i;
const mf_digit_tones_t *tones;
@@ -436,14 +436,14 @@
}
/*- End of function --------------------------------------------------------*/
-int r2_mf_tx_free(r2_mf_tx_state_t *s)
+SPAN_DECLARE(int) r2_mf_tx_free(r2_mf_tx_state_t *s)
{
free(s);
return 0;
}
/*- End of function --------------------------------------------------------*/
-int bell_mf_rx(bell_mf_rx_state_t *s, const int16_t amp[], int samples)
+SPAN_DECLARE(int) bell_mf_rx(bell_mf_rx_state_t *s, const int16_t amp[], int samples)
{
#if defined(SPANDSP_USE_FIXED_POINT)
int32_t energy[6];
@@ -596,7 +596,7 @@
}
/*- End of function --------------------------------------------------------*/
-size_t bell_mf_rx_get(bell_mf_rx_state_t *s, char *buf, int max)
+SPAN_DECLARE(size_t) bell_mf_rx_get(bell_mf_rx_state_t *s, char *buf, int max)
{
if (max > s->current_digits)
max = s->current_digits;
@@ -611,7 +611,7 @@
}
/*- End of function --------------------------------------------------------*/
-bell_mf_rx_state_t *bell_mf_rx_init(bell_mf_rx_state_t *s,
+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)
{
@@ -650,14 +650,14 @@
}
/*- End of function --------------------------------------------------------*/
-int bell_mf_rx_free(bell_mf_rx_state_t *s)
+SPAN_DECLARE(int) bell_mf_rx_free(bell_mf_rx_state_t *s)
{
free(s);
return 0;
}
/*- End of function --------------------------------------------------------*/
-int r2_mf_rx(r2_mf_rx_state_t *s, const int16_t amp[], int samples)
+SPAN_DECLARE(int) r2_mf_rx(r2_mf_rx_state_t *s, const int16_t amp[], int samples)
{
#if defined(SPANDSP_USE_FIXED_POINT)
int32_t energy[6];
@@ -778,13 +778,13 @@
}
/*- End of function --------------------------------------------------------*/
-int r2_mf_rx_get(r2_mf_rx_state_t *s)
+SPAN_DECLARE(int) r2_mf_rx_get(r2_mf_rx_state_t *s)
{
return s->current_digit;
}
/*- End of function --------------------------------------------------------*/
-r2_mf_rx_state_t *r2_mf_rx_init(r2_mf_rx_state_t *s,
+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)
@@ -828,7 +828,7 @@
}
/*- End of function --------------------------------------------------------*/
-int r2_mf_rx_free(r2_mf_rx_state_t *s)
+SPAN_DECLARE(int) r2_mf_rx_free(r2_mf_rx_state_t *s)
{
free(s);
return 0;
Modified: freeswitch/trunk/libs/spandsp/src/bert.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/bert.c (original)
+++ freeswitch/trunk/libs/spandsp/src/bert.c Mon Feb 2 15:36:29 2009
@@ -47,7 +47,7 @@
static const char *qbf = "VoyeZ Le BricK GeanT QuE J'ExaminE PreS Du WharF 123 456 7890 + - * : = $ % ( )"
"ThE QuicK BrowN FoX JumpS OveR ThE LazY DoG 123 456 7890 + - * : = $ % ( )";
-const char *bert_event_to_str(int event)
+SPAN_DECLARE(const char *) bert_event_to_str(int event)
{
switch (event)
{
@@ -76,7 +76,7 @@
}
/*- End of function --------------------------------------------------------*/
-int bert_get_bit(bert_state_t *s)
+SPAN_DECLARE(int) bert_get_bit(bert_state_t *s)
{
int bit;
@@ -183,7 +183,7 @@
}
/*- End of function --------------------------------------------------------*/
-void bert_put_bit(bert_state_t *s, int bit)
+SPAN_DECLARE(void) bert_put_bit(bert_state_t *s, int bit)
{
if (bit < 0)
{
@@ -324,7 +324,7 @@
}
/*- End of function --------------------------------------------------------*/
-int bert_result(bert_state_t *s, bert_results_t *results)
+SPAN_DECLARE(int) bert_result(bert_state_t *s, bert_results_t *results)
{
results->total_bits = s->results.total_bits;
results->bad_bits = s->results.bad_bits;
@@ -333,7 +333,7 @@
}
/*- End of function --------------------------------------------------------*/
-void bert_set_report(bert_state_t *s, int freq, bert_report_func_t reporter, void *user_data)
+SPAN_DECLARE(void) bert_set_report(bert_state_t *s, int freq, bert_report_func_t reporter, void *user_data)
{
s->report_frequency = freq;
s->reporter = reporter;
@@ -343,7 +343,7 @@
}
/*- End of function --------------------------------------------------------*/
-bert_state_t *bert_init(bert_state_t *s, int limit, int pattern, int resync_len, int resync_percent)
+SPAN_DECLARE(bert_state_t *) bert_init(bert_state_t *s, int limit, int pattern, int resync_len, int resync_percent)
{
int i;
int j;
Modified: freeswitch/trunk/libs/spandsp/src/bit_operations.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/bit_operations.c (original)
+++ freeswitch/trunk/libs/spandsp/src/bit_operations.c Mon Feb 2 15:36:29 2009
@@ -41,7 +41,7 @@
#include "spandsp/telephony.h"
#include "spandsp/bit_operations.h"
-uint16_t bit_reverse16(uint16_t x)
+SPAN_DECLARE(uint16_t) bit_reverse16(uint16_t x)
{
x = (x >> 8) | (x << 8);
x = ((x & 0xF0F0) >> 4) | ((x & 0x0F0F) << 4);
@@ -50,7 +50,7 @@
}
/*- End of function --------------------------------------------------------*/
-uint32_t bit_reverse32(uint32_t x)
+SPAN_DECLARE(uint32_t) bit_reverse32(uint32_t x)
{
x = (x >> 16) | (x << 16);
x = ((x & 0xFF00FF00) >> 8) | ((x & 0x00FF00FF) << 8);
@@ -60,7 +60,7 @@
}
/*- End of function --------------------------------------------------------*/
-uint32_t bit_reverse_4bytes(uint32_t x)
+SPAN_DECLARE(uint32_t) bit_reverse_4bytes(uint32_t x)
{
x = ((x & 0xF0F0F0F0) >> 4) | ((x & 0x0F0F0F0F) << 4);
x = ((x & 0xCCCCCCCC) >> 2) | ((x & 0x33333333) << 2);
@@ -78,7 +78,7 @@
/*- End of function --------------------------------------------------------*/
#endif
-void bit_reverse(uint8_t to[], const uint8_t from[], int len)
+SPAN_DECLARE(void) bit_reverse(uint8_t to[], const uint8_t from[], int len)
{
#if defined(SPANDSP_MISALIGNED_ACCESS_FAILS)
int i;
@@ -138,7 +138,7 @@
}
/*- End of function --------------------------------------------------------*/
-int one_bits32(uint32_t x)
+SPAN_DECLARE(int) one_bits32(uint32_t x)
{
x = x - ((x >> 1) & 0x55555555);
/* We now have 16 2-bit counts */
@@ -158,7 +158,7 @@
}
/*- End of function --------------------------------------------------------*/
-uint32_t make_mask32(uint32_t x)
+SPAN_DECLARE(uint32_t) make_mask32(uint32_t x)
{
x |= (x >> 1);
x |= (x >> 2);
@@ -169,7 +169,7 @@
}
/*- End of function --------------------------------------------------------*/
-uint16_t make_mask16(uint16_t x)
+SPAN_DECLARE(uint16_t) make_mask16(uint16_t x)
{
x |= (x >> 1);
x |= (x >> 2);
Modified: freeswitch/trunk/libs/spandsp/src/complex_filters.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/complex_filters.c (original)
+++ freeswitch/trunk/libs/spandsp/src/complex_filters.c Mon Feb 2 15:36:29 2009
@@ -37,7 +37,7 @@
#include "spandsp/complex.h"
#include "spandsp/complex_filters.h"
-filter_t *filter_create(fspec_t *fs)
+SPAN_DECLARE(filter_t *) filter_create(fspec_t *fs)
{
int i;
filter_t *fi;
@@ -54,18 +54,18 @@
return fi;
}
-void filter_delete(filter_t *fi)
+SPAN_DECLARE(void) filter_delete(filter_t *fi)
{
if (fi)
free(fi);
}
-float filter_step(filter_t *fi, float x)
+SPAN_DECLARE(float) filter_step(filter_t *fi, float x)
{
return fi->fs->fsf(fi, x);
}
-cfilter_t *cfilter_create(fspec_t *fs)
+SPAN_DECLARE(cfilter_t *) cfilter_create(fspec_t *fs)
{
cfilter_t *cfi;
@@ -86,7 +86,7 @@
return cfi;
}
-void cfilter_delete(cfilter_t *cfi)
+SPAN_DECLARE(void) cfilter_delete(cfilter_t *cfi)
{
if (cfi)
{
@@ -95,7 +95,7 @@
}
}
-complexf_t cfilter_step(cfilter_t *cfi, const complexf_t *z)
+SPAN_DECLARE(complexf_t) cfilter_step(cfilter_t *cfi, const complexf_t *z)
{
complexf_t cc;
Modified: freeswitch/trunk/libs/spandsp/src/complex_vector_float.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/complex_vector_float.c (original)
+++ freeswitch/trunk/libs/spandsp/src/complex_vector_float.c Mon Feb 2 15:36:29 2009
@@ -76,7 +76,7 @@
#include "spandsp/complex_vector_float.h"
#if defined(__GNUC__) && defined(SPANDSP_USE_SSE3)
-void cvec_mulf(complexf_t z[], const complexf_t x[], const complexf_t y[], int n)
+SPAN_DECLARE(void) cvec_mulf(complexf_t z[], const complexf_t x[], const complexf_t y[], int n)
{
int i;
__m128 n0;
@@ -109,7 +109,7 @@
}
}
#else
-void cvec_mulf(complexf_t z[], const complexf_t x[], const complexf_t y[], int n)
+SPAN_DECLARE(void) cvec_mulf(complexf_t z[], const complexf_t x[], const complexf_t y[], int n)
{
int i;
@@ -122,7 +122,7 @@
#endif
/*- End of function --------------------------------------------------------*/
-void cvec_mul(complex_t z[], const complex_t x[], const complex_t y[], int n)
+SPAN_DECLARE(void) cvec_mul(complex_t z[], const complex_t x[], const complex_t y[], int n)
{
int i;
@@ -148,7 +148,7 @@
/*- End of function --------------------------------------------------------*/
#endif
-complexf_t cvec_dot_prodf(const complexf_t x[], const complexf_t y[], int n)
+SPAN_DECLARE(complexf_t) cvec_dot_prodf(const complexf_t x[], const complexf_t y[], int n)
{
int i;
complexf_t z;
@@ -163,7 +163,7 @@
}
/*- End of function --------------------------------------------------------*/
-complex_t cvec_dot_prod(const complex_t x[], const complex_t y[], int n)
+SPAN_DECLARE(complex_t) cvec_dot_prod(const complex_t x[], const complex_t y[], int n)
{
int i;
complex_t z;
@@ -195,7 +195,7 @@
/*- End of function --------------------------------------------------------*/
#endif
-complexf_t cvec_circular_dot_prodf(const complexf_t x[], const complexf_t y[], int n, int pos)
+SPAN_DECLARE(complexf_t) cvec_circular_dot_prodf(const complexf_t x[], const complexf_t y[], int n, int pos)
{
complexf_t z;
complexf_t z1;
@@ -209,7 +209,7 @@
#define LMS_LEAK_RATE 0.9999f
-void cvec_lmsf(const complexf_t x[], complexf_t y[], int n, const complexf_t *error)
+SPAN_DECLARE(void) cvec_lmsf(const complexf_t x[], complexf_t y[], int n, const complexf_t *error)
{
int i;
@@ -222,7 +222,7 @@
}
/*- End of function --------------------------------------------------------*/
-void cvec_circular_lmsf(const complexf_t x[], complexf_t y[], int n, int pos, const complexf_t *error)
+SPAN_DECLARE(void) cvec_circular_lmsf(const complexf_t x[], complexf_t y[], int n, int pos, const complexf_t *error)
{
cvec_lmsf(&x[pos], &y[0], n - pos, error);
cvec_lmsf(&x[0], &y[n - pos], pos, error);
Modified: freeswitch/trunk/libs/spandsp/src/complex_vector_int.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/complex_vector_int.c (original)
+++ freeswitch/trunk/libs/spandsp/src/complex_vector_int.c Mon Feb 2 15:36:29 2009
@@ -75,7 +75,7 @@
#include "spandsp/vector_int.h"
#include "spandsp/complex_vector_int.h"
-complexi32_t cvec_dot_prodi16(const complexi16_t x[], const complexi16_t y[], int n)
+SPAN_DECLARE(complexi32_t) cvec_dot_prodi16(const complexi16_t x[], const complexi16_t y[], int n)
{
int i;
complexi32_t z;
@@ -90,7 +90,7 @@
}
/*- End of function --------------------------------------------------------*/
-complexi32_t cvec_dot_prodi32(const complexi32_t x[], const complexi32_t y[], int n)
+SPAN_DECLARE(complexi32_t) cvec_dot_prodi32(const complexi32_t x[], const complexi32_t y[], int n)
{
int i;
complexi32_t z;
@@ -105,7 +105,7 @@
}
/*- End of function --------------------------------------------------------*/
-complexi32_t cvec_circular_dot_prodi16(const complexi16_t x[], const complexi16_t y[], int n, int pos)
+SPAN_DECLARE(complexi32_t) cvec_circular_dot_prodi16(const complexi16_t x[], const complexi16_t y[], int n, int pos)
{
complexi32_t z;
complexi32_t z1;
@@ -117,7 +117,7 @@
}
/*- End of function --------------------------------------------------------*/
-void cvec_lmsi16(const complexi16_t x[], complexi16_t y[], int n, const complexi16_t *error)
+SPAN_DECLARE(void) cvec_lmsi16(const complexi16_t x[], complexi16_t y[], int n, const complexi16_t *error)
{
int i;
@@ -129,7 +129,7 @@
}
/*- End of function --------------------------------------------------------*/
-void cvec_circular_lmsi16(const complexi16_t x[], complexi16_t y[], int n, int pos, const complexi16_t *error)
+SPAN_DECLARE(void) cvec_circular_lmsi16(const complexi16_t x[], complexi16_t y[], int n, int pos, const complexi16_t *error)
{
cvec_lmsi16(&x[pos], &y[0], n - pos, error);
cvec_lmsi16(&x[0], &y[n - pos], pos, error);
Modified: freeswitch/trunk/libs/spandsp/src/crc.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/crc.c (original)
+++ freeswitch/trunk/libs/spandsp/src/crc.c Mon Feb 2 15:36:29 2009
@@ -107,7 +107,7 @@
0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
};
-uint32_t crc_itu32_calc(const uint8_t *buf, int len, uint32_t crc)
+SPAN_DECLARE(uint32_t) crc_itu32_calc(const uint8_t *buf, int len, uint32_t crc)
{
int i;
@@ -117,7 +117,7 @@
}
/*- End of function --------------------------------------------------------*/
-int crc_itu32_append(uint8_t *buf, int len)
+SPAN_DECLARE(int) crc_itu32_append(uint8_t *buf, int len)
{
uint32_t crc;
int new_len;
@@ -136,7 +136,7 @@
}
/*- End of function --------------------------------------------------------*/
-int crc_itu32_check(const uint8_t *buf, int len)
+SPAN_DECLARE(int) crc_itu32_check(const uint8_t *buf, int len)
{
uint32_t crc;
int i;
@@ -184,7 +184,7 @@
0x7BC7, 0x6A4E, 0x58D5, 0x495C, 0x3DE3, 0x2C6A, 0x1EF1, 0x0F78
};
-uint16_t crc_itu16_calc(const uint8_t *buf, int len, uint16_t crc)
+SPAN_DECLARE(uint16_t) crc_itu16_calc(const uint8_t *buf, int len, uint16_t crc)
{
int i;
@@ -194,7 +194,7 @@
}
/*- End of function --------------------------------------------------------*/
-int crc_itu16_append(uint8_t *buf, int len)
+SPAN_DECLARE(int) crc_itu16_append(uint8_t *buf, int len)
{
uint16_t crc;
int new_len;
@@ -211,7 +211,7 @@
}
/*- End of function --------------------------------------------------------*/
-int crc_itu16_check(const uint8_t *buf, int len)
+SPAN_DECLARE(int) crc_itu16_check(const uint8_t *buf, int len)
{
uint16_t crc;
int i;
Modified: freeswitch/trunk/libs/spandsp/src/dds_float.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/dds_float.c (original)
+++ freeswitch/trunk/libs/spandsp/src/dds_float.c Mon Feb 2 15:36:29 2009
@@ -2102,37 +2102,37 @@
-0.00306796f
};
-int32_t dds_phase_ratef(float frequency)
+SPAN_DECLARE(int32_t) dds_phase_ratef(float frequency)
{
return (int32_t) (frequency*65536.0f*65536.0f/SAMPLE_RATE);
}
/*- End of function --------------------------------------------------------*/
-float dds_frequencyf(int32_t phase_rate)
+SPAN_DECLARE(float) dds_frequencyf(int32_t phase_rate)
{
return (float) phase_rate*(float) SAMPLE_RATE/(65536.0f*65536.0f);
}
/*- End of function --------------------------------------------------------*/
-float dds_scaling_dbm0f(float level)
+SPAN_DECLARE(float) dds_scaling_dbm0f(float level)
{
return powf(10.0f, (level - DBM0_MAX_SINE_POWER)/20.0f)*32767.0f;
}
/*- End of function --------------------------------------------------------*/
-float dds_scaling_dbovf(float level)
+SPAN_DECLARE(float) dds_scaling_dbovf(float level)
{
return powf(10.0f, (level - DBOV_MAX_SINE_POWER)/20.0f)*32767.0f;
}
/*- End of function --------------------------------------------------------*/
-void dds_advancef(uint32_t *phase_acc, int32_t phase_rate)
+SPAN_DECLARE(void) dds_advancef(uint32_t *phase_acc, int32_t phase_rate)
{
*phase_acc += phase_rate;
}
/*- End of function --------------------------------------------------------*/
-float ddsf(uint32_t *phase_acc, int32_t phase_rate)
+SPAN_DECLARE(float) ddsf(uint32_t *phase_acc, int32_t phase_rate)
{
float amp;
@@ -2142,13 +2142,13 @@
}
/*- End of function --------------------------------------------------------*/
-float dds_lookupf(uint32_t phase)
+SPAN_DECLARE(float) dds_lookupf(uint32_t phase)
{
return sine_table[phase >> (32 - SLENK)];
}
/*- End of function --------------------------------------------------------*/
-float dds_modf(uint32_t *phase_acc, int32_t phase_rate, float scale, int32_t phase)
+SPAN_DECLARE(float) dds_modf(uint32_t *phase_acc, int32_t phase_rate, float scale, int32_t phase)
{
float amp;
@@ -2158,7 +2158,7 @@
}
/*- End of function --------------------------------------------------------*/
-complexf_t dds_complexf(uint32_t *phase_acc, int32_t phase_rate)
+SPAN_DECLARE(complexf_t) dds_complexf(uint32_t *phase_acc, int32_t phase_rate)
{
complexf_t amp;
@@ -2169,14 +2169,14 @@
}
/*- End of function --------------------------------------------------------*/
-complexf_t dds_lookup_complexf(uint32_t phase)
+SPAN_DECLARE(complexf_t) dds_lookup_complexf(uint32_t phase)
{
return complex_setf(sine_table[(phase + (1 << 30)) >> (32 - SLENK)],
sine_table[phase >> (32 - SLENK)]);
}
/*- End of function --------------------------------------------------------*/
-complexf_t dds_complex_modf(uint32_t *phase_acc, int32_t phase_rate, float scale, int32_t phase)
+SPAN_DECLARE(complexf_t) dds_complex_modf(uint32_t *phase_acc, int32_t phase_rate, float scale, int32_t phase)
{
complexf_t amp;
Modified: freeswitch/trunk/libs/spandsp/src/dds_int.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/dds_int.c (original)
+++ freeswitch/trunk/libs/spandsp/src/dds_int.c Mon Feb 2 15:36:29 2009
@@ -190,31 +190,31 @@
32767,
};
-int32_t dds_phase_rate(float frequency)
+SPAN_DECLARE(int32_t) dds_phase_rate(float frequency)
{
return (int32_t) (frequency*65536.0f*65536.0f/SAMPLE_RATE);
}
/*- End of function --------------------------------------------------------*/
-float dds_frequency(int32_t phase_rate)
+SPAN_DECLARE(float) dds_frequency(int32_t phase_rate)
{
return (float) phase_rate*(float) SAMPLE_RATE/(65536.0f*65536.0f);
}
/*- End of function --------------------------------------------------------*/
-int16_t dds_scaling_dbm0(float level)
+SPAN_DECLARE(int16_t) dds_scaling_dbm0(float level)
{
return (int16_t) (powf(10.0f, (level - DBM0_MAX_SINE_POWER)/20.0f)*32767.0f);
}
/*- End of function --------------------------------------------------------*/
-int16_t dds_scaling_dbov(float level)
+SPAN_DECLARE(int16_t) dds_scaling_dbov(float level)
{
return (int16_t) (powf(10.0f, (level - DBOV_MAX_SINE_POWER)/20.0f)*32767.0f);
}
/*- End of function --------------------------------------------------------*/
-int16_t dds_lookup(uint32_t phase)
+SPAN_DECLARE(int16_t) dds_lookup(uint32_t phase)
{
uint32_t step;
int16_t amp;
@@ -230,19 +230,19 @@
}
/*- End of function --------------------------------------------------------*/
-int16_t dds_offset(uint32_t phase_acc, int32_t phase_offset)
+SPAN_DECLARE(int16_t) dds_offset(uint32_t phase_acc, int32_t phase_offset)
{
return dds_lookup(phase_acc + phase_offset);
}
/*- End of function --------------------------------------------------------*/
-void dds_advance(uint32_t *phase_acc, int32_t phase_rate)
+SPAN_DECLARE(void) dds_advance(uint32_t *phase_acc, int32_t phase_rate)
{
*phase_acc += phase_rate;
}
/*- End of function --------------------------------------------------------*/
-int16_t dds(uint32_t *phase_acc, int32_t phase_rate)
+SPAN_DECLARE(int16_t) dds(uint32_t *phase_acc, int32_t phase_rate)
{
int16_t amp;
@@ -252,7 +252,7 @@
}
/*- End of function --------------------------------------------------------*/
-int16_t dds_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase)
+SPAN_DECLARE(int16_t) dds_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase)
{
int16_t amp;
@@ -262,13 +262,13 @@
}
/*- End of function --------------------------------------------------------*/
-complexi_t dds_lookup_complexi(uint32_t phase)
+SPAN_DECLARE(complexi_t) dds_lookup_complexi(uint32_t phase)
{
return complex_seti(dds_lookup(phase + (1 << 30)), dds_lookup(phase));
}
/*- End of function --------------------------------------------------------*/
-complexi_t dds_complexi(uint32_t *phase_acc, int32_t phase_rate)
+SPAN_DECLARE(complexi_t) dds_complexi(uint32_t *phase_acc, int32_t phase_rate)
{
complexi_t amp;
@@ -278,7 +278,7 @@
}
/*- End of function --------------------------------------------------------*/
-complexi_t dds_complexi_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase)
+SPAN_DECLARE(complexi_t) dds_complexi_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase)
{
complexi_t amp;
@@ -289,13 +289,13 @@
}
/*- End of function --------------------------------------------------------*/
-complexi16_t dds_lookup_complexi16(uint32_t phase)
+SPAN_DECLARE(complexi16_t) dds_lookup_complexi16(uint32_t phase)
{
return complex_seti16(dds_lookup(phase + (1 << 30)), dds_lookup(phase));
}
/*- End of function --------------------------------------------------------*/
-complexi16_t dds_complexi16(uint32_t *phase_acc, int32_t phase_rate)
+SPAN_DECLARE(complexi16_t) dds_complexi16(uint32_t *phase_acc, int32_t phase_rate)
{
complexi16_t amp;
@@ -305,7 +305,7 @@
}
/*- End of function --------------------------------------------------------*/
-complexi16_t dds_complexi16_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase)
+SPAN_DECLARE(complexi16_t) dds_complexi16_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase)
{
complexi16_t amp;
@@ -316,13 +316,13 @@
}
/*- End of function --------------------------------------------------------*/
-complexi32_t dds_lookup_complexi32(uint32_t phase)
+SPAN_DECLARE(complexi32_t) dds_lookup_complexi32(uint32_t phase)
{
return complex_seti32(dds_lookup(phase + (1 << 30)), dds_lookup(phase));
}
/*- End of function --------------------------------------------------------*/
-complexi32_t dds_complexi32(uint32_t *phase_acc, int32_t phase_rate)
+SPAN_DECLARE(complexi32_t) dds_complexi32(uint32_t *phase_acc, int32_t phase_rate)
{
complexi32_t amp;
@@ -332,7 +332,7 @@
}
/*- End of function --------------------------------------------------------*/
-complexi32_t dds_complexi32_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase)
+SPAN_DECLARE(complexi32_t) dds_complexi32_mod(uint32_t *phase_acc, int32_t phase_rate, int16_t scale, int32_t phase)
{
complexi32_t amp;
Modified: freeswitch/trunk/libs/spandsp/src/dtmf.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/dtmf.c (original)
+++ freeswitch/trunk/libs/spandsp/src/dtmf.c Mon Feb 2 15:36:29 2009
@@ -99,7 +99,7 @@
static int dtmf_tx_inited = FALSE;
static tone_gen_descriptor_t dtmf_digit_tones[16];
-int dtmf_rx(dtmf_rx_state_t *s, const int16_t amp[], int samples)
+SPAN_DECLARE(int) dtmf_rx(dtmf_rx_state_t *s, const int16_t amp[], int samples)
{
#if defined(SPANDSP_USE_FIXED_POINT)
int32_t row_energy[4];
@@ -296,7 +296,7 @@
}
/*- End of function --------------------------------------------------------*/
-int dtmf_rx_status(dtmf_rx_state_t *s)
+SPAN_DECLARE(int) dtmf_rx_status(dtmf_rx_state_t *s)
{
if (s->in_digit)
return s->in_digit;
@@ -306,7 +306,7 @@
}
/*- End of function --------------------------------------------------------*/
-size_t dtmf_rx_get(dtmf_rx_state_t *s, char *buf, int max)
+SPAN_DECLARE(size_t) dtmf_rx_get(dtmf_rx_state_t *s, char *buf, int max)
{
if (max > s->current_digits)
max = s->current_digits;
@@ -321,7 +321,7 @@
}
/*- End of function --------------------------------------------------------*/
-void dtmf_rx_set_realtime_callback(dtmf_rx_state_t *s,
+SPAN_DECLARE(void) dtmf_rx_set_realtime_callback(dtmf_rx_state_t *s,
tone_report_func_t callback,
void *user_data)
{
@@ -330,7 +330,7 @@
}
/*- End of function --------------------------------------------------------*/
-void dtmf_rx_parms(dtmf_rx_state_t *s,
+SPAN_DECLARE(void) dtmf_rx_parms(dtmf_rx_state_t *s,
int filter_dialtone,
int twist,
int reverse_twist,
@@ -358,7 +358,7 @@
}
/*- End of function --------------------------------------------------------*/
-dtmf_rx_state_t *dtmf_rx_init(dtmf_rx_state_t *s,
+SPAN_DECLARE(dtmf_rx_state_t *) dtmf_rx_init(dtmf_rx_state_t *s,
digits_rx_callback_t callback,
void *user_data)
{
@@ -409,7 +409,7 @@
}
/*- End of function --------------------------------------------------------*/
-int dtmf_rx_free(dtmf_rx_state_t *s)
+SPAN_DECLARE(int) dtmf_rx_free(dtmf_rx_state_t *s)
{
free(s);
return 0;
@@ -443,7 +443,7 @@
}
/*- End of function --------------------------------------------------------*/
-int dtmf_tx(dtmf_tx_state_t *s, int16_t amp[], int max_samples)
+SPAN_DECLARE(int) dtmf_tx(dtmf_tx_state_t *s, int16_t amp[], int max_samples)
{
int len;
const char *cp;
@@ -473,7 +473,7 @@
}
/*- End of function --------------------------------------------------------*/
-int dtmf_tx_put(dtmf_tx_state_t *s, const char *digits, int len)
+SPAN_DECLARE(int) dtmf_tx_put(dtmf_tx_state_t *s, const char *digits, int len)
{
size_t space;
@@ -493,21 +493,21 @@
}
/*- End of function --------------------------------------------------------*/
-void dtmf_tx_set_level(dtmf_tx_state_t *s, int level, int twist)
+SPAN_DECLARE(void) dtmf_tx_set_level(dtmf_tx_state_t *s, int level, int twist)
{
s->low_level = dds_scaling_dbm0f((float) level);
s->high_level = dds_scaling_dbm0f((float) (level + twist));
}
/*- End of function --------------------------------------------------------*/
-void dtmf_tx_set_timing(dtmf_tx_state_t *s, int on_time, int off_time)
+SPAN_DECLARE(void) dtmf_tx_set_timing(dtmf_tx_state_t *s, int on_time, int off_time)
{
s->on_time = ((on_time >= 0) ? on_time : DEFAULT_DTMF_TX_ON_TIME)*SAMPLE_RATE/1000;
s->off_time = ((off_time >= 0) ? off_time : DEFAULT_DTMF_TX_OFF_TIME)*SAMPLE_RATE/1000;
}
/*- End of function --------------------------------------------------------*/
-dtmf_tx_state_t *dtmf_tx_init(dtmf_tx_state_t *s)
+SPAN_DECLARE(dtmf_tx_state_t *) dtmf_tx_init(dtmf_tx_state_t *s)
{
if (s == NULL)
{
@@ -525,7 +525,7 @@
}
/*- End of function --------------------------------------------------------*/
-int dtmf_tx_free(dtmf_tx_state_t *s)
+SPAN_DECLARE(int) dtmf_tx_free(dtmf_tx_state_t *s)
{
free(s);
return 0;
Modified: freeswitch/trunk/libs/spandsp/src/echo.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/echo.c (original)
+++ freeswitch/trunk/libs/spandsp/src/echo.c Mon Feb 2 15:36:29 2009
@@ -237,7 +237,7 @@
}
/*- End of function --------------------------------------------------------*/
-echo_can_state_t *echo_can_create(int len, int adaption_mode)
+SPAN_DECLARE(echo_can_state_t *) echo_can_create(int len, int adaption_mode)
{
echo_can_state_t *ec;
int i;
@@ -282,7 +282,7 @@
}
/*- End of function --------------------------------------------------------*/
-void echo_can_free(echo_can_state_t *ec)
+SPAN_DECLARE(void) echo_can_free(echo_can_state_t *ec)
{
int i;
@@ -294,13 +294,13 @@
}
/*- End of function --------------------------------------------------------*/
-void echo_can_adaption_mode(echo_can_state_t *ec, int adaption_mode)
+SPAN_DECLARE(void) echo_can_adaption_mode(echo_can_state_t *ec, int adaption_mode)
{
ec->adaption_mode = adaption_mode;
}
/*- End of function --------------------------------------------------------*/
-void echo_can_flush(echo_can_state_t *ec)
+SPAN_DECLARE(void) echo_can_flush(echo_can_state_t *ec)
{
int i;
@@ -343,7 +343,7 @@
int sample_no = 0;
-void echo_can_snapshot(echo_can_state_t *ec)
+SPAN_DECLARE(void) echo_can_snapshot(echo_can_state_t *ec)
{
memcpy(ec->snapshot, ec->fir_taps16[0], ec->taps*sizeof(int16_t));
}
@@ -388,7 +388,7 @@
}
/*- End of function --------------------------------------------------------*/
-int16_t echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t rx)
+SPAN_DECLARE(int16_t) echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t rx)
{
int32_t echo_value;
int clean_rx;
@@ -603,7 +603,7 @@
}
/*- End of function --------------------------------------------------------*/
-int16_t echo_can_hpf_tx(echo_can_state_t *ec, int16_t tx)
+SPAN_DECLARE(int16_t) echo_can_hpf_tx(echo_can_state_t *ec, int16_t tx)
{
if (ec->adaption_mode & ECHO_CAN_USE_TX_HPF)
tx = echo_can_hpf(ec->tx_hpf, tx);
Modified: freeswitch/trunk/libs/spandsp/src/fax.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/fax.c (original)
+++ freeswitch/trunk/libs/spandsp/src/fax.c Mon Feb 2 15:36:29 2009
@@ -255,7 +255,7 @@
}
/*- End of function --------------------------------------------------------*/
-int fax_rx(fax_state_t *s, int16_t *amp, int len)
+SPAN_DECLARE(int) fax_rx(fax_state_t *s, int16_t *amp, int len)
{
int i;
@@ -293,7 +293,7 @@
}
/*- End of function --------------------------------------------------------*/
-int fax_tx(fax_state_t *s, int16_t *amp, int max_len)
+SPAN_DECLARE(int) fax_tx(fax_state_t *s, int16_t *amp, int max_len)
{
int len;
#if defined(LOG_FAX_AUDIO)
@@ -514,31 +514,31 @@
}
/*- End of function --------------------------------------------------------*/
-void fax_set_transmit_on_idle(fax_state_t *s, int transmit_on_idle)
+SPAN_DECLARE(void) fax_set_transmit_on_idle(fax_state_t *s, int transmit_on_idle)
{
s->modems.transmit_on_idle = transmit_on_idle;
}
/*- End of function --------------------------------------------------------*/
-void fax_set_tep_mode(fax_state_t *s, int use_tep)
+SPAN_DECLARE(void) fax_set_tep_mode(fax_state_t *s, int use_tep)
{
s->modems.use_tep = use_tep;
}
/*- End of function --------------------------------------------------------*/
-t30_state_t *fax_get_t30_state(fax_state_t *s)
+SPAN_DECLARE(t30_state_t *) fax_get_t30_state(fax_state_t *s)
{
return &s->t30;
}
/*- End of function --------------------------------------------------------*/
-logging_state_t *fax_get_logging_state(fax_state_t *s)
+SPAN_DECLARE(logging_state_t *) fax_get_logging_state(fax_state_t *s)
{
return &s->logging;
}
/*- End of function --------------------------------------------------------*/
-fax_state_t *fax_init(fax_state_t *s, int calling_party)
+SPAN_DECLARE(fax_state_t *) fax_init(fax_state_t *s, int calling_party)
{
if (s == NULL)
{
@@ -594,14 +594,14 @@
}
/*- End of function --------------------------------------------------------*/
-int fax_release(fax_state_t *s)
+SPAN_DECLARE(int) fax_release(fax_state_t *s)
{
t30_release(&s->t30);
return 0;
}
/*- End of function --------------------------------------------------------*/
-int fax_free(fax_state_t *s)
+SPAN_DECLARE(int) fax_free(fax_state_t *s)
{
t30_release(&s->t30);
free(s);
Modified: freeswitch/trunk/libs/spandsp/src/fsk.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/fsk.c (original)
+++ freeswitch/trunk/libs/spandsp/src/fsk.c Mon Feb 2 15:36:29 2009
@@ -120,7 +120,7 @@
}
};
-fsk_tx_state_t *fsk_tx_init(fsk_tx_state_t *s,
+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)
@@ -149,7 +149,7 @@
}
/*- End of function --------------------------------------------------------*/
-int fsk_tx(fsk_tx_state_t *s, int16_t amp[], int len)
+SPAN_DECLARE(int) fsk_tx(fsk_tx_state_t *s, int16_t amp[], int len)
{
int sample;
int bit;
@@ -182,27 +182,27 @@
}
/*- End of function --------------------------------------------------------*/
-void fsk_tx_power(fsk_tx_state_t *s, float power)
+SPAN_DECLARE(void) fsk_tx_power(fsk_tx_state_t *s, float power)
{
s->scaling = dds_scaling_dbm0(power);
}
/*- End of function --------------------------------------------------------*/
-void fsk_tx_set_get_bit(fsk_tx_state_t *s, get_bit_func_t get_bit, void *user_data)
+SPAN_DECLARE(void) fsk_tx_set_get_bit(fsk_tx_state_t *s, get_bit_func_t get_bit, void *user_data)
{
s->get_bit = get_bit;
s->get_bit_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
-void fsk_tx_set_modem_status_handler(fsk_tx_state_t *s, modem_tx_status_func_t handler, void *user_data)
+SPAN_DECLARE(void) fsk_tx_set_modem_status_handler(fsk_tx_state_t *s, modem_tx_status_func_t handler, void *user_data)
{
s->status_handler = handler;
s->status_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
-void fsk_rx_signal_cutoff(fsk_rx_state_t *s, float cutoff)
+SPAN_DECLARE(void) fsk_rx_signal_cutoff(fsk_rx_state_t *s, float cutoff)
{
/* The 6.04 allows for the gain of the DC blocker */
s->carrier_on_power = (int32_t) (power_meter_level_dbm0(cutoff + 2.5f - 6.04f));
@@ -210,27 +210,27 @@
}
/*- End of function --------------------------------------------------------*/
-float fsk_rx_signal_power(fsk_rx_state_t *s)
+SPAN_DECLARE(float) fsk_rx_signal_power(fsk_rx_state_t *s)
{
return power_meter_current_dbm0(&s->power);
}
/*- End of function --------------------------------------------------------*/
-void fsk_rx_set_put_bit(fsk_rx_state_t *s, put_bit_func_t put_bit, void *user_data)
+SPAN_DECLARE(void) fsk_rx_set_put_bit(fsk_rx_state_t *s, put_bit_func_t put_bit, void *user_data)
{
s->put_bit = put_bit;
s->put_bit_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
-void fsk_rx_set_modem_status_handler(fsk_rx_state_t *s, modem_tx_status_func_t handler, void *user_data)
+SPAN_DECLARE(void) fsk_rx_set_modem_status_handler(fsk_rx_state_t *s, modem_tx_status_func_t handler, void *user_data)
{
s->status_handler = handler;
s->status_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
-fsk_rx_state_t *fsk_rx_init(fsk_rx_state_t *s,
+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,
@@ -298,7 +298,7 @@
}
/*- End of function --------------------------------------------------------*/
-int fsk_rx(fsk_rx_state_t *s, const int16_t *amp, int len)
+SPAN_DECLARE(int) fsk_rx(fsk_rx_state_t *s, const int16_t *amp, int len)
{
int buf_ptr;
int baudstate;
Modified: freeswitch/trunk/libs/spandsp/src/g711.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/g711.c (original)
+++ freeswitch/trunk/libs/spandsp/src/g711.c Mon Feb 2 15:36:29 2009
@@ -85,19 +85,19 @@
214, 215, 212, 213, 218, 219, 216, 217, 207, 207, 206, 206, 210, 211, 208, 209
};
-uint8_t alaw_to_ulaw(uint8_t alaw)
+SPAN_DECLARE(uint8_t) alaw_to_ulaw(uint8_t alaw)
{
return alaw_to_ulaw_table[alaw];
}
/*- End of function --------------------------------------------------------*/
-uint8_t ulaw_to_alaw(uint8_t ulaw)
+SPAN_DECLARE(uint8_t) ulaw_to_alaw(uint8_t ulaw)
{
return ulaw_to_alaw_table[ulaw];
}
/*- End of function --------------------------------------------------------*/
-int g711_decode(g711_state_t *s,
+SPAN_DECLARE(int) g711_decode(g711_state_t *s,
int16_t amp[],
const uint8_t g711_data[],
int g711_bytes)
@@ -121,7 +121,7 @@
}
/*- End of function --------------------------------------------------------*/
-int g711_encode(g711_state_t *s,
+SPAN_DECLARE(int) g711_encode(g711_state_t *s,
uint8_t g711_data[],
const int16_t amp[],
int len)
@@ -145,7 +145,7 @@
}
/*- End of function --------------------------------------------------------*/
-int g711_transcode(g711_state_t *s,
+SPAN_DECLARE(int) g711_transcode(g711_state_t *s,
uint8_t g711_out[],
const uint8_t g711_in[],
int g711_bytes)
@@ -169,7 +169,7 @@
}
/*- End of function --------------------------------------------------------*/
-g711_state_t *g711_init(g711_state_t *s, int mode)
+SPAN_DECLARE(g711_state_t *) g711_init(g711_state_t *s, int mode)
{
if (s == NULL)
{
@@ -181,7 +181,7 @@
}
/*- End of function --------------------------------------------------------*/
-int g711_release(g711_state_t *s)
+SPAN_DECLARE(int) g711_release(g711_state_t *s)
{
free(s);
return 0;
Modified: freeswitch/trunk/libs/spandsp/src/g722.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/g722.c (original)
+++ freeswitch/trunk/libs/spandsp/src/g722.c Mon Feb 2 15:36:29 2009
@@ -254,7 +254,7 @@
}
/*- End of function --------------------------------------------------------*/
-g722_decode_state_t *g722_decode_init(g722_decode_state_t *s, int rate, int options)
+SPAN_DECLARE(g722_decode_state_t *) g722_decode_init(g722_decode_state_t *s, int rate, int options)
{
if (s == NULL)
{
@@ -280,14 +280,14 @@
}
/*- End of function --------------------------------------------------------*/
-int g722_decode_release(g722_decode_state_t *s)
+SPAN_DECLARE(int) g722_decode_release(g722_decode_state_t *s)
{
free(s);
return 0;
}
/*- End of function --------------------------------------------------------*/
-int g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[], int len)
+SPAN_DECLARE(int) g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[], int len)
{
int rlow;
int ihigh;
@@ -426,7 +426,7 @@
}
/*- End of function --------------------------------------------------------*/
-g722_encode_state_t *g722_encode_init(g722_encode_state_t *s, int rate, int options)
+SPAN_DECLARE(g722_encode_state_t *) g722_encode_init(g722_encode_state_t *s, int rate, int options)
{
if (s == NULL)
{
@@ -452,14 +452,14 @@
}
/*- End of function --------------------------------------------------------*/
-int g722_encode_release(g722_encode_state_t *s)
+SPAN_DECLARE(int) g722_encode_release(g722_encode_state_t *s)
{
free(s);
return 0;
}
/*- End of function --------------------------------------------------------*/
-int g722_encode(g722_encode_state_t *s, uint8_t g722_data[], const int16_t amp[], int len)
+SPAN_DECLARE(int) g722_encode(g722_encode_state_t *s, uint8_t g722_data[], const int16_t amp[], int len)
{
int16_t dlow;
int16_t dhigh;
Modified: freeswitch/trunk/libs/spandsp/src/g726.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/g726.c (original)
+++ freeswitch/trunk/libs/spandsp/src/g726.c Mon Feb 2 15:36:29 2009
@@ -997,7 +997,7 @@
}
/*- End of function --------------------------------------------------------*/
-g726_state_t *g726_init(g726_state_t *s, int bit_rate, int ext_coding, int packing)
+SPAN_DECLARE(g726_state_t *) g726_init(g726_state_t *s, int bit_rate, int ext_coding, int packing)
{
int i;
@@ -1057,14 +1057,14 @@
}
/*- End of function --------------------------------------------------------*/
-int g726_release(g726_state_t *s)
+SPAN_DECLARE(int) g726_release(g726_state_t *s)
{
free(s);
return 0;
}
/*- End of function --------------------------------------------------------*/
-int g726_decode(g726_state_t *s,
+SPAN_DECLARE(int) g726_decode(g726_state_t *s,
int16_t amp[],
const uint8_t g726_data[],
int g726_bytes)
@@ -1120,7 +1120,7 @@
}
/*- End of function --------------------------------------------------------*/
-int g726_encode(g726_state_t *s,
+SPAN_DECLARE(int) g726_encode(g726_state_t *s,
uint8_t g726_data[],
const int16_t amp[],
int len)
Modified: freeswitch/trunk/libs/spandsp/src/gsm0610_decode.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/gsm0610_decode.c (original)
+++ freeswitch/trunk/libs/spandsp/src/gsm0610_decode.c Mon Feb 2 15:36:29 2009
@@ -101,7 +101,7 @@
}
/*- End of function --------------------------------------------------------*/
-int gsm0610_unpack_none(gsm0610_frame_t *s, const uint8_t c[])
+SPAN_DECLARE(int) gsm0610_unpack_none(gsm0610_frame_t *s, const uint8_t c[])
{
int i;
int j;
@@ -123,7 +123,7 @@
}
/*- End of function --------------------------------------------------------*/
-int gsm0610_unpack_wav49(gsm0610_frame_t *s, const uint8_t c[])
+SPAN_DECLARE(int) gsm0610_unpack_wav49(gsm0610_frame_t *s, const uint8_t c[])
{
uint16_t sr;
int i;
@@ -265,7 +265,7 @@
}
/*- End of function --------------------------------------------------------*/
-int gsm0610_unpack_voip(gsm0610_frame_t *s, const uint8_t c[33])
+SPAN_DECLARE(int) gsm0610_unpack_voip(gsm0610_frame_t *s, const uint8_t c[33])
{
int i;
@@ -310,7 +310,7 @@
}
/*- End of function --------------------------------------------------------*/
-int gsm0610_decode(gsm0610_state_t *s, int16_t amp[], const uint8_t code[], int len)
+SPAN_DECLARE(int) gsm0610_decode(gsm0610_state_t *s, int16_t amp[], const uint8_t code[], int len)
{
gsm0610_frame_t frame[2];
int bytes;
Modified: freeswitch/trunk/libs/spandsp/src/gsm0610_encode.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/gsm0610_encode.c (original)
+++ freeswitch/trunk/libs/spandsp/src/gsm0610_encode.c Mon Feb 2 15:36:29 2009
@@ -105,7 +105,7 @@
}
/*- End of function --------------------------------------------------------*/
-gsm0610_state_t *gsm0610_init(gsm0610_state_t *s, int packing)
+SPAN_DECLARE(gsm0610_state_t *) gsm0610_init(gsm0610_state_t *s, int packing)
{
if (s == NULL)
{
@@ -121,14 +121,14 @@
}
/*- End of function --------------------------------------------------------*/
-int gsm0610_set_packing(gsm0610_state_t *s, int packing)
+SPAN_DECLARE(int) gsm0610_set_packing(gsm0610_state_t *s, int packing)
{
s->packing = packing;
return 0;
}
/*- End of function --------------------------------------------------------*/
-int gsm0610_release(gsm0610_state_t *s)
+SPAN_DECLARE(int) gsm0610_release(gsm0610_state_t *s)
{
if (s)
free(s);
@@ -137,7 +137,7 @@
}
/*- End of function --------------------------------------------------------*/
-int gsm0610_pack_none(uint8_t c[], const gsm0610_frame_t *s)
+SPAN_DECLARE(int) gsm0610_pack_none(uint8_t c[], const gsm0610_frame_t *s)
{
int i;
int j;
@@ -160,7 +160,7 @@
}
/*- End of function --------------------------------------------------------*/
-int gsm0610_pack_wav49(uint8_t c[], const gsm0610_frame_t *s)
+SPAN_DECLARE(int) gsm0610_pack_wav49(uint8_t c[], const gsm0610_frame_t *s)
{
uint16_t sr;
int i;
@@ -255,7 +255,7 @@
}
/*- End of function --------------------------------------------------------*/
-int gsm0610_pack_voip(uint8_t c[33], const gsm0610_frame_t *s)
+SPAN_DECLARE(int) gsm0610_pack_voip(uint8_t c[33], const gsm0610_frame_t *s)
{
int i;
@@ -302,7 +302,7 @@
}
/*- End of function --------------------------------------------------------*/
-int gsm0610_encode(gsm0610_state_t *s, uint8_t code[], const int16_t amp[], int len)
+SPAN_DECLARE(int) gsm0610_encode(gsm0610_state_t *s, uint8_t code[], const int16_t amp[], int len)
{
gsm0610_frame_t frame[2];
int bytes;
Modified: freeswitch/trunk/libs/spandsp/src/hdlc.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/hdlc.c (original)
+++ freeswitch/trunk/libs/spandsp/src/hdlc.c Mon Feb 2 15:36:29 2009
@@ -243,7 +243,7 @@
}
/*- End of function --------------------------------------------------------*/
-void hdlc_rx_put_bit(hdlc_rx_state_t *s, int new_bit)
+SPAN_DECLARE(void) hdlc_rx_put_bit(hdlc_rx_state_t *s, int new_bit)
{
if (new_bit < 0)
{
@@ -255,7 +255,7 @@
}
/*- End of function --------------------------------------------------------*/
-void hdlc_rx_put_byte(hdlc_rx_state_t *s, int new_byte)
+SPAN_DECLARE(void) hdlc_rx_put_byte(hdlc_rx_state_t *s, int new_byte)
{
int i;
@@ -273,7 +273,7 @@
}
/*- End of function --------------------------------------------------------*/
-void hdlc_rx_put(hdlc_rx_state_t *s, const uint8_t buf[], int len)
+SPAN_DECLARE(void) hdlc_rx_put(hdlc_rx_state_t *s, const uint8_t buf[], int len)
{
int i;
@@ -282,20 +282,20 @@
}
/*- End of function --------------------------------------------------------*/
-void hdlc_rx_set_max_frame_len(hdlc_rx_state_t *s, size_t max_len)
+SPAN_DECLARE(void) hdlc_rx_set_max_frame_len(hdlc_rx_state_t *s, size_t max_len)
{
max_len += s->crc_bytes;
s->max_frame_len = (max_len <= sizeof(s->buffer)) ? max_len : sizeof(s->buffer);
}
/*- End of function --------------------------------------------------------*/
-void hdlc_rx_set_octet_counting_report_interval(hdlc_rx_state_t *s, int interval)
+SPAN_DECLARE(void) hdlc_rx_set_octet_counting_report_interval(hdlc_rx_state_t *s, int interval)
{
s->octet_count_report_interval = interval;
}
/*- End of function --------------------------------------------------------*/
-hdlc_rx_state_t *hdlc_rx_init(hdlc_rx_state_t *s,
+SPAN_DECLARE(hdlc_rx_state_t *) hdlc_rx_init(hdlc_rx_state_t *s,
int crc32,
int report_bad_frames,
int framing_ok_threshold,
@@ -318,7 +318,7 @@
}
/*- End of function --------------------------------------------------------*/
-int hdlc_rx_get_stats(hdlc_rx_state_t *s,
+SPAN_DECLARE(int) hdlc_rx_get_stats(hdlc_rx_state_t *s,
hdlc_rx_stats_t *t)
{
t->bytes = s->rx_bytes;
@@ -330,7 +330,7 @@
}
/*- End of function --------------------------------------------------------*/
-int hdlc_tx_frame(hdlc_tx_state_t *s, const uint8_t *frame, size_t len)
+SPAN_DECLARE(int) hdlc_tx_frame(hdlc_tx_state_t *s, const uint8_t *frame, size_t len)
{
if (len <= 0)
{
@@ -365,7 +365,7 @@
}
/*- End of function --------------------------------------------------------*/
-int hdlc_tx_flags(hdlc_tx_state_t *s, int len)
+SPAN_DECLARE(int) hdlc_tx_flags(hdlc_tx_state_t *s, int len)
{
/* Some HDLC applications require the ability to force a period of HDLC
flag words. */
@@ -381,7 +381,7 @@
}
/*- End of function --------------------------------------------------------*/
-int hdlc_tx_abort(hdlc_tx_state_t *s)
+SPAN_DECLARE(int) hdlc_tx_abort(hdlc_tx_state_t *s)
{
/* TODO: This is a really crude way of just fudging an abort out for simple
test purposes. */
@@ -391,7 +391,7 @@
}
/*- End of function --------------------------------------------------------*/
-int hdlc_tx_corrupt_frame(hdlc_tx_state_t *s)
+SPAN_DECLARE(int) hdlc_tx_corrupt_frame(hdlc_tx_state_t *s)
{
if (s->len <= 0)
return -1;
@@ -404,7 +404,7 @@
}
/*- End of function --------------------------------------------------------*/
-int hdlc_tx_get_byte(hdlc_tx_state_t *s)
+SPAN_DECLARE(int) hdlc_tx_get_byte(hdlc_tx_state_t *s)
{
int i;
int byte_in_progress;
@@ -509,7 +509,7 @@
}
/*- End of function --------------------------------------------------------*/
-int hdlc_tx_get_bit(hdlc_tx_state_t *s)
+SPAN_DECLARE(int) hdlc_tx_get_bit(hdlc_tx_state_t *s)
{
int txbit;
@@ -525,7 +525,7 @@
}
/*- End of function --------------------------------------------------------*/
-int hdlc_tx_get(hdlc_tx_state_t *s, uint8_t buf[], size_t max_len)
+SPAN_DECLARE(int) hdlc_tx_get(hdlc_tx_state_t *s, uint8_t buf[], size_t max_len)
{
size_t i;
int x;
@@ -540,13 +540,13 @@
}
/*- End of function --------------------------------------------------------*/
-void hdlc_tx_set_max_frame_len(hdlc_tx_state_t *s, size_t max_len)
+SPAN_DECLARE(void) hdlc_tx_set_max_frame_len(hdlc_tx_state_t *s, size_t max_len)
{
s->max_frame_len = (max_len <= HDLC_MAXFRAME_LEN) ? max_len : HDLC_MAXFRAME_LEN;
}
/*- End of function --------------------------------------------------------*/
-hdlc_tx_state_t *hdlc_tx_init(hdlc_tx_state_t *s,
+SPAN_DECLARE(hdlc_tx_state_t *) hdlc_tx_init(hdlc_tx_state_t *s,
int crc32,
int inter_frame_flags,
int progressive,
Modified: freeswitch/trunk/libs/spandsp/src/ima_adpcm.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/ima_adpcm.c (original)
+++ freeswitch/trunk/libs/spandsp/src/ima_adpcm.c Mon Feb 2 15:36:29 2009
@@ -276,7 +276,7 @@
}
/*- End of function --------------------------------------------------------*/
-ima_adpcm_state_t *ima_adpcm_init(ima_adpcm_state_t *s, int variant, int chunk_size)
+SPAN_DECLARE(ima_adpcm_state_t *) ima_adpcm_init(ima_adpcm_state_t *s, int variant, int chunk_size)
{
if (s == NULL)
{
@@ -291,14 +291,14 @@
}
/*- End of function --------------------------------------------------------*/
-int ima_adpcm_release(ima_adpcm_state_t *s)
+SPAN_DECLARE(int) ima_adpcm_release(ima_adpcm_state_t *s)
{
free(s);
return 0;
}
/*- End of function --------------------------------------------------------*/
-int ima_adpcm_decode(ima_adpcm_state_t *s,
+SPAN_DECLARE(int) ima_adpcm_decode(ima_adpcm_state_t *s,
int16_t amp[],
const uint8_t ima_data[],
int ima_bytes)
@@ -414,7 +414,7 @@
}
/*- End of function --------------------------------------------------------*/
-int ima_adpcm_encode(ima_adpcm_state_t *s,
+SPAN_DECLARE(int) ima_adpcm_encode(ima_adpcm_state_t *s,
uint8_t ima_data[],
const int16_t amp[],
int len)
Modified: freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj (original)
+++ freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj Mon Feb 2 15:36:29 2009
@@ -18,7 +18,7 @@
<Configurations>
<Configuration
Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ OutputDirectory="$(SolutionDir)Debug"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
@@ -68,6 +68,7 @@
SubSystem="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
+ ImportLibrary="./Debug\spandsp.lib"
TargetMachine="1"
/>
<Tool
@@ -94,7 +95,7 @@
</Configuration>
<Configuration
Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ OutputDirectory="$(SolutionDir)Release"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
@@ -143,6 +144,7 @@
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
+ ImportLibrary="./Release\spandsp.lib"
TargetMachine="1"
/>
<Tool
@@ -176,208 +178,822 @@
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
-<File RelativePath="adsi.c"></File>
-<File RelativePath="async.c"></File>
-<File RelativePath="at_interpreter.c"></File>
-<File RelativePath="awgn.c"></File>
-<File RelativePath="bell_r2_mf.c"></File>
-<File RelativePath="bert.c"></File>
-<File RelativePath="bit_operations.c"></File>
-<File RelativePath="bitstream.c"></File>
-<File RelativePath="complex_filters.c"></File>
-<File RelativePath="complex_vector_float.c"></File>
-<File RelativePath="complex_vector_int.c"></File>
-<File RelativePath="crc.c"></File>
-<File RelativePath="dds_float.c"></File>
-<File RelativePath="dds_int.c"></File>
-<File RelativePath="dtmf.c"></File>
-<File RelativePath="echo.c"></File>
-<File RelativePath="fax.c"></File>
-<File RelativePath="fsk.c"></File>
-<File RelativePath="g711.c"></File>
-<File RelativePath="g722.c"></File>
-<File RelativePath="g726.c"></File>
-<File RelativePath="gsm0610_decode.c"></File>
-<File RelativePath="gsm0610_encode.c"></File>
-<File RelativePath="gsm0610_long_term.c"></File>
-<File RelativePath="gsm0610_lpc.c"></File>
-<File RelativePath="gsm0610_preprocess.c"></File>
-<File RelativePath="gsm0610_rpe.c"></File>
-<File RelativePath="gsm0610_short_term.c"></File>
-<File RelativePath="hdlc.c"></File>
-<File RelativePath="ima_adpcm.c"></File>
-<File RelativePath="logging.c"></File>
-<File RelativePath="lpc10_analyse.c"></File>
-<File RelativePath="lpc10_decode.c"></File>
-<File RelativePath="lpc10_encode.c"></File>
-<File RelativePath="lpc10_placev.c"></File>
-<File RelativePath="lpc10_voicing.c"></File>
-<File RelativePath="modem_echo.c"></File>
-<File RelativePath="modem_connect_tones.c"></File>
-<File RelativePath="noise.c"></File>
-<File RelativePath="oki_adpcm.c"></File>
-<File RelativePath="playout.c"></File>
-<File RelativePath="plc.c"></File>
-<File RelativePath="power_meter.c"></File>
-<File RelativePath="queue.c"></File>
-<File RelativePath="schedule.c"></File>
-<File RelativePath="sig_tone.c"></File>
-<File RelativePath="silence_gen.c"></File>
-<File RelativePath="super_tone_rx.c"></File>
-<File RelativePath="super_tone_tx.c"></File>
-<File RelativePath="t4.c"></File>
-<File RelativePath="t30.c"></File>
-<File RelativePath="t30_api.c"></File>
-<File RelativePath="t30_logging.c"></File>
-<File RelativePath="t31.c"></File>
-<File RelativePath="t35.c"></File>
-<File RelativePath="t38_core.c"></File>
-<File RelativePath="t38_gateway.c"></File>
-<File RelativePath="t38_non_ecm_buffer.c"></File>
-<File RelativePath="t38_terminal.c"></File>
-<File RelativePath="testcpuid.c"></File>
-<File RelativePath="time_scale.c"></File>
-<File RelativePath="tone_detect.c"></File>
-<File RelativePath="tone_generate.c"></File>
-<File RelativePath="v17rx.c"></File>
-<File RelativePath="v17tx.c"></File>
-<File RelativePath="v22bis_rx.c"></File>
-<File RelativePath="v22bis_tx.c"></File>
-<File RelativePath="v27ter_rx.c"></File>
-<File RelativePath="v27ter_tx.c"></File>
-<File RelativePath="v29rx.c"></File>
-<File RelativePath="v29tx.c"></File>
-<File RelativePath="v42.c"></File>
-<File RelativePath="v42bis.c"></File>
-<File RelativePath="v8.c"></File>
-<File RelativePath="vector_float.c"></File>
-<File RelativePath="vector_int.c"></File>
-<File RelativePath=".\msvc\gettimeofday.c"></File>
-</Filter><Filter Name="Header Files">
-<File RelativePath="spandsp/adsi.h"></File>
-<File RelativePath="spandsp/async.h"></File>
-<File RelativePath="spandsp/arctan2.h"></File>
-<File RelativePath="spandsp/at_interpreter.h"></File>
-<File RelativePath="spandsp/awgn.h"></File>
-<File RelativePath="spandsp/bell_r2_mf.h"></File>
-<File RelativePath="spandsp/bert.h"></File>
-<File RelativePath="spandsp/biquad.h"></File>
-<File RelativePath="spandsp/bit_operations.h"></File>
-<File RelativePath="spandsp/bitstream.h"></File>
-<File RelativePath="spandsp/crc.h"></File>
-<File RelativePath="spandsp/complex.h"></File>
-<File RelativePath="spandsp/complex_filters.h"></File>
-<File RelativePath="spandsp/complex_vector_float.h"></File>
-<File RelativePath="spandsp/complex_vector_int.h"></File>
-<File RelativePath="spandsp/dc_restore.h"></File>
-<File RelativePath="spandsp/dds.h"></File>
-<File RelativePath="spandsp/dtmf.h"></File>
-<File RelativePath="spandsp/echo.h"></File>
-<File RelativePath="spandsp/fax.h"></File>
-<File RelativePath="spandsp/fax_modems.h"></File>
-<File RelativePath="spandsp/fir.h"></File>
-<File RelativePath="spandsp/fsk.h"></File>
-<File RelativePath="spandsp/g168models.h"></File>
-<File RelativePath="spandsp/g711.h"></File>
-<File RelativePath="spandsp/g722.h"></File>
-<File RelativePath="spandsp/g726.h"></File>
-<File RelativePath="spandsp/gsm0610.h"></File>
-<File RelativePath="spandsp/hdlc.h"></File>
-<File RelativePath="spandsp/ima_adpcm.h"></File>
-<File RelativePath="spandsp/logging.h"></File>
-<File RelativePath="spandsp/lpc10.h"></File>
-<File RelativePath="spandsp/modem_echo.h"></File>
-<File RelativePath="spandsp/modem_connect_tones.h"></File>
-<File RelativePath="spandsp/noise.h"></File>
-<File RelativePath="spandsp/oki_adpcm.h"></File>
-<File RelativePath="spandsp/playout.h"></File>
-<File RelativePath="spandsp/plc.h"></File>
-<File RelativePath="spandsp/power_meter.h"></File>
-<File RelativePath="spandsp/queue.h"></File>
-<File RelativePath="spandsp/saturated.h"></File>
-<File RelativePath="spandsp/schedule.h"></File>
-<File RelativePath="spandsp/sig_tone.h"></File>
-<File RelativePath="spandsp/silence_gen.h"></File>
-<File RelativePath="spandsp/super_tone_rx.h"></File>
-<File RelativePath="spandsp/super_tone_tx.h"></File>
-<File RelativePath="spandsp/t4.h"></File>
-<File RelativePath="spandsp/t30.h"></File>
-<File RelativePath="spandsp/t30_api.h"></File>
-<File RelativePath="spandsp/t30_fcf.h"></File>
-<File RelativePath="spandsp/t30_logging.h"></File>
-<File RelativePath="spandsp/t31.h"></File>
-<File RelativePath="spandsp/t35.h"></File>
-<File RelativePath="spandsp/t38_core.h"></File>
-<File RelativePath="spandsp/t38_gateway.h"></File>
-<File RelativePath="spandsp/t38_non_ecm_buffer.h"></File>
-<File RelativePath="spandsp/t38_terminal.h"></File>
-<File RelativePath="spandsp/telephony.h"></File>
-<File RelativePath="spandsp/time_scale.h"></File>
-<File RelativePath="spandsp/timing.h"></File>
-<File RelativePath="spandsp/tone_detect.h"></File>
-<File RelativePath="spandsp/tone_generate.h"></File>
-<File RelativePath="spandsp/v17rx.h"></File>
-<File RelativePath="spandsp/v17tx.h"></File>
-<File RelativePath="spandsp/v22bis.h"></File>
-<File RelativePath="spandsp/v27ter_rx.h"></File>
-<File RelativePath="spandsp/v27ter_tx.h"></File>
-<File RelativePath="spandsp/v29rx.h"></File>
-<File RelativePath="spandsp/v29tx.h"></File>
-<File RelativePath="spandsp/v42.h"></File>
-<File RelativePath="spandsp/v42bis.h"></File>
-<File RelativePath="spandsp/v8.h"></File>
-<File RelativePath="spandsp/vector_float.h"></File>
-<File RelativePath="spandsp/vector_int.h"></File>
-<File RelativePath="spandsp/version.h"></File>
-<File RelativePath="spandsp/private/adsi.h"></File>
-<File RelativePath="spandsp/private/async.h"></File>
-<File RelativePath="spandsp/private/at_interpreter.h"></File>
-<File RelativePath="spandsp/private/awgn.h"></File>
-<File RelativePath="spandsp/private/bell_r2_mf.h"></File>
-<File RelativePath="spandsp/private/bert.h"></File>
-<File RelativePath="spandsp/private/bitstream.h"></File>
-<File RelativePath="spandsp/private/dtmf.h"></File>
-<File RelativePath="spandsp/private/fax.h"></File>
-<File RelativePath="spandsp/private/fax_modems.h"></File>
-<File RelativePath="spandsp/private/fsk.h"></File>
-<File RelativePath="spandsp/private/g711.h"></File>
-<File RelativePath="spandsp/private/g722.h"></File>
-<File RelativePath="spandsp/private/g726.h"></File>
-<File RelativePath="spandsp/private/gsm0610.h"></File>
-<File RelativePath="spandsp/private/hdlc.h"></File>
-<File RelativePath="spandsp/private/ima_adpcm.h"></File>
-<File RelativePath="spandsp/private/logging.h"></File>
-<File RelativePath="spandsp/private/lpc10.h"></File>
-<File RelativePath="spandsp/private/modem_connect_tones.h"></File>
-<File RelativePath="spandsp/private/noise.h"></File>
-<File RelativePath="spandsp/private/oki_adpcm.h"></File>
-<File RelativePath="spandsp/private/queue.h"></File>
-<File RelativePath="spandsp/private/schedule.h"></File>
-<File RelativePath="spandsp/private/sig_tone.h"></File>
-<File RelativePath="spandsp/private/super_tone_rx.h"></File>
-<File RelativePath="spandsp/private/super_tone_tx.h"></File>
-<File RelativePath="spandsp/private/t30.h"></File>
-<File RelativePath="spandsp/private/t31.h"></File>
-<File RelativePath="spandsp/private/t38_core.h"></File>
-<File RelativePath="spandsp/private/t38_gateway.h"></File>
-<File RelativePath="spandsp/private/t38_non_ecm_buffer.h"></File>
-<File RelativePath="spandsp/private/t38_terminal.h"></File>
-<File RelativePath="spandsp/private/t4.h"></File>
-<File RelativePath="spandsp/private/time_scale.h"></File>
-<File RelativePath="spandsp/private/tone_detect.h"></File>
-<File RelativePath="spandsp/private/tone_generate.h"></File>
-<File RelativePath="spandsp/private/v17rx.h"></File>
-<File RelativePath="spandsp/private/v17tx.h"></File>
-<File RelativePath="spandsp/private/v22bis.h"></File>
-<File RelativePath="spandsp/private/v27ter_rx.h"></File>
-<File RelativePath="spandsp/private/v27ter_tx.h"></File>
-<File RelativePath="spandsp/private/v29rx.h"></File>
-<File RelativePath="spandsp/private/v29tx.h"></File>
-<File RelativePath="spandsp/private/v42.h"></File>
-<File RelativePath="spandsp/private/v42bis.h"></File>
-<File RelativePath="spandsp/private/v8.h"></File>
-<File RelativePath="spandsp/expose.h"></File>
-<File RelativePath="spandsp.h"></File>
- </Filter>
<Filter
- Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
- </Files>
<Globals>
</Globals>
</VisualStudioProject>
+ <File
+ RelativePath="adsi.c"
+ >
+ </File>
+ <File
+ RelativePath="async.c"
+ >
+ </File>
+ <File
+ RelativePath="at_interpreter.c"
+ >
+ </File>
+ <File
+ RelativePath="awgn.c"
+ >
+ </File>
+ <File
+ RelativePath="bell_r2_mf.c"
+ >
+ </File>
+ <File
+ RelativePath="bert.c"
+ >
+ </File>
+ <File
+ RelativePath="bit_operations.c"
+ >
+ </File>
+ <File
+ RelativePath="bitstream.c"
+ >
+ </File>
+ <File
+ RelativePath="complex_filters.c"
+ >
+ </File>
+ <File
+ RelativePath="complex_vector_float.c"
+ >
+ </File>
+ <File
+ RelativePath="complex_vector_int.c"
+ >
+ </File>
+ <File
+ RelativePath="crc.c"
+ >
+ </File>
+ <File
+ RelativePath="dds_float.c"
+ >
+ </File>
+ <File
+ RelativePath="dds_int.c"
+ >
+ </File>
+ <File
+ RelativePath="dtmf.c"
+ >
+ </File>
+ <File
+ RelativePath="echo.c"
+ >
+ </File>
+ <File
+ RelativePath="fax.c"
+ >
+ </File>
+ <File
+ RelativePath="fsk.c"
+ >
+ </File>
+ <File
+ RelativePath="g711.c"
+ >
+ </File>
+ <File
+ RelativePath="g722.c"
+ >
+ </File>
+ <File
+ RelativePath="g726.c"
+ >
+ </File>
+ <File
+ RelativePath=".\msvc\gettimeofday.c"
+ >
+ </File>
+ <File
+ RelativePath="gsm0610_decode.c"
+ >
+ </File>
+ <File
+ RelativePath="gsm0610_encode.c"
+ >
+ </File>
+ <File
+ RelativePath="gsm0610_long_term.c"
+ >
+ </File>
+ <File
+ RelativePath="gsm0610_lpc.c"
+ >
+ </File>
+ <File
+ RelativePath="gsm0610_preprocess.c"
+ >
+ </File>
+ <File
+ RelativePath="gsm0610_rpe.c"
+ >
+ </File>
+ <File
+ RelativePath="gsm0610_short_term.c"
+ >
+ </File>
+ <File
+ RelativePath="hdlc.c"
+ >
+ </File>
+ <File
+ RelativePath="ima_adpcm.c"
+ >
+ </File>
+ <File
+ RelativePath="logging.c"
+ >
+ </File>
+ <File
+ RelativePath="lpc10_analyse.c"
+ >
+ </File>
+ <File
+ RelativePath="lpc10_decode.c"
+ >
+ </File>
+ <File
+ RelativePath="lpc10_encode.c"
+ >
+ </File>
+ <File
+ RelativePath="lpc10_placev.c"
+ >
+ </File>
+ <File
+ RelativePath="lpc10_voicing.c"
+ >
+ </File>
+ <File
+ RelativePath="modem_connect_tones.c"
+ >
+ </File>
+ <File
+ RelativePath="modem_echo.c"
+ >
+ </File>
+ <File
+ RelativePath="noise.c"
+ >
+ </File>
+ <File
+ RelativePath="oki_adpcm.c"
+ >
+ </File>
+ <File
+ RelativePath="playout.c"
+ >
+ </File>
+ <File
+ RelativePath="plc.c"
+ >
+ </File>
+ <File
+ RelativePath="power_meter.c"
+ >
+ </File>
+ <File
+ RelativePath="queue.c"
+ >
+ </File>
+ <File
+ RelativePath="schedule.c"
+ >
+ </File>
+ <File
+ RelativePath="sig_tone.c"
+ >
+ </File>
+ <File
+ RelativePath="silence_gen.c"
+ >
+ </File>
+ <File
+ RelativePath="super_tone_rx.c"
+ >
+ </File>
+ <File
+ RelativePath="super_tone_tx.c"
+ >
+ </File>
+ <File
+ RelativePath="t30.c"
+ >
+ </File>
+ <File
+ RelativePath="t30_api.c"
+ >
+ </File>
+ <File
+ RelativePath="t30_logging.c"
+ >
+ </File>
+ <File
+ RelativePath="t31.c"
+ >
+ </File>
+ <File
+ RelativePath="t35.c"
+ >
+ </File>
+ <File
+ RelativePath="t38_core.c"
+ >
+ </File>
+ <File
+ RelativePath="t38_gateway.c"
+ >
+ </File>
+ <File
+ RelativePath="t38_non_ecm_buffer.c"
+ >
+ </File>
+ <File
+ RelativePath="t38_terminal.c"
+ >
+ </File>
+ <File
+ RelativePath="t4.c"
+ >
+ </File>
+ <File
+ RelativePath="testcpuid.c"
+ >
+ </File>
+ <File
+ RelativePath="time_scale.c"
+ >
+ </File>
+ <File
+ RelativePath="tone_detect.c"
+ >
+ </File>
+ <File
+ RelativePath="tone_generate.c"
+ >
+ </File>
+ <File
+ RelativePath="v17rx.c"
+ >
+ </File>
+ <File
+ RelativePath="v17tx.c"
+ >
+ </File>
+ <File
+ RelativePath="v22bis_rx.c"
+ >
+ </File>
+ <File
+ RelativePath="v22bis_tx.c"
+ >
+ </File>
+ <File
+ RelativePath="v27ter_rx.c"
+ >
+ </File>
+ <File
+ RelativePath="v27ter_tx.c"
+ >
+ </File>
+ <File
+ RelativePath="v29rx.c"
+ >
+ </File>
+ <File
+ RelativePath="v29tx.c"
+ >
+ </File>
+ <File
+ RelativePath="v42.c"
+ >
+ </File>
+ <File
+ RelativePath="v42bis.c"
+ >
+ </File>
+ <File
+ RelativePath="v8.c"
+ >
+ </File>
+ <File
+ RelativePath="vector_float.c"
+ >
+ </File>
+ <File
+ RelativePath="vector_int.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ >
+ <File
+ RelativePath=".\msvc\spandsp.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/adsi.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/arctan2.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/async.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/at_interpreter.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/awgn.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/bell_r2_mf.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/bert.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/biquad.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/bit_operations.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/bitstream.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/complex.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/complex_filters.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/complex_vector_float.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/complex_vector_int.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/crc.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/dc_restore.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/dds.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/dtmf.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/echo.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/expose.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/fax.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/fax_modems.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/fir.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/fsk.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/g168models.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/g711.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/g722.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/g726.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/gsm0610.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/hdlc.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/ima_adpcm.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/logging.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/lpc10.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/modem_connect_tones.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/modem_echo.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/noise.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/oki_adpcm.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/playout.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/plc.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/power_meter.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/adsi.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/async.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/at_interpreter.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/awgn.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/bell_r2_mf.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/bert.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/bitstream.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/dtmf.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/fax.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/fax_modems.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/fsk.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/g711.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/g722.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/g726.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/gsm0610.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/hdlc.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/ima_adpcm.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/logging.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/lpc10.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/modem_connect_tones.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/noise.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/oki_adpcm.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/queue.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/schedule.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/sig_tone.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/super_tone_rx.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/super_tone_tx.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/t30.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/t31.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/t38_core.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/t38_gateway.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/t38_non_ecm_buffer.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/t38_terminal.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/t4.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/time_scale.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/tone_detect.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/tone_generate.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/v17rx.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/v17tx.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/v22bis.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/v27ter_rx.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/v27ter_tx.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/v29rx.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/v29tx.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/v42.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/v42bis.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/private/v8.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/queue.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/saturated.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/schedule.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/sig_tone.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/silence_gen.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/super_tone_rx.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/super_tone_tx.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/t30.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/t30_api.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/t30_fcf.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/t30_logging.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/t31.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/t35.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/t38_core.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/t38_gateway.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/t38_non_ecm_buffer.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/t38_terminal.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/t4.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/telephony.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/time_scale.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/timing.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/tone_detect.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/tone_generate.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/v17rx.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/v17tx.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/v22bis.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/v27ter_rx.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/v27ter_tx.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/v29rx.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/v29tx.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/v42.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/v42bis.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/v8.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/vector_float.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/vector_int.h"
+ >
+ </File>
+ <File
+ RelativePath="spandsp/version.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Modified: freeswitch/trunk/libs/spandsp/src/logging.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/logging.c (original)
+++ freeswitch/trunk/libs/spandsp/src/logging.c Mon Feb 2 15:36:29 2009
@@ -75,7 +75,7 @@
}
/*- End of function --------------------------------------------------------*/
-int span_log_test(logging_state_t *s, int level)
+SPAN_DECLARE(int) span_log_test(logging_state_t *s, int level)
{
if (s && (s->level & SPAN_LOG_SEVERITY_MASK) >= (level & SPAN_LOG_SEVERITY_MASK))
return TRUE;
@@ -157,7 +157,7 @@
}
/*- End of function --------------------------------------------------------*/
-int span_log_buf(logging_state_t *s, int level, const char *tag, const uint8_t *buf, int len)
+SPAN_DECLARE(int) span_log_buf(logging_state_t *s, int level, const char *tag, const uint8_t *buf, int len)
{
char msg[1024];
int i;
@@ -177,7 +177,7 @@
}
/*- End of function --------------------------------------------------------*/
-int span_log_init(logging_state_t *s, int level, const char *tag)
+SPAN_DECLARE(int) span_log_init(logging_state_t *s, int level, const char *tag)
{
s->span_error = __span_error;
s->span_message = __span_message;
@@ -191,7 +191,7 @@
}
/*- End of function --------------------------------------------------------*/
-int span_log_set_level(logging_state_t *s, int level)
+SPAN_DECLARE(int) span_log_set_level(logging_state_t *s, int level)
{
s->level = level;
@@ -199,7 +199,7 @@
}
/*- End of function --------------------------------------------------------*/
-int span_log_set_tag(logging_state_t *s, const char *tag)
+SPAN_DECLARE(int) span_log_set_tag(logging_state_t *s, const char *tag)
{
s->tag = tag;
@@ -207,7 +207,7 @@
}
/*- End of function --------------------------------------------------------*/
-int span_log_set_protocol(logging_state_t *s, const char *protocol)
+SPAN_DECLARE(int) span_log_set_protocol(logging_state_t *s, const char *protocol)
{
s->protocol = protocol;
@@ -215,7 +215,7 @@
}
/*- End of function --------------------------------------------------------*/
-int span_log_set_sample_rate(logging_state_t *s, int samples_per_second)
+SPAN_DECLARE(int) span_log_set_sample_rate(logging_state_t *s, int samples_per_second)
{
s->samples_per_second = samples_per_second;
@@ -223,7 +223,7 @@
}
/*- End of function --------------------------------------------------------*/
-int span_log_bump_samples(logging_state_t *s, int samples)
+SPAN_DECLARE(int) span_log_bump_samples(logging_state_t *s, int samples)
{
s->elapsed_samples += samples;
@@ -231,25 +231,25 @@
}
/*- End of function --------------------------------------------------------*/
-void span_log_set_message_handler(logging_state_t *s, message_handler_func_t func)
+SPAN_DECLARE(void) span_log_set_message_handler(logging_state_t *s, message_handler_func_t func)
{
s->span_message = func;
}
/*- End of function --------------------------------------------------------*/
-void span_log_set_error_handler(logging_state_t *s, error_handler_func_t func)
+SPAN_DECLARE(void) span_log_set_error_handler(logging_state_t *s, error_handler_func_t func)
{
s->span_error = func;
}
/*- End of function --------------------------------------------------------*/
-void span_set_message_handler(message_handler_func_t func)
+SPAN_DECLARE(void) span_set_message_handler(message_handler_func_t func)
{
__span_message = func;
}
/*- End of function --------------------------------------------------------*/
-void span_set_error_handler(error_handler_func_t func)
+SPAN_DECLARE(void) span_set_error_handler(error_handler_func_t func)
{
__span_error = func;
}
Modified: freeswitch/trunk/libs/spandsp/src/lpc10_decode.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/lpc10_decode.c (original)
+++ freeswitch/trunk/libs/spandsp/src/lpc10_decode.c Mon Feb 2 15:36:29 2009
@@ -999,7 +999,7 @@
}
/*- End of function --------------------------------------------------------*/
-lpc10_decode_state_t *lpc10_decode_init(lpc10_decode_state_t *s, int error_correction)
+SPAN_DECLARE(lpc10_decode_state_t *) lpc10_decode_init(lpc10_decode_state_t *s, int error_correction)
{
static const int16_t rand_init[] =
{
@@ -1074,14 +1074,14 @@
}
/*- End of function --------------------------------------------------------*/
-int lpc10_decode_release(lpc10_decode_state_t *s)
+SPAN_DECLARE(int) lpc10_decode_release(lpc10_decode_state_t *s)
{
free(s);
return 0;
}
/*- End of function --------------------------------------------------------*/
-int lpc10_decode(lpc10_decode_state_t *s, int16_t amp[], const uint8_t code[], int len)
+SPAN_DECLARE(int) lpc10_decode(lpc10_decode_state_t *s, int16_t amp[], const uint8_t code[], int len)
{
int voice[2];
int32_t pitch;
Modified: freeswitch/trunk/libs/spandsp/src/lpc10_encode.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/lpc10_encode.c (original)
+++ freeswitch/trunk/libs/spandsp/src/lpc10_encode.c Mon Feb 2 15:36:29 2009
@@ -266,7 +266,7 @@
}
/*- End of function --------------------------------------------------------*/
-lpc10_encode_state_t *lpc10_encode_init(lpc10_encode_state_t *s, int error_correction)
+SPAN_DECLARE(lpc10_encode_state_t *) lpc10_encode_init(lpc10_encode_state_t *s, int error_correction)
{
int i;
int j;
@@ -363,14 +363,14 @@
}
/*- End of function --------------------------------------------------------*/
-int lpc10_encode_release(lpc10_encode_state_t *s)
+SPAN_DECLARE(int) lpc10_encode_release(lpc10_encode_state_t *s)
{
free(s);
return 0;
}
/*- End of function --------------------------------------------------------*/
-int lpc10_encode(lpc10_encode_state_t *s, uint8_t code[], const int16_t amp[], int len)
+SPAN_DECLARE(int) lpc10_encode(lpc10_encode_state_t *s, uint8_t code[], const int16_t amp[], int len)
{
int32_t voice[2];
int32_t pitch;
Modified: freeswitch/trunk/libs/spandsp/src/modem_connect_tones.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/modem_connect_tones.c (original)
+++ freeswitch/trunk/libs/spandsp/src/modem_connect_tones.c Mon Feb 2 15:36:29 2009
@@ -61,7 +61,7 @@
#define HDLC_FRAMING_OK_THRESHOLD 5
-const char *modem_connect_tone_to_str(int tone)
+SPAN_DECLARE(const char *) modem_connect_tone_to_str(int tone)
{
switch (tone)
{
@@ -86,7 +86,7 @@
}
/*- End of function --------------------------------------------------------*/
-int modem_connect_tones_tx(modem_connect_tones_tx_state_t *s,
+SPAN_DECLARE(int) modem_connect_tones_tx(modem_connect_tones_tx_state_t *s,
int16_t amp[],
int len)
{
@@ -196,7 +196,7 @@
}
/*- End of function --------------------------------------------------------*/
-modem_connect_tones_tx_state_t *modem_connect_tones_tx_init(modem_connect_tones_tx_state_t *s,
+SPAN_DECLARE(modem_connect_tones_tx_state_t *) modem_connect_tones_tx_init(modem_connect_tones_tx_state_t *s,
int tone_type)
{
int alloced;
@@ -252,7 +252,7 @@
}
/*- End of function --------------------------------------------------------*/
-int modem_connect_tones_tx_free(modem_connect_tones_tx_state_t *s)
+SPAN_DECLARE(int) modem_connect_tones_tx_free(modem_connect_tones_tx_state_t *s)
{
free(s);
return 0;
@@ -347,7 +347,7 @@
}
/*- End of function --------------------------------------------------------*/
-int modem_connect_tones_rx(modem_connect_tones_rx_state_t *s, const int16_t amp[], int len)
+SPAN_DECLARE(int) modem_connect_tones_rx(modem_connect_tones_rx_state_t *s, const int16_t amp[], int len)
{
int i;
int16_t notched;
@@ -489,7 +489,7 @@
}
/*- End of function --------------------------------------------------------*/
-int modem_connect_tones_rx_get(modem_connect_tones_rx_state_t *s)
+SPAN_DECLARE(int) modem_connect_tones_rx_get(modem_connect_tones_rx_state_t *s)
{
int x;
@@ -499,7 +499,7 @@
}
/*- End of function --------------------------------------------------------*/
-modem_connect_tones_rx_state_t *modem_connect_tones_rx_init(modem_connect_tones_rx_state_t *s,
+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)
@@ -543,7 +543,7 @@
}
/*- End of function --------------------------------------------------------*/
-int modem_connect_tones_rx_free(modem_connect_tones_rx_state_t *s)
+SPAN_DECLARE(int) modem_connect_tones_rx_free(modem_connect_tones_rx_state_t *s)
{
free(s);
return 0;
Modified: freeswitch/trunk/libs/spandsp/src/modem_echo.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/modem_echo.c (original)
+++ freeswitch/trunk/libs/spandsp/src/modem_echo.c Mon Feb 2 15:36:29 2009
@@ -53,7 +53,7 @@
#include "spandsp/dc_restore.h"
#include "spandsp/modem_echo.h"
-modem_echo_can_state_t *modem_echo_can_create(int len)
+SPAN_DECLARE(modem_echo_can_state_t *) modem_echo_can_create(int len)
{
modem_echo_can_state_t *ec;
@@ -86,7 +86,7 @@
}
/*- End of function --------------------------------------------------------*/
-void modem_echo_can_free(modem_echo_can_state_t *ec)
+SPAN_DECLARE(void) modem_echo_can_free(modem_echo_can_state_t *ec)
{
fir16_free(&ec->fir_state);
free(ec->fir_taps32);
@@ -95,7 +95,7 @@
}
/*- End of function --------------------------------------------------------*/
-void modem_echo_can_flush(modem_echo_can_state_t *ec)
+SPAN_DECLARE(void) modem_echo_can_flush(modem_echo_can_state_t *ec)
{
ec->tx_power = 0;
@@ -107,13 +107,13 @@
}
/*- End of function --------------------------------------------------------*/
-void modem_echo_can_adaption_mode(modem_echo_can_state_t *ec, int adapt)
+SPAN_DECLARE(void) modem_echo_can_adaption_mode(modem_echo_can_state_t *ec, int adapt)
{
ec->adapt = adapt;
}
/*- End of function --------------------------------------------------------*/
-int16_t modem_echo_can_update(modem_echo_can_state_t *ec, int16_t tx, int16_t rx)
+SPAN_DECLARE(int16_t) modem_echo_can_update(modem_echo_can_state_t *ec, int16_t tx, int16_t rx)
{
int32_t echo_value;
int clean_rx;
Modified: freeswitch/trunk/libs/spandsp/src/msvc/config.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/msvc/config.h (original)
+++ freeswitch/trunk/libs/spandsp/src/msvc/config.h Mon Feb 2 15:36:29 2009
@@ -32,6 +32,8 @@
#define HAVE_MATH_H
#define HAVE_TGMATH_H
+#define SPANDSP_USE_EXPORT_CAPABILITY 1
+
#ifdef __cplusplus
extern "C" {
#endif
Modified: freeswitch/trunk/libs/spandsp/src/msvc/spandsp.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/msvc/spandsp.h (original)
+++ freeswitch/trunk/libs/spandsp/src/msvc/spandsp.h Mon Feb 2 15:36:29 2009
@@ -33,7 +33,6 @@
#undef SPANDSP_USE_FIXED_POINT
#undef SPANDSP_MISALIGNED_ACCESS_FAILS
-#define SPANDSP_USE_EXPORT_CAPABILITY 1
#include <stdlib.h>
#include <inttypes.h>
Modified: freeswitch/trunk/libs/spandsp/src/msvc/vc8proj.head
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/msvc/vc8proj.head (original)
+++ freeswitch/trunk/libs/spandsp/src/msvc/vc8proj.head Mon Feb 2 15:36:29 2009
@@ -3,45 +3,30 @@
ProjectType="Visual C++"
Version="9.00"
Name="libspandsp"
- ProjectGUID="{CF70F278-3364-4395-A2E1-23501C9B8AD2}"
+ ProjectGUID="{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}"
RootNamespace="libspandsp"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
- <Platforms>
- <Platform
+ <Platforms>
+ <Platform
Name="Win32"
/>
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ OutputDirectory="$(SolutionDir)Debug"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
>
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
+ <Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories=".;.\spandsp;.\msvc;.\generated;..\..\tiff\libtiff"
+ AdditionalIncludeDirectories=".;.\spandsp;.\msvc;..\..\tiff-3.8.2\libtiff;.\generated"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@@ -52,72 +37,28 @@
CompileAs="1"
DisableSpecificWarnings="4127"
/>
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
+ <Tool
Name="VCLinkerTool"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
+ ImportLibrary="./Debug\spandsp.lib"
TargetMachine="1"
/>
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
+ </Configuration>
+ <Configuration
Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ OutputDirectory="$(SolutionDir)Release"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
WholeProgramOptimization="1"
>
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
+ <Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=".;.\spandsp;.\msvc;.\generated;..\..\tiff\libtiff"
+ AdditionalIncludeDirectories=".;.\spandsp;.\msvc;..\..\tiff-3.8.2\libtiff;.\generated"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
@@ -125,16 +66,7 @@
DebugInformationFormat="3"
DisableSpecificWarnings="4127"
/>
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
+ <Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
@@ -143,36 +75,16 @@
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
+ ImportLibrary="./Release\spandsp.lib"
TargetMachine="1"
/>
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
+ >
\ No newline at end of file
Modified: freeswitch/trunk/libs/spandsp/src/noise.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/noise.c (original)
+++ freeswitch/trunk/libs/spandsp/src/noise.c Mon Feb 2 15:36:29 2009
@@ -50,7 +50,7 @@
#include "spandsp/private/noise.h"
-int16_t noise(noise_state_t *s)
+SPAN_DECLARE(int16_t) noise(noise_state_t *s)
{
int32_t val;
int i;
@@ -79,13 +79,13 @@
}
/*- End of function --------------------------------------------------------*/
-noise_state_t *noise_init_dbm0(noise_state_t *s, int seed, float level, int class_of_noise, int quality)
+SPAN_DECLARE(noise_state_t *) noise_init_dbm0(noise_state_t *s, int seed, float level, int class_of_noise, int quality)
{
return noise_init_dbov(s, seed, (level - DBM0_MAX_POWER), class_of_noise, quality);
}
/*- End of function --------------------------------------------------------*/
-noise_state_t *noise_init_dbov(noise_state_t *s, int seed, float level, int class_of_noise, int quality)
+SPAN_DECLARE(noise_state_t *) noise_init_dbov(noise_state_t *s, int seed, float level, int class_of_noise, int quality)
{
float rms;
@@ -114,7 +114,7 @@
}
/*- End of function --------------------------------------------------------*/
-int noise_free(noise_state_t *s)
+SPAN_DECLARE(int) noise_free(noise_state_t *s)
{
free(s);
return 0;
Modified: freeswitch/trunk/libs/spandsp/src/oki_adpcm.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/oki_adpcm.c (original)
+++ freeswitch/trunk/libs/spandsp/src/oki_adpcm.c Mon Feb 2 15:36:29 2009
@@ -242,7 +242,7 @@
}
/*- End of function --------------------------------------------------------*/
-oki_adpcm_state_t *oki_adpcm_init(oki_adpcm_state_t *s, int bit_rate)
+SPAN_DECLARE(oki_adpcm_state_t *) oki_adpcm_init(oki_adpcm_state_t *s, int bit_rate)
{
if (bit_rate != 32000 && bit_rate != 24000)
return NULL;
@@ -258,14 +258,14 @@
}
/*- End of function --------------------------------------------------------*/
-int oki_adpcm_release(oki_adpcm_state_t *s)
+SPAN_DECLARE(int) oki_adpcm_release(oki_adpcm_state_t *s)
{
free(s);
return 0;
}
/*- End of function --------------------------------------------------------*/
-int oki_adpcm_decode(oki_adpcm_state_t *s,
+SPAN_DECLARE(int) oki_adpcm_decode(oki_adpcm_state_t *s,
int16_t amp[],
const uint8_t oki_data[],
int oki_bytes)
@@ -318,7 +318,7 @@
}
/*- End of function --------------------------------------------------------*/
-int oki_adpcm_encode(oki_adpcm_state_t *s,
+SPAN_DECLARE(int) oki_adpcm_encode(oki_adpcm_state_t *s,
uint8_t oki_data[],
const int16_t amp[],
int len)
Modified: freeswitch/trunk/libs/spandsp/src/playout.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/playout.c (original)
+++ freeswitch/trunk/libs/spandsp/src/playout.c Mon Feb 2 15:36:29 2009
@@ -73,19 +73,19 @@
}
/*- End of function --------------------------------------------------------*/
-timestamp_t playout_next_due(playout_state_t *s)
+SPAN_DECLARE(timestamp_t) playout_next_due(playout_state_t *s)
{
return s->last_speech_sender_stamp + s->last_speech_sender_len;
}
/*- End of function --------------------------------------------------------*/
-timestamp_t playout_current_length(playout_state_t *s)
+SPAN_DECLARE(timestamp_t) playout_current_length(playout_state_t *s)
{
return s->target_buffer_length;
}
/*- End of function --------------------------------------------------------*/
-playout_frame_t *playout_get_unconditional(playout_state_t *s)
+SPAN_DECLARE(playout_frame_t *) playout_get_unconditional(playout_state_t *s)
{
playout_frame_t *frame;
@@ -103,7 +103,7 @@
}
/*- End of function --------------------------------------------------------*/
-int playout_get(playout_state_t *s, playout_frame_t *frameout, timestamp_t now)
+SPAN_DECLARE(int) playout_get(playout_state_t *s, playout_frame_t *frameout, timestamp_t now)
{
playout_frame_t *frame;
@@ -222,7 +222,7 @@
}
/*- End of function --------------------------------------------------------*/
-int playout_put(playout_state_t *s, void *data, int type, timestamp_t sender_len, timestamp_t sender_stamp, timestamp_t receiver_stamp)
+SPAN_DECLARE(int) playout_put(playout_state_t *s, void *data, int type, timestamp_t sender_len, timestamp_t sender_stamp, timestamp_t receiver_stamp)
{
playout_frame_t *frame;
playout_frame_t *p;
@@ -305,7 +305,7 @@
}
/*- End of function --------------------------------------------------------*/
-void playout_restart(playout_state_t *s, int min_length, int max_length)
+SPAN_DECLARE(void) playout_restart(playout_state_t *s, int min_length, int max_length)
{
playout_frame_t *frame;
playout_frame_t *next;
@@ -330,7 +330,7 @@
}
/*- End of function --------------------------------------------------------*/
-playout_state_t *playout_new(int min_length, int max_length)
+SPAN_DECLARE(playout_state_t *) playout_new(int min_length, int max_length)
{
playout_state_t *s;
@@ -342,7 +342,7 @@
}
/*- End of function --------------------------------------------------------*/
-void playout_free(playout_state_t *s)
+SPAN_DECLARE(void) playout_free(playout_state_t *s)
{
playout_frame_t *frame;
playout_frame_t *next;
Modified: freeswitch/trunk/libs/spandsp/src/plc.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/plc.c (original)
+++ freeswitch/trunk/libs/spandsp/src/plc.c Mon Feb 2 15:36:29 2009
@@ -115,7 +115,7 @@
}
/*- End of function --------------------------------------------------------*/
-int plc_rx(plc_state_t *s, int16_t amp[], int len)
+SPAN_DECLARE(int) plc_rx(plc_state_t *s, int16_t amp[], int len)
{
int i;
int pitch_overlap;
@@ -159,7 +159,7 @@
}
/*- End of function --------------------------------------------------------*/
-int plc_fillin(plc_state_t *s, int16_t amp[], int len)
+SPAN_DECLARE(int) plc_fillin(plc_state_t *s, int16_t amp[], int len)
{
int i;
int pitch_overlap;
@@ -235,7 +235,7 @@
}
/*- End of function --------------------------------------------------------*/
-plc_state_t *plc_init(plc_state_t *s)
+SPAN_DECLARE(plc_state_t *) plc_init(plc_state_t *s)
{
if (s == NULL)
{
@@ -247,7 +247,7 @@
}
/*- End of function --------------------------------------------------------*/
-int plc_free(plc_state_t *s)
+SPAN_DECLARE(int) plc_free(plc_state_t *s)
{
if (s)
free(s);
Modified: freeswitch/trunk/libs/spandsp/src/power_meter.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/power_meter.c (original)
+++ freeswitch/trunk/libs/spandsp/src/power_meter.c Mon Feb 2 15:36:29 2009
@@ -49,7 +49,7 @@
#include "spandsp/telephony.h"
#include "spandsp/power_meter.h"
-power_meter_t *power_meter_init(power_meter_t *s, int shift)
+SPAN_DECLARE(power_meter_t *) power_meter_init(power_meter_t *s, int shift)
{
if (s == NULL)
{
@@ -62,21 +62,21 @@
}
/*- End of function --------------------------------------------------------*/
-power_meter_t *power_meter_damping(power_meter_t *s, int shift)
+SPAN_DECLARE(power_meter_t *) power_meter_damping(power_meter_t *s, int shift)
{
s->shift = shift;
return s;
}
/*- End of function --------------------------------------------------------*/
-int32_t power_meter_update(power_meter_t *s, int16_t amp)
+SPAN_DECLARE(int32_t) power_meter_update(power_meter_t *s, int16_t amp)
{
s->reading += ((amp*amp - s->reading) >> s->shift);
return s->reading;
}
/*- End of function --------------------------------------------------------*/
-int32_t power_meter_level_dbm0(float level)
+SPAN_DECLARE(int32_t) power_meter_level_dbm0(float level)
{
float l;
@@ -88,7 +88,7 @@
}
/*- End of function --------------------------------------------------------*/
-int32_t power_meter_level_dbov(float level)
+SPAN_DECLARE(int32_t) power_meter_level_dbov(float level)
{
float l;
@@ -99,13 +99,13 @@
}
/*- End of function --------------------------------------------------------*/
-int32_t power_meter_current(power_meter_t *s)
+SPAN_DECLARE(int32_t) power_meter_current(power_meter_t *s)
{
return s->reading;
}
/*- End of function --------------------------------------------------------*/
-float power_meter_current_dbm0(power_meter_t *s)
+SPAN_DECLARE(float) power_meter_current_dbm0(power_meter_t *s)
{
if (s->reading <= 0)
return FLT_MIN;
@@ -114,7 +114,7 @@
}
/*- End of function --------------------------------------------------------*/
-float power_meter_current_dbov(power_meter_t *s)
+SPAN_DECLARE(float) power_meter_current_dbov(power_meter_t *s)
{
if (s->reading <= 0)
return FLT_MIN;
Modified: freeswitch/trunk/libs/spandsp/src/queue.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/queue.c (original)
+++ freeswitch/trunk/libs/spandsp/src/queue.c Mon Feb 2 15:36:29 2009
@@ -45,13 +45,13 @@
#include "spandsp/private/queue.h"
-int queue_empty(queue_state_t *s)
+SPAN_DECLARE(int) queue_empty(queue_state_t *s)
{
return (s->iptr == s->optr);
}
/*- End of function --------------------------------------------------------*/
-int queue_free_space(queue_state_t *s)
+SPAN_DECLARE(int) queue_free_space(queue_state_t *s)
{
int len;
@@ -62,7 +62,7 @@
}
/*- End of function --------------------------------------------------------*/
-int queue_contents(queue_state_t *s)
+SPAN_DECLARE(int) queue_contents(queue_state_t *s)
{
int len;
@@ -73,13 +73,13 @@
}
/*- End of function --------------------------------------------------------*/
-void queue_flush(queue_state_t *s)
+SPAN_DECLARE(void) queue_flush(queue_state_t *s)
{
s->optr = s->iptr;
}
/*- End of function --------------------------------------------------------*/
-int queue_view(queue_state_t *s, uint8_t *buf, int len)
+SPAN_DECLARE(int) queue_view(queue_state_t *s, uint8_t *buf, int len)
{
int real_len;
int to_end;
@@ -129,7 +129,7 @@
}
/*- End of function --------------------------------------------------------*/
-int queue_read(queue_state_t *s, uint8_t *buf, int len)
+SPAN_DECLARE(int) queue_read(queue_state_t *s, uint8_t *buf, int len)
{
int real_len;
int to_end;
@@ -187,7 +187,7 @@
}
/*- End of function --------------------------------------------------------*/
-int queue_read_byte(queue_state_t *s)
+SPAN_DECLARE(int) queue_read_byte(queue_state_t *s)
{
int real_len;
int to_end;
@@ -215,7 +215,7 @@
}
/*- End of function --------------------------------------------------------*/
-int queue_write(queue_state_t *s, const uint8_t *buf, int len)
+SPAN_DECLARE(int) queue_write(queue_state_t *s, const uint8_t *buf, int len)
{
int real_len;
int to_end;
@@ -268,7 +268,7 @@
}
/*- End of function --------------------------------------------------------*/
-int queue_write_byte(queue_state_t *s, uint8_t byte)
+SPAN_DECLARE(int) queue_write_byte(queue_state_t *s, uint8_t byte)
{
int real_len;
int iptr;
@@ -299,7 +299,7 @@
}
/*- End of function --------------------------------------------------------*/
-int queue_state_test_msg(queue_state_t *s)
+SPAN_DECLARE(int) queue_state_test_msg(queue_state_t *s)
{
uint16_t lenx;
@@ -310,7 +310,7 @@
}
/*- End of function --------------------------------------------------------*/
-int queue_read_msg(queue_state_t *s, uint8_t *buf, int len)
+SPAN_DECLARE(int) queue_read_msg(queue_state_t *s, uint8_t *buf, int len)
{
uint16_t lenx;
@@ -336,7 +336,7 @@
}
/*- End of function --------------------------------------------------------*/
-int queue_write_msg(queue_state_t *s, const uint8_t *buf, int len)
+SPAN_DECLARE(int) queue_write_msg(queue_state_t *s, const uint8_t *buf, int len)
{
int real_len;
int to_end;
@@ -395,7 +395,7 @@
}
/*- End of function --------------------------------------------------------*/
-queue_state_t *queue_init(queue_state_t *s, int len, int flags)
+SPAN_DECLARE(queue_state_t *) queue_init(queue_state_t *s, int len, int flags)
{
if (s == NULL)
{
@@ -410,7 +410,7 @@
}
/*- End of function --------------------------------------------------------*/
-int queue_free(queue_state_t *s)
+SPAN_DECLARE(int) queue_free(queue_state_t *s)
{
free(s);
return 0;
Modified: freeswitch/trunk/libs/spandsp/src/schedule.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/schedule.c (original)
+++ freeswitch/trunk/libs/spandsp/src/schedule.c Mon Feb 2 15:36:29 2009
@@ -41,7 +41,7 @@
#include "spandsp/private/logging.h"
#include "spandsp/private/schedule.h"
-int span_schedule_event(span_sched_state_t *s, int us, span_sched_callback_func_t function, void *user_data)
+SPAN_DECLARE(int) span_schedule_event(span_sched_state_t *s, int us, span_sched_callback_func_t function, void *user_data)
{
int i;
@@ -68,7 +68,7 @@
}
/*- End of function --------------------------------------------------------*/
-uint64_t span_schedule_next(span_sched_state_t *s)
+SPAN_DECLARE(uint64_t) span_schedule_next(span_sched_state_t *s)
{
int i;
uint64_t earliest;
@@ -85,13 +85,13 @@
}
/*- End of function --------------------------------------------------------*/
-uint64_t span_schedule_time(span_sched_state_t *s)
+SPAN_DECLARE(uint64_t) span_schedule_time(span_sched_state_t *s)
{
return s->ticker;
}
/*- End of function --------------------------------------------------------*/
-void span_schedule_update(span_sched_state_t *s, int us)
+SPAN_DECLARE(void) span_schedule_update(span_sched_state_t *s, int us)
{
int i;
span_sched_callback_func_t callback;
@@ -114,7 +114,7 @@
}
/*- End of function --------------------------------------------------------*/
-void span_schedule_del(span_sched_state_t *s, int i)
+SPAN_DECLARE(void) span_schedule_del(span_sched_state_t *s, int i)
{
if (i >= s->max_to_date
||
@@ -130,7 +130,7 @@
}
/*- End of function --------------------------------------------------------*/
-span_sched_state_t *span_schedule_init(span_sched_state_t *s)
+SPAN_DECLARE(span_sched_state_t *) span_schedule_init(span_sched_state_t *s)
{
memset(s, 0, sizeof(*s));
span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
@@ -139,7 +139,7 @@
}
/*- End of function --------------------------------------------------------*/
-int span_schedule_release(span_sched_state_t *s)
+SPAN_DECLARE(int) span_schedule_release(span_sched_state_t *s)
{
if (s->sched)
{
Modified: freeswitch/trunk/libs/spandsp/src/sig_tone.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/sig_tone.c (original)
+++ freeswitch/trunk/libs/spandsp/src/sig_tone.c Mon Feb 2 15:36:29 2009
@@ -268,7 +268,7 @@
}
};
-int sig_tone_tx(sig_tone_tx_state_t *s, int16_t amp[], int len)
+SPAN_DECLARE(int) sig_tone_tx(sig_tone_tx_state_t *s, int16_t amp[], int len)
{
int i;
int j;
@@ -347,7 +347,7 @@
}
/*- End of function --------------------------------------------------------*/
-void sig_tone_tx_set_mode(sig_tone_tx_state_t *s, int mode)
+SPAN_DECLARE(void) sig_tone_tx_set_mode(sig_tone_tx_state_t *s, int mode)
{
if ((mode & 0x03) == 0x03 && !(s->current_tx_tone & SIG_TONE_1_PRESENT))
s->high_low_timer = s->desc->high_low_timeout;
@@ -357,7 +357,7 @@
}
/*- End of function --------------------------------------------------------*/
-sig_tone_tx_state_t *sig_tone_tx_init(sig_tone_tx_state_t *s, int tone_type, sig_tone_func_t sig_update, void *user_data)
+SPAN_DECLARE(sig_tone_tx_state_t *) sig_tone_tx_init(sig_tone_tx_state_t *s, int tone_type, sig_tone_func_t sig_update, void *user_data)
{
int i;
@@ -389,7 +389,7 @@
}
/*- End of function --------------------------------------------------------*/
-int sig_tone_rx(sig_tone_rx_state_t *s, int16_t amp[], int len)
+SPAN_DECLARE(int) sig_tone_rx(sig_tone_rx_state_t *s, int16_t amp[], int len)
{
#if defined(SPANDSP_USE_FIXED_POINT)
int32_t x;
@@ -648,7 +648,7 @@
}
/*- End of function --------------------------------------------------------*/
-sig_tone_rx_state_t *sig_tone_rx_init(sig_tone_rx_state_t *s, int tone_type, sig_tone_func_t sig_update, void *user_data)
+SPAN_DECLARE(sig_tone_rx_state_t *) sig_tone_rx_init(sig_tone_rx_state_t *s, int tone_type, sig_tone_func_t sig_update, void *user_data)
{
if (sig_update == NULL || tone_type < 1 || tone_type > 3)
return NULL;
Modified: freeswitch/trunk/libs/spandsp/src/silence_gen.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/silence_gen.c (original)
+++ freeswitch/trunk/libs/spandsp/src/silence_gen.c Mon Feb 2 15:36:29 2009
@@ -51,7 +51,7 @@
#include "spandsp/async.h"
#include "spandsp/silence_gen.h"
-int silence_gen(silence_gen_state_t *s, int16_t *amp, int max_len)
+SPAN_DECLARE(int) silence_gen(silence_gen_state_t *s, int16_t *amp, int max_len)
{
if (s->remaining_samples != INT_MAX)
{
@@ -70,20 +70,20 @@
}
/*- End of function --------------------------------------------------------*/
-void silence_gen_always(silence_gen_state_t *s)
+SPAN_DECLARE(void) silence_gen_always(silence_gen_state_t *s)
{
s->remaining_samples = INT_MAX;
}
/*- End of function --------------------------------------------------------*/
-void silence_gen_set(silence_gen_state_t *s, int silent_samples)
+SPAN_DECLARE(void) silence_gen_set(silence_gen_state_t *s, int silent_samples)
{
s->remaining_samples = silent_samples;
s->total_samples = 0;
}
/*- End of function --------------------------------------------------------*/
-void silence_gen_alter(silence_gen_state_t *s, int silent_samples)
+SPAN_DECLARE(void) silence_gen_alter(silence_gen_state_t *s, int silent_samples)
{
/* Block negative silences */
if (silent_samples < 0)
@@ -96,26 +96,26 @@
}
/*- End of function --------------------------------------------------------*/
-int silence_gen_remainder(silence_gen_state_t *s)
+SPAN_DECLARE(int) silence_gen_remainder(silence_gen_state_t *s)
{
return s->remaining_samples;
}
/*- End of function --------------------------------------------------------*/
-int silence_gen_generated(silence_gen_state_t *s)
+SPAN_DECLARE(int) silence_gen_generated(silence_gen_state_t *s)
{
return s->total_samples;
}
/*- End of function --------------------------------------------------------*/
-void silence_gen_status_handler(silence_gen_state_t *s, modem_tx_status_func_t handler, void *user_data)
+SPAN_DECLARE(void) silence_gen_status_handler(silence_gen_state_t *s, modem_tx_status_func_t handler, void *user_data)
{
s->status_handler = handler;
s->status_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
-silence_gen_state_t *silence_gen_init(silence_gen_state_t *s, int silent_samples)
+SPAN_DECLARE(silence_gen_state_t *) silence_gen_init(silence_gen_state_t *s, int silent_samples)
{
if (s == NULL)
{
@@ -137,7 +137,7 @@
}
/*- End of function --------------------------------------------------------*/
-int span_dummy_mod(void *user_data, int16_t amp[], int len)
+SPAN_DECLARE(int) span_dummy_mod(void *user_data, int16_t amp[], int len)
{
return len;
}
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/adsi.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/adsi.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/adsi.h Mon Feb 2 15:36:29 2009
@@ -392,7 +392,7 @@
\param user_data An opaque pointer for the callback routine.
\return A pointer to the initialised context, or NULL if there was a problem.
*/
-SPAN_DECLARE(adsi_rx_state_t) *adsi_rx_init(adsi_rx_state_t *s, int standard, put_msg_func_t put_msg, void *user_data);
+SPAN_DECLARE(adsi_rx_state_t *) adsi_rx_init(adsi_rx_state_t *s, int standard, put_msg_func_t put_msg, void *user_data);
SPAN_DECLARE(int) adsi_rx_free(adsi_rx_state_t *s);
@@ -409,7 +409,7 @@
\param standard The code for the ADSI standard to be used.
\return A pointer to the initialised context, or NULL if there was a problem.
*/
-SPAN_DECLARE(adsi_tx_state_t) *adsi_tx_init(adsi_tx_state_t *s, int standard);
+SPAN_DECLARE(adsi_tx_state_t *) adsi_tx_init(adsi_tx_state_t *s, int standard);
SPAN_DECLARE(int) adsi_tx_free(adsi_tx_state_t *s);
@@ -474,7 +474,7 @@
\param standard The code for the standard.
\return A pointer to the name.
*/
-SPAN_DECLARE(const char) *adsi_standard_to_str(int standard);
+SPAN_DECLARE(const char *) adsi_standard_to_str(int standard);
#if defined(__cplusplus)
}
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/async.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/async.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/async.h Mon Feb 2 15:36:29 2009
@@ -138,7 +138,7 @@
\brief Convert a signal status to a short text description.
\param status The modem signal status.
\return A pointer to the description. */
-SPAN_DECLARE(const char) *signal_status_to_str(int status);
+SPAN_DECLARE(const char *) signal_status_to_str(int status);
/*! Initialise an asynchronous data transmit context.
\brief Initialise an asynchronous data transmit context.
@@ -150,7 +150,7 @@
\param get_byte The callback routine used to get the data to be transmitted.
\param user_data An opaque pointer.
\return A pointer to the initialised context, or NULL if there was a problem. */
-SPAN_DECLARE(async_tx_state_t) *async_tx_init(async_tx_state_t *s,
+SPAN_DECLARE(async_tx_state_t *) async_tx_init(async_tx_state_t *s,
int data_bits,
int parity_bits,
int stop_bits,
@@ -162,7 +162,7 @@
\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. */
-SPAN_DECLARE(int) async_tx_get_bit(void *user_data);
+int async_tx_get_bit(void *user_data);
/*! Initialise an asynchronous data receiver context.
\brief Initialise an asynchronous data receiver context.
@@ -174,7 +174,7 @@
\param put_byte The callback routine used to put the received data.
\param user_data An opaque pointer.
\return A pointer to the initialised context, or NULL if there was a problem. */
-SPAN_DECLARE(async_rx_state_t) *async_rx_init(async_rx_state_t *s,
+SPAN_DECLARE(async_rx_state_t *) async_rx_init(async_rx_state_t *s,
int data_bits,
int parity_bits,
int stop_bits,
@@ -191,7 +191,7 @@
- SIG_STATUS_TRAINING_SUCCEEDED
- SIG_STATUS_TRAINING_FAILED
- SIG_STATUS_END_OF_DATA */
-SPAN_DECLARE(void) async_rx_put_bit(void *user_data, int bit);
+void async_rx_put_bit(void *user_data, int bit);
#if defined(__cplusplus)
}
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/at_interpreter.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/at_interpreter.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/at_interpreter.h Mon Feb 2 15:36:29 2009
@@ -173,7 +173,7 @@
\param modem_control_handler x.
\param modem_control_user_data x.
\return A pointer to the AT context, or NULL if there was a problem. */
-SPAN_DECLARE(at_state_t) *at_init(at_state_t *s,
+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,
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/awgn.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/awgn.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/awgn.h Mon Feb 2 15:36:29 2009
@@ -78,9 +78,9 @@
{
#endif
-SPAN_DECLARE(awgn_state_t) *awgn_init_dbm0(awgn_state_t *s, int idum, float level);
+SPAN_DECLARE(awgn_state_t *) awgn_init_dbm0(awgn_state_t *s, int idum, float level);
-SPAN_DECLARE(awgn_state_t) *awgn_init_dbov(awgn_state_t *s, int idum, float level);
+SPAN_DECLARE(awgn_state_t *) awgn_init_dbov(awgn_state_t *s, int idum, float level);
SPAN_DECLARE(int16_t) awgn(awgn_state_t *s);
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/bell_r2_mf.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/bell_r2_mf.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/bell_r2_mf.h Mon Feb 2 15:36:29 2009
@@ -150,7 +150,7 @@
/*! \brief Initialise a Bell MF generator context.
\param s The Bell MF generator context.
\return A pointer to the Bell MF generator context.*/
-SPAN_DECLARE(bell_mf_tx_state_t) *bell_mf_tx_init(bell_mf_tx_state_t *s);
+SPAN_DECLARE(bell_mf_tx_state_t *) bell_mf_tx_init(bell_mf_tx_state_t *s);
/*! \brief Free a Bell MF generator context.
\param s The Bell MF generator context.
@@ -175,7 +175,7 @@
\param fwd TRUE if the context is for forward signals. FALSE if the
context is for backward signals.
\return A pointer to the MFC/R2 generator context.*/
-SPAN_DECLARE(r2_mf_tx_state_t) *r2_mf_tx_init(r2_mf_tx_state_t *s, int fwd);
+SPAN_DECLARE(r2_mf_tx_state_t *) r2_mf_tx_init(r2_mf_tx_state_t *s, int fwd);
/*! \brief Free an R2 MF tone generator context.
\param s The R2 MF tone generator context.
@@ -205,7 +205,7 @@
\param user_data An opaque pointer which is associated with the context,
and supplied in callbacks.
\return A pointer to the Bell MF receiver context.*/
-SPAN_DECLARE(bell_mf_rx_state_t) *bell_mf_rx_init(bell_mf_rx_state_t *s,
+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);
@@ -237,7 +237,7 @@
\param user_data An opaque pointer which is associated with the context,
and supplied in callbacks.
\return A pointer to the R2 MF receiver context. */
-SPAN_DECLARE(r2_mf_rx_state_t) *r2_mf_rx_init(r2_mf_rx_state_t *s,
+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);
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/bert.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/bert.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/bert.h Mon Feb 2 15:36:29 2009
@@ -116,7 +116,7 @@
/*! Return a short description of a BERT event.
\param event The event type.
\return A pointer to a short text string describing the event. */
-SPAN_DECLARE(const char) *bert_event_to_str(int event);
+SPAN_DECLARE(const char *) bert_event_to_str(int event);
/*! Initialise a BERT context.
\param s The BERT context.
@@ -125,7 +125,7 @@
\param resync_len ???
\param resync_percent The percentage of bad bits which will cause a resync.
\return The BERT context. */
-SPAN_DECLARE(bert_state_t) *bert_init(bert_state_t *s, int limit, int pattern, int resync_len, int resync_percent);
+SPAN_DECLARE(bert_state_t *) bert_init(bert_state_t *s, int limit, int pattern, int resync_len, int resync_percent);
/*! Get the next bit of the BERT sequence from the generator.
\param s The BERT context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/complex_filters.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/complex_filters.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/complex_filters.h Mon Feb 2 15:36:29 2009
@@ -59,11 +59,11 @@
{
#endif
-SPAN_DECLARE(filter_t) *filter_create(fspec_t *fs);
+SPAN_DECLARE(filter_t *) filter_create(fspec_t *fs);
SPAN_DECLARE(void) filter_delete(filter_t *fi);
SPAN_DECLARE(float) filter_step(filter_t *fi, float x);
-SPAN_DECLARE(cfilter_t) *cfilter_create(fspec_t *fs);
+SPAN_DECLARE(cfilter_t *) cfilter_create(fspec_t *fs);
SPAN_DECLARE(void) cfilter_delete(cfilter_t *cfi);
SPAN_DECLARE(complexf_t) cfilter_step(cfilter_t *cfi, const complexf_t *z);
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/dtmf.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/dtmf.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/dtmf.h Mon Feb 2 15:36:29 2009
@@ -125,7 +125,7 @@
/*! \brief Initialise a DTMF tone generator context.
\param s The DTMF generator context.
\return A pointer to the DTMF generator context. */
-SPAN_DECLARE(dtmf_tx_state_t) *dtmf_tx_init(dtmf_tx_state_t *s);
+SPAN_DECLARE(dtmf_tx_state_t *) dtmf_tx_init(dtmf_tx_state_t *s);
/*! \brief Free a DTMF tone generator context.
\param s The DTMF tone generator context.
@@ -191,7 +191,7 @@
\param user_data An opaque pointer which is associated with the context,
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,
+SPAN_DECLARE(dtmf_rx_state_t *) dtmf_rx_init(dtmf_rx_state_t *s,
digits_rx_callback_t callback,
void *user_data);
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/echo.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/echo.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/echo.h Mon Feb 2 15:36:29 2009
@@ -196,7 +196,7 @@
\param len The length of the canceller, in samples.
\return The new canceller context, or NULL if the canceller could not be created.
*/
-SPAN_DECLARE(echo_can_state_t) *echo_can_create(int len, int adaption_mode);
+SPAN_DECLARE(echo_can_state_t *) echo_can_create(int len, int adaption_mode);
/*! Free a voice echo canceller context.
\param ec The echo canceller context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/fax.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/fax.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/fax.h Mon Feb 2 15:36:29 2009
@@ -85,14 +85,14 @@
\param s The FAX context.
\return A pointer to the T.30 context, or NULL.
*/
-SPAN_DECLARE(t30_state_t) *fax_get_t30_state(fax_state_t *s);
+SPAN_DECLARE(t30_state_t *) fax_get_t30_state(fax_state_t *s);
/*! Get a pointer to the logging context associated with a FAX context.
\brief Get a pointer to the logging context associated with a FAX context.
\param s The FAX context.
\return A pointer to the logging context, or NULL.
*/
-SPAN_DECLARE(logging_state_t) *fax_get_logging_state(fax_state_t *s);
+SPAN_DECLARE(logging_state_t *) fax_get_logging_state(fax_state_t *s);
/*! Initialise a FAX context.
\brief Initialise a FAX context.
@@ -101,7 +101,7 @@
context is for an answering party.
\return A pointer to the FAX context, or NULL if there was a problem.
*/
-SPAN_DECLARE(fax_state_t) *fax_init(fax_state_t *s, int calling_party);
+SPAN_DECLARE(fax_state_t *) fax_init(fax_state_t *s, int calling_party);
/*! Release a FAX context.
\brief Release a FAX context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h Mon Feb 2 15:36:29 2009
@@ -44,7 +44,7 @@
SPAN_DECLARE(int) fax_modems_v17_v21_rx(void *user_data, const int16_t amp[], int len);
SPAN_DECLARE(int) fax_modems_v27ter_v21_rx(void *user_data, const int16_t amp[], int len);
SPAN_DECLARE(int) fax_modems_v29_v21_rx(void *user_data, const int16_t amp[], int len);
-SPAN_DECLARE(fax_modems_state_t) *fax_modems_init(fax_modems_state_t *s, void *user_data);
+SPAN_DECLARE(fax_modems_state_t *) fax_modems_init(fax_modems_state_t *s, void *user_data);
#if defined(__cplusplus)
}
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h Mon Feb 2 15:36:29 2009
@@ -143,7 +143,7 @@
\param get_bit The callback routine used to get the data to be transmitted.
\param user_data An opaque pointer.
\return A pointer to the modem context, or NULL if there was a problem. */
-SPAN_DECLARE(fsk_tx_state_t) *fsk_tx_init(fsk_tx_state_t *s,
+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);
@@ -191,7 +191,7 @@
\param put_bit The callback routine used to put the received data.
\param user_data An opaque pointer.
\return A pointer to the modem context, or NULL if there was a problem. */
-SPAN_DECLARE(fsk_rx_state_t) *fsk_rx_init(fsk_rx_state_t *s,
+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,
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/g711.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/g711.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/g711.h Mon Feb 2 15:36:29 2009
@@ -278,7 +278,7 @@
\param s The G.711 context.
\param mode The G.711 mode.
\return A pointer to the G.711 context, or NULL for error. */
-SPAN_DECLARE(g711_state_t) *g711_init(g711_state_t *s, int mode);
+SPAN_DECLARE(g711_state_t *) g711_init(g711_state_t *s, int mode);
/*! Free a G.711 encode or decode context.
\param s The G.711 context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/g722.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/g722.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/g722.h Mon Feb 2 15:36:29 2009
@@ -71,7 +71,7 @@
The valid rates are 64000, 56000 and 48000.
\param options
\return A pointer to the G.722 encode context, or NULL for error. */
-SPAN_DECLARE(g722_encode_state_t) *g722_encode_init(g722_encode_state_t *s, int rate, int options);
+SPAN_DECLARE(g722_encode_state_t *) g722_encode_init(g722_encode_state_t *s, int rate, int options);
SPAN_DECLARE(int) g722_encode_release(g722_encode_state_t *s);
@@ -89,7 +89,7 @@
The valid rates are 64000, 56000 and 48000.
\param options
\return A pointer to the G.722 decode context, or NULL for error. */
-SPAN_DECLARE(g722_decode_state_t) *g722_decode_init(g722_decode_state_t *s, int rate, int options);
+SPAN_DECLARE(g722_decode_state_t *) g722_decode_init(g722_decode_state_t *s, int rate, int options);
SPAN_DECLARE(int) g722_decode_release(g722_decode_state_t *s);
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/g726.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/g726.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/g726.h Mon Feb 2 15:36:29 2009
@@ -77,7 +77,7 @@
\param ext_coding The coding used outside G.726.
\param packing One of the G.726_PACKING_xxx options.
\return A pointer to the G.726 context, or NULL for error. */
-SPAN_DECLARE(g726_state_t) *g726_init(g726_state_t *s, int bit_rate, int ext_coding, int packing);
+SPAN_DECLARE(g726_state_t *) g726_init(g726_state_t *s, int bit_rate, int ext_coding, int packing);
/*! Free a G.726 encode or decode context.
\param s The G.726 context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/gsm0610.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/gsm0610.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/gsm0610.h Mon Feb 2 15:36:29 2009
@@ -83,7 +83,7 @@
\param s The GSM 06.10 context
\param packing One of the GSM0610_PACKING_xxx options.
\return A pointer to the GSM 06.10 context, or NULL for error. */
-SPAN_DECLARE(gsm0610_state_t) *gsm0610_init(gsm0610_state_t *s, int packing);
+SPAN_DECLARE(gsm0610_state_t *) gsm0610_init(gsm0610_state_t *s, int packing);
/*! Release a GSM 06.10 encode or decode context.
\param s The GSM 06.10 context
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/hdlc.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/hdlc.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/hdlc.h Mon Feb 2 15:36:29 2009
@@ -94,7 +94,7 @@
\param user_data An opaque parameter for the callback routine.
\return A pointer to the HDLC receiver context.
*/
-SPAN_DECLARE(hdlc_rx_state_t) *hdlc_rx_init(hdlc_rx_state_t *s,
+SPAN_DECLARE(hdlc_rx_state_t *) hdlc_rx_init(hdlc_rx_state_t *s,
int crc32,
int report_bad_frames,
int framing_ok_threshold,
@@ -150,7 +150,7 @@
\param user_data An opaque parameter for the callback routine.
\return A pointer to the HDLC transmitter context.
*/
-SPAN_DECLARE(hdlc_tx_state_t) *hdlc_tx_init(hdlc_tx_state_t *s,
+SPAN_DECLARE(hdlc_tx_state_t *) hdlc_tx_init(hdlc_tx_state_t *s,
int crc32,
int inter_frame_flags,
int progressive,
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/ima_adpcm.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/ima_adpcm.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/ima_adpcm.h Mon Feb 2 15:36:29 2009
@@ -73,7 +73,7 @@
zero sample samples means treat each encode or decode operation
as a chunk.
\return A pointer to the IMA ADPCM context, or NULL for error. */
-SPAN_DECLARE(ima_adpcm_state_t) *ima_adpcm_init(ima_adpcm_state_t *s,
+SPAN_DECLARE(ima_adpcm_state_t *) ima_adpcm_init(ima_adpcm_state_t *s,
int variant,
int chunk_size);
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/lpc10.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/lpc10.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/lpc10.h Mon Feb 2 15:36:29 2009
@@ -74,7 +74,7 @@
\param s The LPC10e context
\param error_correction ???
\return A pointer to the LPC10e context, or NULL for error. */
-SPAN_DECLARE(lpc10_encode_state_t) *lpc10_encode_init(lpc10_encode_state_t *s, int error_correction);
+SPAN_DECLARE(lpc10_encode_state_t *) lpc10_encode_init(lpc10_encode_state_t *s, int error_correction);
SPAN_DECLARE(int) lpc10_encode_release(lpc10_encode_state_t *s);
@@ -91,7 +91,7 @@
\param s The LPC10e context
\param error_correction ???
\return A pointer to the LPC10e context, or NULL for error. */
-SPAN_DECLARE(lpc10_decode_state_t) *lpc10_decode_init(lpc10_decode_state_t *st, int error_correction);
+SPAN_DECLARE(lpc10_decode_state_t *) lpc10_decode_init(lpc10_decode_state_t *st, int error_correction);
SPAN_DECLARE(int) lpc10_decode_release(lpc10_decode_state_t *s);
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/modem_connect_tones.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/modem_connect_tones.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/modem_connect_tones.h Mon Feb 2 15:36:29 2009
@@ -104,7 +104,7 @@
/*! \brief Initialise an instance of the modem connect tones generator.
\param s The context.
*/
-SPAN_DECLARE(modem_connect_tones_tx_state_t) *modem_connect_tones_tx_init(modem_connect_tones_tx_state_t *s,
+SPAN_DECLARE(modem_connect_tones_tx_state_t *) modem_connect_tones_tx_init(modem_connect_tones_tx_state_t *s,
int tone_type);
/*! \brief Free an instance of the modem connect tones generator.
@@ -147,7 +147,7 @@
\param user_data An opaque pointer passed to the callback routine,
\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,
+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);
@@ -157,7 +157,7 @@
\return 0 for OK, else -1. */
SPAN_DECLARE(int) modem_connect_tones_rx_free(modem_connect_tones_rx_state_t *s);
-SPAN_DECLARE(const char) *modem_connect_tone_to_str(int tone);
+SPAN_DECLARE(const char *) modem_connect_tone_to_str(int tone);
#if defined(__cplusplus)
}
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/modem_echo.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/modem_echo.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/modem_echo.h Mon Feb 2 15:36:29 2009
@@ -110,7 +110,7 @@
\param len The length of the canceller, in samples.
eturn The new canceller context, or NULL if the canceller could not be created.
*/
-SPAN_DECLARE(modem_echo_can_state_t) *modem_echo_can_create(int len);
+SPAN_DECLARE(modem_echo_can_state_t *) modem_echo_can_create(int len);
/*! Free a modem echo canceller context.
\param ec The echo canceller context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/noise.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/noise.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/noise.h Mon Feb 2 15:36:29 2009
@@ -108,9 +108,9 @@
generation to be adjusted.
\return A pointer to the noise generator context.
*/
-SPAN_DECLARE(noise_state_t) *noise_init_dbm0(noise_state_t *s, int seed, float level, int class_of_noise, int quality);
+SPAN_DECLARE(noise_state_t *) noise_init_dbm0(noise_state_t *s, int seed, float level, int class_of_noise, int quality);
-SPAN_DECLARE(noise_state_t) *noise_init_dbov(noise_state_t *s, int seed, float level, int class_of_noise, int quality);
+SPAN_DECLARE(noise_state_t *) noise_init_dbov(noise_state_t *s, int seed, float level, int class_of_noise, int quality);
SPAN_DECLARE(int) noise_free(noise_state_t *s);
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/oki_adpcm.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/oki_adpcm.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/oki_adpcm.h Mon Feb 2 15:36:29 2009
@@ -61,7 +61,7 @@
\param bit_rate The required bit rate for the ADPCM data.
The valid rates are 24000 and 32000.
\return A pointer to the Oki ADPCM context, or NULL for error. */
-SPAN_DECLARE(oki_adpcm_state_t) *oki_adpcm_init(oki_adpcm_state_t *s,
+SPAN_DECLARE(oki_adpcm_state_t *) oki_adpcm_init(oki_adpcm_state_t *s,
int bit_rate);
/*! Free an Oki ADPCM encode or decode context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/playout.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/playout.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/playout.h Mon Feb 2 15:36:29 2009
@@ -168,7 +168,7 @@
all its contents, before the context is freed.
\param s The play-out context.
\return The frame, or NULL is the queue is empty. */
-SPAN_DECLARE(playout_frame_t) *playout_get_unconditional(playout_state_t *s);
+SPAN_DECLARE(playout_frame_t *) playout_get_unconditional(playout_state_t *s);
/*! Find the current length of the buffer.
\param s The play-out context.
@@ -187,7 +187,7 @@
\param max_length Maximum length of the buffer, in samples. If this equals min_length, static
length buffering is used.
\return The new context */
-SPAN_DECLARE(playout_state_t) *playout_new(int min_length, int max_length);
+SPAN_DECLARE(playout_state_t *) playout_new(int min_length, int max_length);
/*! Destroy an instance of play-out buffering.
\param s The play-out context to be destroyed */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/plc.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/plc.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/plc.h Mon Feb 2 15:36:29 2009
@@ -153,7 +153,7 @@
\brief Initialise a PLC context.
\param s The packet loss concealer context.
\return A pointer to the the packet loss concealer context. */
-SPAN_DECLARE(plc_state_t) *plc_init(plc_state_t *s);
+SPAN_DECLARE(plc_state_t *) plc_init(plc_state_t *s);
/*! Free a packet loss concealer context.
\param s The packet loss concealer context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/power_meter.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/power_meter.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/power_meter.h Mon Feb 2 15:36:29 2009
@@ -66,14 +66,14 @@
\param s The power meter context.
\param shift The shift to be used by the IIR filter.
\return The power meter context. */
-SPAN_DECLARE(power_meter_t) *power_meter_init(power_meter_t *s, int shift);
+SPAN_DECLARE(power_meter_t *) power_meter_init(power_meter_t *s, int shift);
/*! Change the damping factor of a power meter context.
\brief Change the damping factor of a power meter context.
\param s The power meter context.
\param shift The new shift to be used by the IIR filter.
\return The power meter context. */
-SPAN_DECLARE(power_meter_t) *power_meter_damping(power_meter_t *s, int shift);
+SPAN_DECLARE(power_meter_t *) power_meter_damping(power_meter_t *s, int shift);
/*! Update a power meter.
\brief Update a power meter.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/queue.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/queue.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/queue.h Mon Feb 2 15:36:29 2009
@@ -158,7 +158,7 @@
\param flags Flags controlling the operation of the queue.
Valid flags are QUEUE_READ_ATOMIC and QUEUE_WRITE_ATOMIC.
\return A pointer to the context if OK, else NULL. */
-SPAN_DECLARE(queue_state_t) *queue_init(queue_state_t *s, int len, int flags);
+SPAN_DECLARE(queue_state_t *) queue_init(queue_state_t *s, int len, int flags);
/*! Delete a queue.
\brief Delete a queue.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/schedule.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/schedule.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/schedule.h Mon Feb 2 15:36:29 2009
@@ -58,7 +58,7 @@
SPAN_DECLARE(void) span_schedule_update(span_sched_state_t *s, int us);
SPAN_DECLARE(void) span_schedule_del(span_sched_state_t *s, int id);
-SPAN_DECLARE(span_sched_state_t) *span_schedule_init(span_sched_state_t *s);
+SPAN_DECLARE(span_sched_state_t *) span_schedule_init(span_sched_state_t *s);
SPAN_DECLARE(int) span_schedule_release(span_sched_state_t *s);
#if defined(__cplusplus)
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/sig_tone.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/sig_tone.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/sig_tone.h Mon Feb 2 15:36:29 2009
@@ -113,7 +113,7 @@
\param sig_update Callback function to handle signaling updates.
\param user_data An opaque pointer.
\return A pointer to the signalling tone context, or NULL if there was a problem. */
-SPAN_DECLARE(sig_tone_rx_state_t) *sig_tone_rx_init(sig_tone_rx_state_t *s, int tone_type, sig_tone_func_t sig_update, void *user_data);
+SPAN_DECLARE(sig_tone_rx_state_t *) sig_tone_rx_init(sig_tone_rx_state_t *s, int tone_type, sig_tone_func_t sig_update, void *user_data);
/*! Generate a block of signaling tone audio samples.
\brief Generate a block of signaling tone audio samples.
@@ -136,7 +136,7 @@
\param sig_update Callback function to handle signaling updates.
\param user_data An opaque pointer.
\return A pointer to the signalling tone context, or NULL if there was a problem. */
-SPAN_DECLARE(sig_tone_tx_state_t) *sig_tone_tx_init(sig_tone_tx_state_t *s, int tone_type, sig_tone_func_t sig_update, void *user_data);
+SPAN_DECLARE(sig_tone_tx_state_t *) sig_tone_tx_init(sig_tone_tx_state_t *s, int tone_type, sig_tone_func_t sig_update, void *user_data);
#if defined(__cplusplus)
}
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h Mon Feb 2 15:36:29 2009
@@ -103,7 +103,7 @@
\param silent_samples The initial number of samples to set the silence to.
\return A pointer to the silence generator context.
*/
-SPAN_DECLARE(silence_gen_state_t) *silence_gen_init(silence_gen_state_t *s, int silent_samples);
+SPAN_DECLARE(silence_gen_state_t *) silence_gen_init(silence_gen_state_t *s, int silent_samples);
/* The following dummy routines, to absorb data, don't really have a proper home,
so they have been put here. */
@@ -117,7 +117,7 @@
\param len The length of the signal buffer
\return 0.
*/
-SPAN_DECLARE(int) span_dummy_rx(void *user_data, const int16_t amp[], int len);
+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
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_rx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_rx.h Mon Feb 2 15:36:29 2009
@@ -73,7 +73,7 @@
descriptor.
\return The supervisory tone set descriptor.
*/
-SPAN_DECLARE(super_tone_rx_descriptor_t) *super_tone_rx_make_descriptor(super_tone_rx_descriptor_t *desc);
+SPAN_DECLARE(super_tone_rx_descriptor_t *) super_tone_rx_make_descriptor(super_tone_rx_descriptor_t *desc);
/*! Free a supervisory tone detector descriptor.
\param desc The supervisory tone set desciptor.
@@ -110,7 +110,7 @@
\param user_data An opaque pointer passed when calling the callback routine.
\return The supervisory tone detector context.
*/
-SPAN_DECLARE(super_tone_rx_state_t) *super_tone_rx_init(super_tone_rx_state_t *s,
+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);
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_tx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_tx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_tx.h Mon Feb 2 15:36:29 2009
@@ -50,7 +50,7 @@
{
#endif
-SPAN_DECLARE(super_tone_tx_step_t) *super_tone_tx_make_step(super_tone_tx_step_t *s,
+SPAN_DECLARE(super_tone_tx_step_t *) super_tone_tx_make_step(super_tone_tx_step_t *s,
float f1,
float l1,
float f2,
@@ -65,7 +65,7 @@
\param s The supervisory tone generator context.
\param tree The supervisory tone tree to be generated.
\return The supervisory tone generator context. */
-SPAN_DECLARE(super_tone_tx_state_t) *super_tone_tx_init(super_tone_tx_state_t *s, super_tone_tx_step_t *tree);
+SPAN_DECLARE(super_tone_tx_state_t *) super_tone_tx_init(super_tone_tx_state_t *s, super_tone_tx_step_t *tree);
/*! Generate a block of audio samples for a supervisory tone pattern.
\brief Generate a block of audio samples for a supervisory tone pattern.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t30.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t30.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t30.h Mon Feb 2 15:36:29 2009
@@ -558,7 +558,7 @@
\param send_hdlc_handler
\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,
+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,
@@ -607,7 +607,7 @@
\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. */
-SPAN_DECLARE(int) t30_non_ecm_get_bit(void *user_data);
+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 @@
\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. */
-SPAN_DECLARE(void) t30_non_ecm_put_bit(void *user_data, int bit);
+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 @@
\param msg The HDLC message.
\param len The length of the message, in octets.
\param ok TRUE if the frame was received without error. */
-SPAN_DECLARE(void) t30_hdlc_accept(void *user_data, const uint8_t *msg, int len, int ok);
+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.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t30_api.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t30_api.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t30_api.h Mon Feb 2 15:36:29 2009
@@ -113,14 +113,14 @@
\param s The T.30 context.
\param id A pointer to the identifier.
\return 0 for OK, else -1. */
-SPAN_DECLARE(const char) *t30_get_tx_ident(t30_state_t *s);
+SPAN_DECLARE(const char *) t30_get_tx_ident(t30_state_t *s);
/*! Get the transmitted identifier associated with a T.30 context.
\brief Set the transmitted identifier associated with a T.30 context.
\param s The T.30 context.
\param id A pointer to the identifier.
\return 0 for OK, else -1. */
-SPAN_DECLARE(const char) *t30_get_rx_ident(t30_state_t *s);
+SPAN_DECLARE(const char *) t30_get_rx_ident(t30_state_t *s);
/*! Set the transmitted sub-address associated with a T.30 context.
\brief Set the transmitted sub-address associated with a T.30 context.
@@ -134,14 +134,14 @@
\param s The T.30 context.
\param sub_address A pointer to the sub-address.
\return 0 for OK, else -1. */
-SPAN_DECLARE(const char) *t30_get_tx_sub_address(t30_state_t *s);
+SPAN_DECLARE(const char *) t30_get_tx_sub_address(t30_state_t *s);
/*! Get the received sub-address associated with a T.30 context.
\brief Get the received sub-address associated with a T.30 context.
\param s The T.30 context.
\param sub_address A pointer to the sub-address.
\return 0 for OK, else -1. */
-SPAN_DECLARE(const char) *t30_get_rx_sub_address(t30_state_t *s);
+SPAN_DECLARE(const char *) t30_get_rx_sub_address(t30_state_t *s);
/*! Set the transmitted selective polling address (i.e. the one we will send to the far
end) associated with a T.30 context.
@@ -157,7 +157,7 @@
\param s The T.30 context.
\param selective_polling_address A pointer to the selective polling address.
\return 0 for OK, else -1. */
-SPAN_DECLARE(const char) *t30_get_tx_selective_polling_address(t30_state_t *s);
+SPAN_DECLARE(const char *) t30_get_tx_selective_polling_address(t30_state_t *s);
/*! Get the received selective polling address (i.e. the one we will send to the far
end) associated with a T.30 context.
@@ -165,7 +165,7 @@
\param s The T.30 context.
\param selective_polling_address A pointer to the selective polling address.
\return 0 for OK, else -1. */
-SPAN_DECLARE(const char) *t30_get_rx_selective_polling_address(t30_state_t *s);
+SPAN_DECLARE(const char *) t30_get_rx_selective_polling_address(t30_state_t *s);
/*! Set the transmitted polled sub-address (i.e. the one we will send to the far
end) associated with a T.30 context.
@@ -181,7 +181,7 @@
\param s The T.30 context.
\param polled_sub_address A pointer to the polled sub-address.
\return 0 for OK, else -1. */
-SPAN_DECLARE(const char) *t30_get_tx_polled_sub_address(t30_state_t *s);
+SPAN_DECLARE(const char *) t30_get_tx_polled_sub_address(t30_state_t *s);
/*! Get the received polled sub-address (i.e. the one we will send to the far
end) associated with a T.30 context.
@@ -189,7 +189,7 @@
\param s The T.30 context.
\param polled_sub_address A pointer to the polled sub-address.
\return 0 for OK, else -1. */
-SPAN_DECLARE(const char) *t30_get_rx_polled_sub_address(t30_state_t *s);
+SPAN_DECLARE(const char *) t30_get_rx_polled_sub_address(t30_state_t *s);
/*! Set the transmitted sender ident (i.e. the one we will send to the far
end) associated with a T.30 context.
@@ -205,7 +205,7 @@
\param s The T.30 context.
\param sender_ident A pointer to the sender ident.
\return 0 for OK, else -1. */
-SPAN_DECLARE(const char) *t30_get_tx_sender_ident(t30_state_t *s);
+SPAN_DECLARE(const char *) t30_get_tx_sender_ident(t30_state_t *s);
/*! Get the received sender ident (i.e. the one we will send to the far
end) associated with a T.30 context.
@@ -213,7 +213,7 @@
\param s The T.30 context.
\param sender_ident A pointer to the sender ident.
\return 0 for OK, else -1. */
-SPAN_DECLARE(const char) *t30_get_rx_sender_ident(t30_state_t *s);
+SPAN_DECLARE(const char *) t30_get_rx_sender_ident(t30_state_t *s);
/*! Set the transmitted password (i.e. the one we will send to the far
end) associated with a T.30 context.
@@ -229,7 +229,7 @@
\param s The T.30 context.
\param password A pointer to the password.
\return 0 for OK, else -1. */
-SPAN_DECLARE(const char) *t30_get_tx_password(t30_state_t *s);
+SPAN_DECLARE(const char *) t30_get_tx_password(t30_state_t *s);
/*! Get the received password (i.e. the one we will send to the far
end) associated with a T.30 context.
@@ -237,7 +237,7 @@
\param s The T.30 context.
\param password A pointer to the password.
\return 0 for OK, else -1. */
-SPAN_DECLARE(const char) *t30_get_rx_password(t30_state_t *s);
+SPAN_DECLARE(const char *) t30_get_rx_password(t30_state_t *s);
/*! Set the transmitted ??? (i.e. the one we will send to the far
end) associated with a T.30 context.
@@ -406,19 +406,19 @@
\brief Get the country of origin of the remote FAX machine associated with a T.30 context.
\param s The T.30 context.
\return a pointer to the country name, or NULL if the country is not known. */
-SPAN_DECLARE(const char) *t30_get_rx_country(t30_state_t *s);
+SPAN_DECLARE(const char *) t30_get_rx_country(t30_state_t *s);
/*! Get the name of the vendor of the remote FAX machine associated with a T.30 context.
\brief Get the name of the vendor of the remote FAX machine associated with a T.30 context.
\param s The T.30 context.
\return a pointer to the vendor name, or NULL if the vendor is not known. */
-SPAN_DECLARE(const char) *t30_get_rx_vendor(t30_state_t *s);
+SPAN_DECLARE(const char *) t30_get_rx_vendor(t30_state_t *s);
/*! Get the name of the model of the remote FAX machine associated with a T.30 context.
\brief Get the name of the model of the remote FAX machine associated with a T.30 context.
\param s The T.30 context.
\return a pointer to the model name, or NULL if the model is not known. */
-SPAN_DECLARE(const char) *t30_get_rx_model(t30_state_t *s);
+SPAN_DECLARE(const char *) t30_get_rx_model(t30_state_t *s);
/*! Specify the file name of the next TIFF file to be received by a T.30
context.
@@ -557,7 +557,7 @@
\param s The T.30 context.
\return A pointer to the logging context, or NULL.
*/
-SPAN_DECLARE(logging_state_t) *t30_get_logging_state(t30_state_t *s);
+SPAN_DECLARE(logging_state_t *) t30_get_logging_state(t30_state_t *s);
#if defined(__cplusplus)
}
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t30_logging.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t30_logging.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t30_logging.h Mon Feb 2 15:36:29 2009
@@ -40,7 +40,7 @@
\param x The frametype octet.
\return A pointer to the text name for the frame type. If the frame type is
not value, the string "???" is returned. */
-SPAN_DECLARE(const char) *t30_frametype(uint8_t x);
+SPAN_DECLARE(const char *) t30_frametype(uint8_t x);
/*! Decode a DIS, DTC or DCS frame, and log the contents.
\brief Decode a DIS, DTC or DCS frame, and log the contents.
@@ -53,7 +53,7 @@
\brief Convert a phase E completion code to a short text description.
\param result The result code.
\return A pointer to the description. */
-SPAN_DECLARE(const char) *t30_completion_code_to_str(int result);
+SPAN_DECLARE(const char *) t30_completion_code_to_str(int result);
#if defined(__cplusplus)
}
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t31.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t31.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t31.h Mon Feb 2 15:36:29 2009
@@ -111,9 +111,9 @@
\param s The T.31 context.
\return A pointer to the logging context, or NULL.
*/
-SPAN_DECLARE(logging_state_t) *t31_get_logging_state(t31_state_t *s);
+SPAN_DECLARE(logging_state_t *) t31_get_logging_state(t31_state_t *s);
-SPAN_DECLARE(t38_core_state_t) *t31_get_t38_core_state(t31_state_t *s);
+SPAN_DECLARE(t38_core_state_t *) t31_get_t38_core_state(t31_state_t *s);
/*! Initialise a T.31 context. This must be called before the first
use of the context, to initialise its contents.
@@ -126,7 +126,7 @@
\param tx_t38_packet_handler ???
\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,
+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,
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t38_core.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t38_core.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t38_core.h Mon Feb 2 15:36:29 2009
@@ -197,28 +197,28 @@
/*! \brief Convert the code for an indicator to a short text name.
\param indicator The type of indicator.
\return A pointer to a short text name for the indicator. */
-SPAN_DECLARE(const char) *t38_indicator_to_str(int indicator);
+SPAN_DECLARE(const char *) t38_indicator_to_str(int indicator);
/*! \brief Convert the code for a type of data to a short text name.
\param data_type The data type.
\return A pointer to a short text name for the data type. */
-SPAN_DECLARE(const char) *t38_data_type_to_str(int data_type);
+SPAN_DECLARE(const char *) t38_data_type_to_str(int data_type);
/*! \brief Convert the code for a type of data field to a short text name.
\param field_type The field type.
\return A pointer to a short text name for the field type. */
-SPAN_DECLARE(const char) *t38_field_type_to_str(int field_type);
+SPAN_DECLARE(const char *) t38_field_type_to_str(int field_type);
/*! \brief Convert the code for a CM profile code to text description.
\param profile The profile code from a CM message.
\return A pointer to a short text description of the profile. */
-SPAN_DECLARE(const char) *t38_cm_profile_to_str(int profile);
+SPAN_DECLARE(const char *) t38_cm_profile_to_str(int profile);
/*! \brief Convert a JM message code to text description.
\param data The data field of the message.
\param len The length of the data field.
\return A pointer to a short text description of the profile. */
-SPAN_DECLARE(const char) *t38_jm_to_str(const uint8_t *data, int len);
+SPAN_DECLARE(const char *) t38_jm_to_str(const uint8_t *data, int len);
/*! \brief Convert a V34rate message to an actual bit rate.
\param data The data field of the message.
@@ -326,9 +326,9 @@
\param s The T.38 context.
\return A pointer to the logging context, or NULL.
*/
-SPAN_DECLARE(logging_state_t) *t38_core_get_logging_state(t38_core_state_t *s);
+SPAN_DECLARE(logging_state_t *) t38_core_get_logging_state(t38_core_state_t *s);
-SPAN_DECLARE(t38_core_state_t) *t38_core_init(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,
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t38_gateway.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t38_gateway.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t38_gateway.h Mon Feb 2 15:36:29 2009
@@ -82,7 +82,7 @@
\param tx_packet_handler A callback routine to encapsulate and transmit T.38 packets.
\param tx_packet_user_data An opaque pointer passed to the tx_packet_handler routine.
\return A pointer to the termination mode T.38 context, or NULL if there was a problem. */
-SPAN_DECLARE(t38_gateway_state_t) *t38_gateway_init(t38_gateway_state_t *s,
+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);
@@ -177,14 +177,14 @@
\param s The T.38 context.
\return A pointer to the T.38 core context, or NULL.
*/
-SPAN_DECLARE(t38_core_state_t) *t38_gateway_get_t38_core_state(t38_gateway_state_t *s);
+SPAN_DECLARE(t38_core_state_t *) t38_gateway_get_t38_core_state(t38_gateway_state_t *s);
/*! Get a pointer to the logging context associated with a T.38 context.
\brief Get a pointer to the logging context associated with a T.38 context.
\param s The T.38 context.
\return A pointer to the logging context, or NULL.
*/
-SPAN_DECLARE(logging_state_t) *t38_gateway_get_logging_state(t38_gateway_state_t *s);
+SPAN_DECLARE(logging_state_t *) t38_gateway_get_logging_state(t38_gateway_state_t *s);
/*! Set a callback function for T.30 frame exchange monitoring. This is called from the heart
of the signal processing, so don't take too long in the handler routine.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h Mon Feb 2 15:36:29 2009
@@ -59,7 +59,7 @@
\param mode TRUE for image data mode, or FALSE for TCF mode.
\param bits The minimum number of bits per FAX image row.
\return A pointer to the buffer context, or NULL if there was a problem. */
-SPAN_DECLARE(t38_non_ecm_buffer_state_t) *t38_non_ecm_buffer_init(t38_non_ecm_buffer_state_t *s, int mode, int min_row_bits);
+SPAN_DECLARE(t38_non_ecm_buffer_state_t *) t38_non_ecm_buffer_init(t38_non_ecm_buffer_state_t *s, int mode, int min_row_bits);
/*! \brief Set the mode of a T.38 rate adapting non-ECM buffer context.
\param s The buffer context.
@@ -93,7 +93,7 @@
/*! \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. */
-SPAN_DECLARE(int) t38_non_ecm_buffer_get_bit(void *user_data);
+int t38_non_ecm_buffer_get_bit(void *user_data);
#if defined(__cplusplus)
}
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t38_terminal.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t38_terminal.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t38_terminal.h Mon Feb 2 15:36:29 2009
@@ -69,7 +69,7 @@
\param s The T.38 context.
\return A pointer to the T.30 context, or NULL.
*/
-SPAN_DECLARE(t30_state_t) *t38_terminal_get_t30_state(t38_terminal_state_t *s);
+SPAN_DECLARE(t30_state_t *) t38_terminal_get_t30_state(t38_terminal_state_t *s);
/*! Get a pointer to the T.38 core IFP packet engine associated with a
termination mode T.38 context.
@@ -78,14 +78,14 @@
\param s The T.38 context.
\return A pointer to the T.38 core context, or NULL.
*/
-SPAN_DECLARE(t38_core_state_t) *t38_terminal_get_t38_core_state(t38_terminal_state_t *s);
+SPAN_DECLARE(t38_core_state_t *) t38_terminal_get_t38_core_state(t38_terminal_state_t *s);
/*! Get a pointer to the logging context associated with a T.38 context.
\brief Get a pointer to the logging context associated with a T.38 context.
\param s The T.38 context.
\return A pointer to the logging context, or NULL.
*/
-SPAN_DECLARE(logging_state_t) *t38_terminal_get_logging_state(t38_terminal_state_t *s);
+SPAN_DECLARE(logging_state_t *) t38_terminal_get_logging_state(t38_terminal_state_t *s);
/*! \brief Initialise a termination mode T.38 context.
\param s The T.38 context.
@@ -94,7 +94,7 @@
\param tx_packet_handler A callback routine to encapsulate and transmit T.38 packets.
\param tx_packet_user_data An opaque pointer passed to the tx_packet_handler routine.
\return A pointer to the termination mode T.38 context, or NULL if there was a problem. */
-SPAN_DECLARE(t38_terminal_state_t) *t38_terminal_init(t38_terminal_state_t *s,
+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);
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t4.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t4.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t4.h Mon Feb 2 15:36:29 2009
@@ -213,7 +213,7 @@
\param file The name of the file to be received.
\param output_encoding The output encoding.
\return A pointer to the context, or NULL if there was a problem. */
-SPAN_DECLARE(t4_state_t) *t4_rx_init(t4_state_t *s, const char *file, int output_encoding);
+SPAN_DECLARE(t4_state_t *) t4_rx_init(t4_state_t *s, const char *file, int output_encoding);
/*! \brief Prepare to receive the next page of the current document.
\param s The T.4 context.
@@ -311,7 +311,7 @@
\param start_page The first page to send. -1 for no restriction.
\param stop_page The last page to send. -1 for no restriction.
\return A pointer to the context, or NULL if there was a problem. */
-SPAN_DECLARE(t4_state_t) *t4_tx_init(t4_state_t *s, const char *file, int start_page, int stop_page);
+SPAN_DECLARE(t4_state_t *) t4_tx_init(t4_state_t *s, const char *file, int start_page, int stop_page);
/*! \brief Prepare to send the next page of the current document.
\param s The T.4 context.
@@ -445,7 +445,7 @@
\brief Get the short text name of an encoding format.
\param encoding The encoding type.
\return A pointer to the string. */
-SPAN_DECLARE(const char) *t4_encoding_to_str(int encoding);
+SPAN_DECLARE(const char *) t4_encoding_to_str(int encoding);
#if defined(__cplusplus)
}
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/telephony.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/telephony.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/telephony.h Mon Feb 2 15:36:29 2009
@@ -28,21 +28,24 @@
#if !defined(_SPANDSP_TELEPHONY_H_)
#define _SPANDSP_TELEPHONY_H_
-#if defined(SPANDSP_USE_EXPORT_CAPABILITY)
-#if defined(__GNUC__) || defined(__SUNCC__)
-#define SPAN_DECLARE(type) __attribute__((visibility("default"))) type
-#define SPAN_DECLARE_NONSTD(type) __attribute__((visibility("default"))) type
-#define SPAN_DECLARE_DATA __attribute__((visibility("default")))
-#endif
#if defined(WIN32)
-#define SPAN_DECLARE(type) __declspec(dllexport) type __stdcall
-#define SPAN_DECLARE_NONSTD(type) __declspec(dllexport) type __cdecl
-#define SPAN_DECLARE_DATA __declspec(dllexport)
-#endif
+# 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")))
#else
-#define SPAN_DECLARE(type) /**/ type
-#define SPAN_DECLARE_NONSTD(type) /**/ type
-#define SPAN_DECLARE_DATA /**/
+# define SPAN_DECLARE(type) /**/ type
+# define SPAN_DECLARE_NONSTD(type) /**/ type
+# define SPAN_DECLARE_DATA /**/
#endif
#define SAMPLE_RATE 8000
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/time_scale.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/time_scale.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/time_scale.h Mon Feb 2 15:36:29 2009
@@ -71,7 +71,7 @@
\param sample_rate The sample rate of the signal.
\param playout_rate The ratio between the output speed and the input speed.
\return A pointer to the context, or NULL if there was a problem. */
-SPAN_DECLARE(time_scale_state_t) *time_scale_init(time_scale_state_t *s, int sample_rate, float playout_rate);
+SPAN_DECLARE(time_scale_state_t *) time_scale_init(time_scale_state_t *s, int sample_rate, float playout_rate);
/*! \brief Free a time scale context.
\param s The time scale context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/tone_generate.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/tone_generate.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/tone_generate.h Mon Feb 2 15:36:29 2009
@@ -88,7 +88,7 @@
int d4,
int repeat);
-SPAN_DECLARE(tone_gen_state_t) *tone_gen_init(tone_gen_state_t *s, tone_gen_descriptor_t *t);
+SPAN_DECLARE(tone_gen_state_t *) tone_gen_init(tone_gen_state_t *s, tone_gen_descriptor_t *t);
SPAN_DECLARE(int) tone_gen(tone_gen_state_t *s, int16_t amp[], int max_samples);
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h Mon Feb 2 15:36:29 2009
@@ -243,7 +243,7 @@
\param put_bit The callback routine used to put the received data.
\param user_data An opaque pointer passed to the put_bit routine.
\return A pointer to the modem context, or NULL if there was a problem. */
-SPAN_DECLARE(v17_rx_state_t) *v17_rx_init(v17_rx_state_t *s, int bit_rate, put_bit_func_t put_bit, void *user_data);
+SPAN_DECLARE(v17_rx_state_t *) v17_rx_init(v17_rx_state_t *s, int bit_rate, put_bit_func_t put_bit, void *user_data);
/*! Reinitialise an existing V.17 modem receive context.
\brief Reinitialise an existing V.17 modem receive context.
@@ -259,7 +259,7 @@
\return 0 for OK */
SPAN_DECLARE(int) v17_rx_free(v17_rx_state_t *s);
-SPAN_DECLARE(logging_state_t) *v17_rx_get_logging_state(v17_rx_state_t *s);
+SPAN_DECLARE(logging_state_t *) v17_rx_get_logging_state(v17_rx_state_t *s);
/*! Change the put_bit function associated with a V.17 modem receive context.
\brief Change the put_bit function associated with a V.17 modem receive context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v17tx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v17tx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v17tx.h Mon Feb 2 15:36:29 2009
@@ -109,7 +109,7 @@
\param get_bit The callback routine used to get the data to be transmitted.
\param user_data An opaque pointer.
\return A pointer to the modem context, or NULL if there was a problem. */
-SPAN_DECLARE(v17_tx_state_t) *v17_tx_init(v17_tx_state_t *s, int rate, int tep, get_bit_func_t get_bit, void *user_data);
+SPAN_DECLARE(v17_tx_state_t *) v17_tx_init(v17_tx_state_t *s, int rate, int tep, get_bit_func_t get_bit, void *user_data);
/*! Reinitialise an existing V.17 modem transmit context, so it may be reused.
\brief Reinitialise an existing V.17 modem transmit context.
@@ -126,7 +126,7 @@
\return 0 for OK */
SPAN_DECLARE(int) v17_tx_free(v17_tx_state_t *s);
-SPAN_DECLARE(logging_state_t) *v17_tx_get_logging_state(v17_tx_state_t *s);
+SPAN_DECLARE(logging_state_t *) v17_tx_get_logging_state(v17_tx_state_t *s);
/*! Change the get_bit function associated with a V.17 modem transmit context.
\brief Change the get_bit function associated with a V.17 modem transmit context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h Mon Feb 2 15:36:29 2009
@@ -144,7 +144,7 @@
\param put_bit The callback routine used to get the data to be transmitted.
\param user_data An opaque pointer, passed in calls to the get and put routines.
\return A pointer to the modem context, or NULL if there was a problem. */
-SPAN_DECLARE(v22bis_state_t) *v22bis_init(v22bis_state_t *s,
+SPAN_DECLARE(v22bis_state_t *) v22bis_init(v22bis_state_t *s,
int bit_rate,
int guard,
int caller,
@@ -158,7 +158,7 @@
\return 0 for OK */
SPAN_DECLARE(int) v22bis_free(v22bis_state_t *s);
-SPAN_DECLARE(logging_state_t) *v22bis_get_logging_state(v22bis_state_t *s);
+SPAN_DECLARE(logging_state_t *) v22bis_get_logging_state(v22bis_state_t *s);
/*! Change the get_bit function associated with a V.22bis modem context.
\brief Change the get_bit function associated with a V.22bis modem context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h Mon Feb 2 15:36:29 2009
@@ -78,7 +78,7 @@
\param put_bit The callback routine used to put the received data.
\param user_data An opaque pointer passed to the put_bit routine.
\return A pointer to the modem context, or NULL if there was a problem. */
-SPAN_DECLARE(v27ter_rx_state_t) *v27ter_rx_init(v27ter_rx_state_t *s, int bit_rate, put_bit_func_t put_bit, void *user_data);
+SPAN_DECLARE(v27ter_rx_state_t *) v27ter_rx_init(v27ter_rx_state_t *s, int bit_rate, put_bit_func_t put_bit, void *user_data);
/*! Reinitialise an existing V.27ter modem receive context.
\brief Reinitialise an existing V.27ter modem receive context.
@@ -94,7 +94,7 @@
\return 0 for OK */
SPAN_DECLARE(int) v27ter_rx_free(v27ter_rx_state_t *s);
-SPAN_DECLARE(logging_state_t) *v27ter_rx_get_logging_state(v27ter_rx_state_t *s);
+SPAN_DECLARE(logging_state_t *) v27ter_rx_get_logging_state(v27ter_rx_state_t *s);
/*! Change the put_bit function associated with a V.27ter modem receive context.
\brief Change the put_bit function associated with a V.27ter modem receive context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_tx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_tx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_tx.h Mon Feb 2 15:36:29 2009
@@ -91,7 +91,7 @@
\param get_bit The callback routine used to get the data to be transmitted.
\param user_data An opaque pointer.
\return A pointer to the modem context, or NULL if there was a problem. */
-SPAN_DECLARE(v27ter_tx_state_t) *v27ter_tx_init(v27ter_tx_state_t *s, int bit_rate, int tep, get_bit_func_t get_bit, void *user_data);
+SPAN_DECLARE(v27ter_tx_state_t *) v27ter_tx_init(v27ter_tx_state_t *s, int bit_rate, int tep, get_bit_func_t get_bit, void *user_data);
/*! Reinitialise an existing V.27ter modem transmit context, so it may be reused.
\brief Reinitialise an existing V.27ter modem transmit context.
@@ -107,7 +107,7 @@
\return 0 for OK */
SPAN_DECLARE(int) v27ter_tx_free(v27ter_tx_state_t *s);
-SPAN_DECLARE(logging_state_t) *v27ter_tx_get_logging_state(v27ter_tx_state_t *s);
+SPAN_DECLARE(logging_state_t *) v27ter_tx_get_logging_state(v27ter_tx_state_t *s);
/*! Change the get_bit function associated with a V.27ter modem transmit context.
\brief Change the get_bit function associated with a V.27ter modem transmit context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h Mon Feb 2 15:36:29 2009
@@ -147,7 +147,7 @@
\param put_bit The callback routine used to put the received data.
\param user_data An opaque pointer passed to the put_bit routine.
\return A pointer to the modem context, or NULL if there was a problem. */
-SPAN_DECLARE(v29_rx_state_t) *v29_rx_init(v29_rx_state_t *s, int bit_rate, put_bit_func_t put_bit, void *user_data);
+SPAN_DECLARE(v29_rx_state_t *) v29_rx_init(v29_rx_state_t *s, int bit_rate, put_bit_func_t put_bit, void *user_data);
/*! Reinitialise an existing V.29 modem receive context.
\brief Reinitialise an existing V.29 modem receive context.
@@ -163,7 +163,7 @@
\return 0 for OK */
SPAN_DECLARE(int) v29_rx_free(v29_rx_state_t *s);
-SPAN_DECLARE(logging_state_t) *v29_rx_get_logging_state(v29_rx_state_t *s);
+SPAN_DECLARE(logging_state_t *) v29_rx_get_logging_state(v29_rx_state_t *s);
/*! Change the put_bit function associated with a V.29 modem receive context.
\brief Change the put_bit function associated with a V.29 modem receive context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v29tx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v29tx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v29tx.h Mon Feb 2 15:36:29 2009
@@ -122,7 +122,7 @@
\param get_bit The callback routine used to get the data to be transmitted.
\param user_data An opaque pointer.
\return A pointer to the modem context, or NULL if there was a problem. */
-SPAN_DECLARE(v29_tx_state_t) *v29_tx_init(v29_tx_state_t *s, int bit_rate, int tep, get_bit_func_t get_bit, void *user_data);
+SPAN_DECLARE(v29_tx_state_t *) v29_tx_init(v29_tx_state_t *s, int bit_rate, int tep, get_bit_func_t get_bit, void *user_data);
/*! Reinitialise an existing V.29 modem transmit context, so it may be reused.
\brief Reinitialise an existing V.29 modem transmit context.
@@ -138,7 +138,7 @@
\return 0 for OK */
SPAN_DECLARE(int) v29_tx_free(v29_tx_state_t *s);
-SPAN_DECLARE(logging_state_t) *v29_tx_get_logging_state(v29_tx_state_t *s);
+SPAN_DECLARE(logging_state_t *) v29_tx_get_logging_state(v29_tx_state_t *s);
/*! Change the get_bit function associated with a V.29 modem transmit context.
\brief Change the get_bit function associated with a V.29 modem transmit context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v42.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v42.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v42.h Mon Feb 2 15:36:29 2009
@@ -82,7 +82,7 @@
{
#endif
-SPAN_DECLARE(const char) *lapm_status_to_str(int status);
+SPAN_DECLARE(const char *) lapm_status_to_str(int status);
/*! Dump LAP.M frames in a raw and/or decoded forms
\param frame The frame itself
@@ -94,7 +94,7 @@
/*! Accept an HDLC packet
*/
-SPAN_DECLARE(void) lapm_receive(void *user_data, const uint8_t *buf, int len, int ok);
+void lapm_receive(void *user_data, const uint8_t *buf, int len, int ok);
/*! Transmit a LAP.M frame
*/
@@ -135,7 +135,7 @@
\param user_data An opaque pointer passed to the frame handler routine.
\return ???
*/
-SPAN_DECLARE(v42_state_t) *v42_init(v42_state_t *s, int caller, int detect, v42_frame_handler_t frame_handler, void *user_data);
+SPAN_DECLARE(v42_state_t *) v42_init(v42_state_t *s, int caller, int detect, v42_frame_handler_t frame_handler, void *user_data);
/*! Restart a V.42 context.
\param s The V.42 context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v42bis.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v42bis.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v42bis.h Mon Feb 2 15:36:29 2009
@@ -106,7 +106,7 @@
\param data_user_data .
\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,
+SPAN_DECLARE(v42bis_state_t *) v42bis_init(v42bis_state_t *s,
int negotiated_p0,
int negotiated_p1,
int negotiated_p2,
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v8.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v8.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v8.h Mon Feb 2 15:36:29 2009
@@ -128,7 +128,7 @@
\param result_handler The callback routine used to handle the results of negotiation.
\param user_data An opaque pointer passed to the result_handler routine.
\return A pointer to the V.8 context, or NULL if there was a problem. */
-SPAN_DECLARE(v8_state_t) *v8_init(v8_state_t *s,
+SPAN_DECLARE(v8_state_t *) v8_init(v8_state_t *s,
int caller,
int available_modulations,
v8_result_handler_t *result_handler,
@@ -146,7 +146,7 @@
\return 0 for OK. */
SPAN_DECLARE(int) v8_free(v8_state_t *s);
-SPAN_DECLARE(logging_state_t) *v8_get_logging_state(v8_state_t *s);
+SPAN_DECLARE(logging_state_t *) v8_get_logging_state(v8_state_t *s);
/*! Generate a block of V.8 audio samples.
\brief Generate a block of V.8 audio samples.
@@ -171,11 +171,11 @@
\param modulation_schemes The list of supported modulations. */
SPAN_DECLARE(void) v8_log_supported_modulations(v8_state_t *s, int modulation_schemes);
-SPAN_DECLARE(const char) *v8_call_function_to_str(int call_function);
-SPAN_DECLARE(const char) *v8_modulation_to_str(int modulation_scheme);
-SPAN_DECLARE(const char) *v8_protocol_to_str(int protocol);
-SPAN_DECLARE(const char) *v8_pstn_access_to_str(int pstn_access);
-SPAN_DECLARE(const char) *v8_pcm_modem_availability_to_str(int pcm_modem_availability);
+SPAN_DECLARE(const char *) v8_call_function_to_str(int call_function);
+SPAN_DECLARE(const char *) v8_modulation_to_str(int modulation_scheme);
+SPAN_DECLARE(const char *) v8_protocol_to_str(int protocol);
+SPAN_DECLARE(const char *) v8_pstn_access_to_str(int pstn_access);
+SPAN_DECLARE(const char *) v8_pcm_modem_availability_to_str(int pcm_modem_availability);
#if defined(__cplusplus)
}
Modified: freeswitch/trunk/libs/spandsp/src/super_tone_rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/super_tone_rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/super_tone_rx.c Mon Feb 2 15:36:29 2009
@@ -105,7 +105,7 @@
}
/*- End of function --------------------------------------------------------*/
-int super_tone_rx_add_tone(super_tone_rx_descriptor_t *desc)
+SPAN_DECLARE(int) super_tone_rx_add_tone(super_tone_rx_descriptor_t *desc)
{
if (desc->tones%5 == 0)
{
@@ -119,7 +119,7 @@
}
/*- End of function --------------------------------------------------------*/
-int super_tone_rx_add_element(super_tone_rx_descriptor_t *desc,
+SPAN_DECLARE(int) super_tone_rx_add_element(super_tone_rx_descriptor_t *desc,
int tone,
int f1,
int f2,
@@ -197,7 +197,7 @@
}
/*- End of function --------------------------------------------------------*/
-super_tone_rx_descriptor_t *super_tone_rx_make_descriptor(super_tone_rx_descriptor_t *desc)
+SPAN_DECLARE(super_tone_rx_descriptor_t *) super_tone_rx_make_descriptor(super_tone_rx_descriptor_t *desc)
{
if (desc == NULL)
{
@@ -215,7 +215,7 @@
}
/*- End of function --------------------------------------------------------*/
-int super_tone_rx_free_descriptor(super_tone_rx_descriptor_t *desc)
+SPAN_DECLARE(int) super_tone_rx_free_descriptor(super_tone_rx_descriptor_t *desc)
{
if (desc)
free(desc);
@@ -223,14 +223,14 @@
}
/*- End of function --------------------------------------------------------*/
-void super_tone_rx_segment_callback(super_tone_rx_state_t *s,
+SPAN_DECLARE(void) super_tone_rx_segment_callback(super_tone_rx_state_t *s,
void (*callback)(void *data, int f1, int f2, int duration))
{
s->segment_callback = callback;
}
/*- End of function --------------------------------------------------------*/
-super_tone_rx_state_t *super_tone_rx_init(super_tone_rx_state_t *s,
+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)
@@ -266,7 +266,7 @@
}
/*- End of function --------------------------------------------------------*/
-int super_tone_rx_free(super_tone_rx_state_t *s)
+SPAN_DECLARE(int) super_tone_rx_free(super_tone_rx_state_t *s)
{
if (s)
free(s);
@@ -410,7 +410,7 @@
}
/*- End of function --------------------------------------------------------*/
-int super_tone_rx(super_tone_rx_state_t *s, const int16_t amp[], int samples)
+SPAN_DECLARE(int) super_tone_rx(super_tone_rx_state_t *s, const int16_t amp[], int samples)
{
int i;
int x;
Modified: freeswitch/trunk/libs/spandsp/src/super_tone_tx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/super_tone_tx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/super_tone_tx.c Mon Feb 2 15:36:29 2009
@@ -69,7 +69,7 @@
two iterations of 50 seconds each.
*/
-super_tone_tx_step_t *super_tone_tx_make_step(super_tone_tx_step_t *s,
+SPAN_DECLARE(super_tone_tx_step_t *) super_tone_tx_make_step(super_tone_tx_step_t *s,
float f1,
float l1,
float f2,
@@ -111,7 +111,7 @@
}
/*- End of function --------------------------------------------------------*/
-void super_tone_tx_free(super_tone_tx_step_t *s)
+SPAN_DECLARE(void) super_tone_tx_free(super_tone_tx_step_t *s)
{
super_tone_tx_step_t *t;
@@ -127,7 +127,7 @@
}
/*- End of function --------------------------------------------------------*/
-super_tone_tx_state_t *super_tone_tx_init(super_tone_tx_state_t *s, super_tone_tx_step_t *tree)
+SPAN_DECLARE(super_tone_tx_state_t *) super_tone_tx_init(super_tone_tx_state_t *s, super_tone_tx_step_t *tree)
{
if (tree == NULL)
return NULL;
@@ -146,7 +146,7 @@
}
/*- End of function --------------------------------------------------------*/
-int super_tone_tx(super_tone_tx_state_t *s, int16_t amp[], int max_samples)
+SPAN_DECLARE(int) super_tone_tx(super_tone_tx_state_t *s, int16_t amp[], int max_samples)
{
int samples;
int limit;
Modified: freeswitch/trunk/libs/spandsp/src/t30.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t30.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t30.c Mon Feb 2 15:36:29 2009
@@ -5026,7 +5026,7 @@
}
/*- End of function --------------------------------------------------------*/
-void t30_non_ecm_put_byte(void *user_data, int byte)
+SPAN_DECLARE(void) t30_non_ecm_put_byte(void *user_data, int byte)
{
t30_state_t *s;
@@ -5062,7 +5062,7 @@
}
/*- End of function --------------------------------------------------------*/
-void t30_non_ecm_put_chunk(void *user_data, const uint8_t buf[], int len)
+SPAN_DECLARE(void) t30_non_ecm_put_chunk(void *user_data, const uint8_t buf[], int len)
{
t30_state_t *s;
int i;
@@ -5137,7 +5137,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_non_ecm_get_byte(void *user_data)
+SPAN_DECLARE(int) t30_non_ecm_get_byte(void *user_data)
{
int byte;
t30_state_t *s;
@@ -5172,7 +5172,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_non_ecm_get_chunk(void *user_data, uint8_t buf[], int max_len)
+SPAN_DECLARE(int) t30_non_ecm_get_chunk(void *user_data, uint8_t buf[], int max_len)
{
int len;
t30_state_t *s;
@@ -5356,7 +5356,7 @@
}
/*- End of function --------------------------------------------------------*/
-void t30_front_end_status(void *user_data, int status)
+SPAN_DECLARE(void) t30_front_end_status(void *user_data, int status)
{
t30_state_t *s;
@@ -5671,7 +5671,7 @@
}
/*- End of function --------------------------------------------------------*/
-void t30_timer_update(t30_state_t *s, int samples)
+SPAN_DECLARE(void) t30_timer_update(t30_state_t *s, int samples)
{
if (s->timer_t0_t1 > 0)
{
@@ -5723,7 +5723,7 @@
}
/*- End of function --------------------------------------------------------*/
-void t30_terminate(t30_state_t *s)
+SPAN_DECLARE(void) t30_terminate(t30_state_t *s)
{
if (s->phase != T30_PHASE_CALL_FINISHED)
{
@@ -5753,7 +5753,7 @@
}
/*- End of function --------------------------------------------------------*/
-void t30_get_transfer_statistics(t30_state_t *s, t30_stats_t *t)
+SPAN_DECLARE(void) t30_get_transfer_statistics(t30_state_t *s, t30_stats_t *t)
{
t4_stats_t stats;
@@ -5775,7 +5775,7 @@
}
/*- End of function --------------------------------------------------------*/
-void t30_local_interrupt_request(t30_state_t *s, int state)
+SPAN_DECLARE(void) t30_local_interrupt_request(t30_state_t *s, int state)
{
if (s->timer_t3 > 0)
{
@@ -5787,7 +5787,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_restart(t30_state_t *s)
+SPAN_DECLARE(int) t30_restart(t30_state_t *s)
{
s->phase = T30_PHASE_IDLE;
s->next_phase = T30_PHASE_IDLE;
@@ -5822,7 +5822,7 @@
}
/*- End of function --------------------------------------------------------*/
-t30_state_t *t30_init(t30_state_t *s,
+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,
@@ -5863,7 +5863,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_release(t30_state_t *s)
+SPAN_DECLARE(int) t30_release(t30_state_t *s)
{
/* Make sure any FAX in progress is tidied up. If the tidying up has
already happened, repeating it here is harmless. */
@@ -5881,7 +5881,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_free(t30_state_t *s)
+SPAN_DECLARE(int) t30_free(t30_state_t *s)
{
t30_release(s);
free(s);
@@ -5889,7 +5889,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_call_active(t30_state_t *s)
+SPAN_DECLARE(int) t30_call_active(t30_state_t *s)
{
return (s->phase != T30_PHASE_CALL_FINISHED);
}
Modified: freeswitch/trunk/libs/spandsp/src/t30_api.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t30_api.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t30_api.c Mon Feb 2 15:36:29 2009
@@ -73,7 +73,7 @@
#include "t30_local.h"
-int t30_set_tx_ident(t30_state_t *s, const char *id)
+SPAN_DECLARE(int) t30_set_tx_ident(t30_state_t *s, const char *id)
{
if (id == NULL)
{
@@ -88,7 +88,7 @@
}
/*- End of function --------------------------------------------------------*/
-const char *t30_get_tx_ident(t30_state_t *s)
+SPAN_DECLARE(const char *) t30_get_tx_ident(t30_state_t *s)
{
if (s->tx_info.ident[0] == '\0')
return NULL;
@@ -96,7 +96,7 @@
}
/*- End of function --------------------------------------------------------*/
-const char *t30_get_rx_ident(t30_state_t *s)
+SPAN_DECLARE(const char *) t30_get_rx_ident(t30_state_t *s)
{
if (s->rx_info.ident[0] == '\0')
return NULL;
@@ -104,7 +104,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_set_tx_sub_address(t30_state_t *s, const char *sub_address)
+SPAN_DECLARE(int) t30_set_tx_sub_address(t30_state_t *s, const char *sub_address)
{
if (sub_address == NULL)
{
@@ -118,7 +118,7 @@
}
/*- End of function --------------------------------------------------------*/
-const char *t30_get_tx_sub_address(t30_state_t *s)
+SPAN_DECLARE(const char *) t30_get_tx_sub_address(t30_state_t *s)
{
if (s->tx_info.sub_address[0] == '\0')
return NULL;
@@ -126,7 +126,7 @@
}
/*- End of function --------------------------------------------------------*/
-const char *t30_get_rx_sub_address(t30_state_t *s)
+SPAN_DECLARE(const char *) t30_get_rx_sub_address(t30_state_t *s)
{
if (s->rx_info.sub_address[0] == '\0')
return NULL;
@@ -134,7 +134,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_set_tx_selective_polling_address(t30_state_t *s, const char *selective_polling_address)
+SPAN_DECLARE(int) t30_set_tx_selective_polling_address(t30_state_t *s, const char *selective_polling_address)
{
if (selective_polling_address == NULL)
{
@@ -148,7 +148,7 @@
}
/*- End of function --------------------------------------------------------*/
-const char *t30_get_tx_selective_polling_address(t30_state_t *s)
+SPAN_DECLARE(const char *) t30_get_tx_selective_polling_address(t30_state_t *s)
{
if (s->tx_info.selective_polling_address[0] == '\0')
return NULL;
@@ -156,7 +156,7 @@
}
/*- End of function --------------------------------------------------------*/
-const char *t30_get_rx_selective_polling_address(t30_state_t *s)
+SPAN_DECLARE(const char *) t30_get_rx_selective_polling_address(t30_state_t *s)
{
if (s->rx_info.selective_polling_address[0] == '\0')
return NULL;
@@ -164,7 +164,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_set_tx_polled_sub_address(t30_state_t *s, const char *polled_sub_address)
+SPAN_DECLARE(int) t30_set_tx_polled_sub_address(t30_state_t *s, const char *polled_sub_address)
{
if (polled_sub_address == NULL)
{
@@ -178,7 +178,7 @@
}
/*- End of function --------------------------------------------------------*/
-const char *t30_get_tx_polled_sub_address(t30_state_t *s)
+SPAN_DECLARE(const char *) t30_get_tx_polled_sub_address(t30_state_t *s)
{
if (s->tx_info.polled_sub_address[0] == '\0')
return NULL;
@@ -186,7 +186,7 @@
}
/*- End of function --------------------------------------------------------*/
-const char *t30_get_rx_polled_sub_address(t30_state_t *s)
+SPAN_DECLARE(const char *) t30_get_rx_polled_sub_address(t30_state_t *s)
{
if (s->rx_info.polled_sub_address[0] == '\0')
return NULL;
@@ -194,7 +194,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_set_tx_sender_ident(t30_state_t *s, const char *sender_ident)
+SPAN_DECLARE(int) t30_set_tx_sender_ident(t30_state_t *s, const char *sender_ident)
{
if (sender_ident == NULL)
{
@@ -208,7 +208,7 @@
}
/*- End of function --------------------------------------------------------*/
-const char *t30_get_tx_sender_ident(t30_state_t *s)
+SPAN_DECLARE(const char *) t30_get_tx_sender_ident(t30_state_t *s)
{
if (s->tx_info.sender_ident[0] == '\0')
return NULL;
@@ -216,7 +216,7 @@
}
/*- End of function --------------------------------------------------------*/
-const char *t30_get_rx_sender_ident(t30_state_t *s)
+SPAN_DECLARE(const char *) t30_get_rx_sender_ident(t30_state_t *s)
{
if (s->rx_info.sender_ident[0] == '\0')
return NULL;
@@ -224,7 +224,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_set_tx_password(t30_state_t *s, const char *password)
+SPAN_DECLARE(int) t30_set_tx_password(t30_state_t *s, const char *password)
{
if (password == NULL)
{
@@ -238,7 +238,7 @@
}
/*- End of function --------------------------------------------------------*/
-const char *t30_get_tx_password(t30_state_t *s)
+SPAN_DECLARE(const char *) t30_get_tx_password(t30_state_t *s)
{
if (s->tx_info.password[0] == '\0')
return NULL;
@@ -246,7 +246,7 @@
}
/*- End of function --------------------------------------------------------*/
-const char *t30_get_rx_password(t30_state_t *s)
+SPAN_DECLARE(const char *) t30_get_rx_password(t30_state_t *s)
{
if (s->rx_info.password[0] == '\0')
return NULL;
@@ -254,7 +254,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_set_tx_nsf(t30_state_t *s, const uint8_t *nsf, int len)
+SPAN_DECLARE(int) t30_set_tx_nsf(t30_state_t *s, const uint8_t *nsf, int len)
{
if (s->tx_info.nsf)
free(s->tx_info.nsf);
@@ -272,7 +272,7 @@
}
/*- End of function --------------------------------------------------------*/
-size_t t30_get_tx_nsf(t30_state_t *s, const uint8_t *nsf[])
+SPAN_DECLARE(size_t) t30_get_tx_nsf(t30_state_t *s, const uint8_t *nsf[])
{
if (nsf)
*nsf = s->tx_info.nsf;
@@ -280,7 +280,7 @@
}
/*- End of function --------------------------------------------------------*/
-size_t t30_get_rx_nsf(t30_state_t *s, const uint8_t *nsf[])
+SPAN_DECLARE(size_t) t30_get_rx_nsf(t30_state_t *s, const uint8_t *nsf[])
{
if (nsf)
*nsf = s->rx_info.nsf;
@@ -288,7 +288,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_set_tx_nsc(t30_state_t *s, const uint8_t *nsc, int len)
+SPAN_DECLARE(int) t30_set_tx_nsc(t30_state_t *s, const uint8_t *nsc, int len)
{
if (s->tx_info.nsc)
free(s->tx_info.nsc);
@@ -306,7 +306,7 @@
}
/*- End of function --------------------------------------------------------*/
-size_t t30_get_tx_nsc(t30_state_t *s, const uint8_t *nsc[])
+SPAN_DECLARE(size_t) t30_get_tx_nsc(t30_state_t *s, const uint8_t *nsc[])
{
if (nsc)
*nsc = s->tx_info.nsc;
@@ -314,7 +314,7 @@
}
/*- End of function --------------------------------------------------------*/
-size_t t30_get_rx_nsc(t30_state_t *s, const uint8_t *nsc[])
+SPAN_DECLARE(size_t) t30_get_rx_nsc(t30_state_t *s, const uint8_t *nsc[])
{
if (nsc)
*nsc = s->rx_info.nsc;
@@ -322,7 +322,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_set_tx_nss(t30_state_t *s, const uint8_t *nss, int len)
+SPAN_DECLARE(int) t30_set_tx_nss(t30_state_t *s, const uint8_t *nss, int len)
{
if (s->tx_info.nss)
free(s->tx_info.nss);
@@ -340,7 +340,7 @@
}
/*- End of function --------------------------------------------------------*/
-size_t t30_get_tx_nss(t30_state_t *s, const uint8_t *nss[])
+SPAN_DECLARE(size_t) t30_get_tx_nss(t30_state_t *s, const uint8_t *nss[])
{
if (nss)
*nss = s->tx_info.nss;
@@ -348,7 +348,7 @@
}
/*- End of function --------------------------------------------------------*/
-size_t t30_get_rx_nss(t30_state_t *s, const uint8_t *nss[])
+SPAN_DECLARE(size_t) t30_get_rx_nss(t30_state_t *s, const uint8_t *nss[])
{
if (nss)
*nss = s->rx_info.nss;
@@ -356,7 +356,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_set_tx_tsa(t30_state_t *s, int type, const char *address, int len)
+SPAN_DECLARE(int) t30_set_tx_tsa(t30_state_t *s, int type, const char *address, int len)
{
if (s->tx_info.tsa)
free(s->tx_info.tsa);
@@ -378,7 +378,7 @@
}
/*- End of function --------------------------------------------------------*/
-size_t t30_get_tx_tsa(t30_state_t *s, int *type, const char *address[])
+SPAN_DECLARE(size_t) t30_get_tx_tsa(t30_state_t *s, int *type, const char *address[])
{
if (type)
*type = s->tx_info.tsa_type;
@@ -388,7 +388,7 @@
}
/*- End of function --------------------------------------------------------*/
-size_t t30_get_rx_tsa(t30_state_t *s, int *type, const char *address[])
+SPAN_DECLARE(size_t) t30_get_rx_tsa(t30_state_t *s, int *type, const char *address[])
{
if (type)
*type = s->rx_info.tsa_type;
@@ -398,7 +398,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_set_tx_ira(t30_state_t *s, int type, const char *address, int len)
+SPAN_DECLARE(int) t30_set_tx_ira(t30_state_t *s, int type, const char *address, int len)
{
if (s->tx_info.ira)
free(s->tx_info.ira);
@@ -412,7 +412,7 @@
}
/*- End of function --------------------------------------------------------*/
-size_t t30_get_tx_ira(t30_state_t *s, int *type, const char *address[])
+SPAN_DECLARE(size_t) t30_get_tx_ira(t30_state_t *s, int *type, const char *address[])
{
if (type)
*type = s->tx_info.ira_type;
@@ -422,7 +422,7 @@
}
/*- End of function --------------------------------------------------------*/
-size_t t30_get_rx_ira(t30_state_t *s, int *type, const char *address[])
+SPAN_DECLARE(size_t) t30_get_rx_ira(t30_state_t *s, int *type, const char *address[])
{
if (type)
*type = s->rx_info.ira_type;
@@ -432,7 +432,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_set_tx_cia(t30_state_t *s, int type, const char *address, int len)
+SPAN_DECLARE(int) t30_set_tx_cia(t30_state_t *s, int type, const char *address, int len)
{
if (s->tx_info.cia)
free(s->tx_info.cia);
@@ -446,7 +446,7 @@
}
/*- End of function --------------------------------------------------------*/
-size_t t30_get_tx_cia(t30_state_t *s, int *type, const char *address[])
+SPAN_DECLARE(size_t) t30_get_tx_cia(t30_state_t *s, int *type, const char *address[])
{
if (type)
*type = s->tx_info.cia_type;
@@ -456,7 +456,7 @@
}
/*- End of function --------------------------------------------------------*/
-size_t t30_get_rx_cia(t30_state_t *s, int *type, const char *address[])
+SPAN_DECLARE(size_t) t30_get_rx_cia(t30_state_t *s, int *type, const char *address[])
{
if (type)
*type = s->rx_info.cia_type;
@@ -466,7 +466,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_set_tx_isp(t30_state_t *s, int type, const char *address, int len)
+SPAN_DECLARE(int) t30_set_tx_isp(t30_state_t *s, int type, const char *address, int len)
{
if (s->tx_info.isp)
free(s->tx_info.isp);
@@ -480,7 +480,7 @@
}
/*- End of function --------------------------------------------------------*/
-size_t t30_get_tx_isp(t30_state_t *s, int *type, const char *address[])
+SPAN_DECLARE(size_t) t30_get_tx_isp(t30_state_t *s, int *type, const char *address[])
{
if (type)
*type = s->tx_info.isp_type;
@@ -490,7 +490,7 @@
}
/*- End of function --------------------------------------------------------*/
-size_t t30_get_rx_isp(t30_state_t *s, int *type, const char *address[])
+SPAN_DECLARE(size_t) t30_get_rx_isp(t30_state_t *s, int *type, const char *address[])
{
if (type)
*type = s->rx_info.isp_type;
@@ -500,7 +500,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_set_tx_csa(t30_state_t *s, int type, const char *address, int len)
+SPAN_DECLARE(int) t30_set_tx_csa(t30_state_t *s, int type, const char *address, int len)
{
if (s->tx_info.csa)
free(s->tx_info.csa);
@@ -514,7 +514,7 @@
}
/*- End of function --------------------------------------------------------*/
-size_t t30_get_tx_csa(t30_state_t *s, int *type, const char *address[])
+SPAN_DECLARE(size_t) t30_get_tx_csa(t30_state_t *s, int *type, const char *address[])
{
if (type)
*type = s->tx_info.csa_type;
@@ -524,7 +524,7 @@
}
/*- End of function --------------------------------------------------------*/
-size_t t30_get_rx_csa(t30_state_t *s, int *type, const char *address[])
+SPAN_DECLARE(size_t) t30_get_rx_csa(t30_state_t *s, int *type, const char *address[])
{
if (type)
*type = s->rx_info.csa_type;
@@ -534,7 +534,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_set_tx_page_header_info(t30_state_t *s, const char *info)
+SPAN_DECLARE(int) t30_set_tx_page_header_info(t30_state_t *s, const char *info)
{
if (info == NULL)
{
@@ -549,7 +549,7 @@
}
/*- End of function --------------------------------------------------------*/
-size_t t30_get_tx_page_header_info(t30_state_t *s, char *info)
+SPAN_DECLARE(size_t) t30_get_tx_page_header_info(t30_state_t *s, char *info)
{
if (info)
strcpy(info, s->header_info);
@@ -557,25 +557,25 @@
}
/*- End of function --------------------------------------------------------*/
-const char *t30_get_rx_country(t30_state_t *s)
+SPAN_DECLARE(const char *) t30_get_rx_country(t30_state_t *s)
{
return s->country;
}
/*- End of function --------------------------------------------------------*/
-const char *t30_get_rx_vendor(t30_state_t *s)
+SPAN_DECLARE(const char *) t30_get_rx_vendor(t30_state_t *s)
{
return s->vendor;
}
/*- End of function --------------------------------------------------------*/
-const char *t30_get_rx_model(t30_state_t *s)
+SPAN_DECLARE(const char *) t30_get_rx_model(t30_state_t *s)
{
return s->model;
}
/*- End of function --------------------------------------------------------*/
-void t30_set_rx_file(t30_state_t *s, const char *file, int stop_page)
+SPAN_DECLARE(void) t30_set_rx_file(t30_state_t *s, const char *file, int stop_page)
{
strncpy(s->rx_file, file, sizeof(s->rx_file));
s->rx_file[sizeof(s->rx_file) - 1] = '\0';
@@ -583,7 +583,7 @@
}
/*- End of function --------------------------------------------------------*/
-void t30_set_tx_file(t30_state_t *s, const char *file, int start_page, int stop_page)
+SPAN_DECLARE(void) t30_set_tx_file(t30_state_t *s, const char *file, int start_page, int stop_page)
{
strncpy(s->tx_file, file, sizeof(s->tx_file));
s->tx_file[sizeof(s->tx_file) - 1] = '\0';
@@ -592,13 +592,13 @@
}
/*- End of function --------------------------------------------------------*/
-void t30_set_iaf_mode(t30_state_t *s, int iaf)
+SPAN_DECLARE(void) t30_set_iaf_mode(t30_state_t *s, int iaf)
{
s->iaf = iaf;
}
/*- End of function --------------------------------------------------------*/
-int t30_set_ecm_capability(t30_state_t *s, int enabled)
+SPAN_DECLARE(int) t30_set_ecm_capability(t30_state_t *s, int enabled)
{
s->ecm_allowed = enabled;
t30_build_dis_or_dtc(s);
@@ -606,7 +606,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_set_rx_encoding(t30_state_t *s, int encoding)
+SPAN_DECLARE(int) t30_set_rx_encoding(t30_state_t *s, int encoding)
{
switch (encoding)
{
@@ -620,7 +620,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_set_minimum_scan_line_time(t30_state_t *s, int min_time)
+SPAN_DECLARE(int) t30_set_minimum_scan_line_time(t30_state_t *s, int min_time)
{
/* There are only certain possible times supported, so we need to select
the code which best matches the request. */
@@ -641,7 +641,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_set_supported_modems(t30_state_t *s, int supported_modems)
+SPAN_DECLARE(int) t30_set_supported_modems(t30_state_t *s, int supported_modems)
{
s->supported_modems = supported_modems;
t30_build_dis_or_dtc(s);
@@ -649,7 +649,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_set_supported_compressions(t30_state_t *s, int supported_compressions)
+SPAN_DECLARE(int) t30_set_supported_compressions(t30_state_t *s, int supported_compressions)
{
s->supported_compressions = supported_compressions;
t30_build_dis_or_dtc(s);
@@ -657,7 +657,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_set_supported_resolutions(t30_state_t *s, int supported_resolutions)
+SPAN_DECLARE(int) t30_set_supported_resolutions(t30_state_t *s, int supported_resolutions)
{
s->supported_resolutions = supported_resolutions;
t30_build_dis_or_dtc(s);
@@ -665,7 +665,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_set_supported_image_sizes(t30_state_t *s, int supported_image_sizes)
+SPAN_DECLARE(int) t30_set_supported_image_sizes(t30_state_t *s, int supported_image_sizes)
{
s->supported_image_sizes = supported_image_sizes;
t30_build_dis_or_dtc(s);
@@ -673,7 +673,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t30_set_supported_t30_features(t30_state_t *s, int supported_t30_features)
+SPAN_DECLARE(int) t30_set_supported_t30_features(t30_state_t *s, int supported_t30_features)
{
s->supported_t30_features = supported_t30_features;
t30_build_dis_or_dtc(s);
@@ -681,55 +681,55 @@
}
/*- End of function --------------------------------------------------------*/
-void t30_set_status(t30_state_t *s, int status)
+SPAN_DECLARE(void) t30_set_status(t30_state_t *s, int status)
{
s->current_status = status;
}
/*- End of function --------------------------------------------------------*/
-int t30_set_receiver_not_ready(t30_state_t *s, int count)
+SPAN_DECLARE(int) t30_set_receiver_not_ready(t30_state_t *s, int count)
{
s->receiver_not_ready_count = count;
return 0;
}
/*- End of function --------------------------------------------------------*/
-void t30_set_phase_b_handler(t30_state_t *s, t30_phase_b_handler_t *handler, void *user_data)
+SPAN_DECLARE(void) t30_set_phase_b_handler(t30_state_t *s, t30_phase_b_handler_t *handler, void *user_data)
{
s->phase_b_handler = handler;
s->phase_b_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
-void t30_set_phase_d_handler(t30_state_t *s, t30_phase_d_handler_t *handler, void *user_data)
+SPAN_DECLARE(void) t30_set_phase_d_handler(t30_state_t *s, t30_phase_d_handler_t *handler, void *user_data)
{
s->phase_d_handler = handler;
s->phase_d_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
-void t30_set_phase_e_handler(t30_state_t *s, t30_phase_e_handler_t *handler, void *user_data)
+SPAN_DECLARE(void) t30_set_phase_e_handler(t30_state_t *s, t30_phase_e_handler_t *handler, void *user_data)
{
s->phase_e_handler = handler;
s->phase_e_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
-void t30_set_document_handler(t30_state_t *s, t30_document_handler_t *handler, void *user_data)
+SPAN_DECLARE(void) t30_set_document_handler(t30_state_t *s, t30_document_handler_t *handler, void *user_data)
{
s->document_handler = handler;
s->document_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
-void t30_set_real_time_frame_handler(t30_state_t *s, t30_real_time_frame_handler_t *handler, void *user_data)
+SPAN_DECLARE(void) t30_set_real_time_frame_handler(t30_state_t *s, t30_real_time_frame_handler_t *handler, void *user_data)
{
s->real_time_frame_handler = handler;
s->real_time_frame_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
-logging_state_t *t30_get_logging_state(t30_state_t *s)
+SPAN_DECLARE(logging_state_t *) t30_get_logging_state(t30_state_t *s)
{
return &s->logging;
}
Modified: freeswitch/trunk/libs/spandsp/src/t30_logging.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t30_logging.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t30_logging.c Mon Feb 2 15:36:29 2009
@@ -90,7 +90,7 @@
DISBIT8 = 0x80
};
-const char *t30_completion_code_to_str(int result)
+SPAN_DECLARE(const char *) t30_completion_code_to_str(int result)
{
switch (result)
{
@@ -223,7 +223,7 @@
}
/*- End of function --------------------------------------------------------*/
-const char *t30_frametype(uint8_t x)
+SPAN_DECLARE(const char *) t30_frametype(uint8_t x)
{
switch (x)
{
@@ -488,7 +488,7 @@
}
/*- End of function --------------------------------------------------------*/
-void t30_decode_dis_dtc_dcs(t30_state_t *s, const uint8_t *pkt, int len)
+SPAN_DECLARE(void) t30_decode_dis_dtc_dcs(t30_state_t *s, const uint8_t *pkt, int len)
{
logging_state_t *log;
uint8_t frame_type;
Modified: freeswitch/trunk/libs/spandsp/src/t31.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t31.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t31.c Mon Feb 2 15:36:29 2009
@@ -930,7 +930,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t31_t38_send_timeout(t31_state_t *s, int samples)
+SPAN_DECLARE(int) t31_t38_send_timeout(t31_state_t *s, int samples)
{
t31_t38_front_end_state_t *fe;
int delay;
@@ -2039,14 +2039,14 @@
}
/*- End of function --------------------------------------------------------*/
-void t31_call_event(t31_state_t *s, int event)
+SPAN_DECLARE(void) t31_call_event(t31_state_t *s, int event)
{
span_log(&s->logging, SPAN_LOG_FLOW, "Call event %d received\n", event);
at_call_event(&s->at_state, event);
}
/*- End of function --------------------------------------------------------*/
-int t31_at_rx(t31_state_t *s, const char *t, int len)
+SPAN_DECLARE(int) t31_at_rx(t31_state_t *s, const char *t, int len)
{
if (s->dte_data_timeout)
s->dte_data_timeout = s->call_samples + ms_to_samples(5000);
@@ -2258,7 +2258,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t31_rx(t31_state_t *s, int16_t amp[], int len)
+SPAN_DECLARE(int) t31_rx(t31_state_t *s, int16_t amp[], int len)
{
int i;
int32_t power;
@@ -2322,7 +2322,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t31_tx(t31_state_t *s, int16_t amp[], int max_len)
+SPAN_DECLARE(int) t31_tx(t31_state_t *s, int16_t amp[], int max_len)
{
int len;
@@ -2347,19 +2347,19 @@
}
/*- End of function --------------------------------------------------------*/
-void t31_set_transmit_on_idle(t31_state_t *s, int transmit_on_idle)
+SPAN_DECLARE(void) t31_set_transmit_on_idle(t31_state_t *s, int transmit_on_idle)
{
s->audio.modems.transmit_on_idle = transmit_on_idle;
}
/*- End of function --------------------------------------------------------*/
-void t31_set_tep_mode(t31_state_t *s, int use_tep)
+SPAN_DECLARE(void) t31_set_tep_mode(t31_state_t *s, int use_tep)
{
s->audio.modems.use_tep = use_tep;
}
/*- End of function --------------------------------------------------------*/
-void t31_set_t38_config(t31_state_t *s, int without_pacing)
+SPAN_DECLARE(void) t31_set_t38_config(t31_state_t *s, int without_pacing)
{
if (without_pacing)
{
@@ -2382,20 +2382,20 @@
}
/*- End of function --------------------------------------------------------*/
-void t31_set_mode(t31_state_t *s, int t38_mode)
+SPAN_DECLARE(void) t31_set_mode(t31_state_t *s, int t38_mode)
{
s->t38_mode = t38_mode;
span_log(&s->logging, SPAN_LOG_FLOW, "Mode set to %d\n", s->t38_mode);
}
/*- End of function --------------------------------------------------------*/
-logging_state_t *t31_get_logging_state(t31_state_t *s)
+SPAN_DECLARE(logging_state_t *) t31_get_logging_state(t31_state_t *s)
{
return &s->logging;
}
/*- End of function --------------------------------------------------------*/
-t38_core_state_t *t31_get_t38_core_state(t31_state_t *s)
+SPAN_DECLARE(t38_core_state_t *) t31_get_t38_core_state(t31_state_t *s)
{
return &s->t38_fe.t38;
}
@@ -2445,7 +2445,7 @@
}
/*- End of function --------------------------------------------------------*/
-t31_state_t *t31_init(t31_state_t *s,
+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,
@@ -2507,7 +2507,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t31_release(t31_state_t *s)
+SPAN_DECLARE(int) t31_release(t31_state_t *s)
{
at_reset_call_info(&s->at_state);
free(s);
Modified: freeswitch/trunk/libs/spandsp/src/t35.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t35.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t35.c Mon Feb 2 15:36:29 2009
@@ -798,7 +798,7 @@
/*- End of function --------------------------------------------------------*/
#endif
-int t35_decode(const uint8_t *msg, int len, const char **country, const char **vendor, const char **model)
+SPAN_DECLARE(int) t35_decode(const uint8_t *msg, int len, const char **country, const char **vendor, const char **model)
{
int vendor_decoded;
const nsf_data_t *p;
Modified: freeswitch/trunk/libs/spandsp/src/t38_core.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t38_core.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t38_core.c Mon Feb 2 15:36:29 2009
@@ -92,7 +92,7 @@
{ 215000, 0, 0} /* T38_IND_V33_14400_TRAINING */
};
-const char *t38_indicator_to_str(int indicator)
+SPAN_DECLARE(const char *) t38_indicator_to_str(int indicator)
{
switch (indicator)
{
@@ -147,7 +147,7 @@
}
/*- End of function --------------------------------------------------------*/
-const char *t38_data_type_to_str(int data_type)
+SPAN_DECLARE(const char *) t38_data_type_to_str(int data_type)
{
switch (data_type)
{
@@ -186,7 +186,7 @@
}
/*- End of function --------------------------------------------------------*/
-const char *t38_field_type_to_str(int field_type)
+SPAN_DECLARE(const char *) t38_field_type_to_str(int field_type)
{
switch (field_type)
{
@@ -219,7 +219,7 @@
}
/*- End of function --------------------------------------------------------*/
-const char *t38_cm_profile_to_str(int profile)
+SPAN_DECLARE(const char *) t38_cm_profile_to_str(int profile)
{
switch (profile)
{
@@ -240,7 +240,7 @@
}
/*- End of function --------------------------------------------------------*/
-const char *t38_jm_to_str(const uint8_t *data, int len)
+SPAN_DECLARE(const char *) t38_jm_to_str(const uint8_t *data, int len)
{
if (len < 2)
return "???";
@@ -271,7 +271,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t38_v34rate_to_bps(const uint8_t *data, int len)
+SPAN_DECLARE(int) t38_v34rate_to_bps(const uint8_t *data, int len)
{
int i;
int rate;
@@ -327,7 +327,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t38_core_rx_ifp_packet(t38_core_state_t *s, const uint8_t *buf, int len, uint16_t seq_no)
+SPAN_DECLARE(int) t38_core_rx_ifp_packet(t38_core_state_t *s, const uint8_t *buf, int len, uint16_t seq_no)
{
int i;
int t30_indicator;
@@ -777,7 +777,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t38_core_send_indicator(t38_core_state_t *s, int indicator, int count)
+SPAN_DECLARE(int) t38_core_send_indicator(t38_core_state_t *s, int indicator, int count)
{
uint8_t buf[100];
int len;
@@ -809,13 +809,13 @@
}
/*- End of function --------------------------------------------------------*/
-int t38_core_send_flags_delay(t38_core_state_t *s, int indicator)
+SPAN_DECLARE(int) t38_core_send_flags_delay(t38_core_state_t *s, int indicator)
{
return modem_startup_time[indicator].flags;
}
/*- End of function --------------------------------------------------------*/
-int t38_core_send_data(t38_core_state_t *s, int data_type, int field_type, const uint8_t field[], int field_len, int count)
+SPAN_DECLARE(int) t38_core_send_data(t38_core_state_t *s, int data_type, int field_type, const uint8_t field[], int field_len, int count)
{
t38_data_field_t field0;
uint8_t buf[1000];
@@ -835,7 +835,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t38_core_send_data_multi_field(t38_core_state_t *s, int data_type, const t38_data_field_t field[], int fields, int count)
+SPAN_DECLARE(int) t38_core_send_data_multi_field(t38_core_state_t *s, int data_type, const t38_data_field_t field[], int fields, int count)
{
uint8_t buf[1000];
int len;
@@ -851,79 +851,79 @@
}
/*- End of function --------------------------------------------------------*/
-void t38_set_data_rate_management_method(t38_core_state_t *s, int method)
+SPAN_DECLARE(void) t38_set_data_rate_management_method(t38_core_state_t *s, int method)
{
s->data_rate_management_method = method;
}
/*- End of function --------------------------------------------------------*/
-void t38_set_data_transport_protocol(t38_core_state_t *s, int data_transport_protocol)
+SPAN_DECLARE(void) t38_set_data_transport_protocol(t38_core_state_t *s, int data_transport_protocol)
{
s->data_transport_protocol = data_transport_protocol;
}
/*- End of function --------------------------------------------------------*/
-void t38_set_fill_bit_removal(t38_core_state_t *s, int fill_bit_removal)
+SPAN_DECLARE(void) t38_set_fill_bit_removal(t38_core_state_t *s, int fill_bit_removal)
{
s->fill_bit_removal = fill_bit_removal;
}
/*- End of function --------------------------------------------------------*/
-void t38_set_mmr_transcoding(t38_core_state_t *s, int mmr_transcoding)
+SPAN_DECLARE(void) t38_set_mmr_transcoding(t38_core_state_t *s, int mmr_transcoding)
{
s->mmr_transcoding = mmr_transcoding;
}
/*- End of function --------------------------------------------------------*/
-void t38_set_jbig_transcoding(t38_core_state_t *s, int jbig_transcoding)
+SPAN_DECLARE(void) t38_set_jbig_transcoding(t38_core_state_t *s, int jbig_transcoding)
{
s->jbig_transcoding = jbig_transcoding;
}
/*- End of function --------------------------------------------------------*/
-void t38_set_max_buffer_size(t38_core_state_t *s, int max_buffer_size)
+SPAN_DECLARE(void) t38_set_max_buffer_size(t38_core_state_t *s, int max_buffer_size)
{
s->max_buffer_size = max_buffer_size;
}
/*- End of function --------------------------------------------------------*/
-void t38_set_max_datagram_size(t38_core_state_t *s, int max_datagram_size)
+SPAN_DECLARE(void) t38_set_max_datagram_size(t38_core_state_t *s, int max_datagram_size)
{
s->max_datagram_size = max_datagram_size;
}
/*- End of function --------------------------------------------------------*/
-void t38_set_t38_version(t38_core_state_t *s, int t38_version)
+SPAN_DECLARE(void) t38_set_t38_version(t38_core_state_t *s, int t38_version)
{
s->t38_version = t38_version;
}
/*- End of function --------------------------------------------------------*/
-void t38_set_sequence_number_handling(t38_core_state_t *s, int check)
+SPAN_DECLARE(void) t38_set_sequence_number_handling(t38_core_state_t *s, int check)
{
s->check_sequence_numbers = check;
}
/*- End of function --------------------------------------------------------*/
-void t38_set_tep_handling(t38_core_state_t *s, int allow_for_tep)
+SPAN_DECLARE(void) t38_set_tep_handling(t38_core_state_t *s, int allow_for_tep)
{
s->allow_for_tep = allow_for_tep;
}
/*- End of function --------------------------------------------------------*/
-int t38_get_fastest_image_data_rate(t38_core_state_t *s)
+SPAN_DECLARE(int) t38_get_fastest_image_data_rate(t38_core_state_t *s)
{
return s->fastest_image_data_rate;
}
/*- End of function --------------------------------------------------------*/
-logging_state_t *t38_core_get_logging_state(t38_core_state_t *s)
+SPAN_DECLARE(logging_state_t *) t38_core_get_logging_state(t38_core_state_t *s)
{
return &s->logging;
}
/*- End of function --------------------------------------------------------*/
-t38_core_state_t *t38_core_init(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,
Modified: freeswitch/trunk/libs/spandsp/src/t38_gateway.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t38_gateway.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t38_gateway.c Mon Feb 2 15:36:29 2009
@@ -2016,7 +2016,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t38_gateway_rx(t38_gateway_state_t *s, int16_t amp[], int len)
+SPAN_DECLARE(int) t38_gateway_rx(t38_gateway_state_t *s, int16_t amp[], int len)
{
int i;
@@ -2059,7 +2059,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t38_gateway_tx(t38_gateway_state_t *s, int16_t amp[], int max_len)
+SPAN_DECLARE(int) t38_gateway_tx(t38_gateway_state_t *s, int16_t amp[], int max_len)
{
int len;
#if defined(LOG_FAX_AUDIO)
@@ -2104,7 +2104,7 @@
}
/*- End of function --------------------------------------------------------*/
-void t38_gateway_get_transfer_statistics(t38_gateway_state_t *s, t38_stats_t *t)
+SPAN_DECLARE(void) t38_gateway_get_transfer_statistics(t38_gateway_state_t *s, t38_stats_t *t)
{
memset(t, 0, sizeof(*t));
t->bit_rate = s->core.fast_bit_rate;
@@ -2113,31 +2113,31 @@
}
/*- End of function --------------------------------------------------------*/
-t38_core_state_t *t38_gateway_get_t38_core_state(t38_gateway_state_t *s)
+SPAN_DECLARE(t38_core_state_t *) t38_gateway_get_t38_core_state(t38_gateway_state_t *s)
{
return &s->t38x.t38;
}
/*- End of function --------------------------------------------------------*/
-logging_state_t *t38_gateway_get_logging_state(t38_gateway_state_t *s)
+SPAN_DECLARE(logging_state_t *) t38_gateway_get_logging_state(t38_gateway_state_t *s)
{
return &s->logging;
}
/*- End of function --------------------------------------------------------*/
-void t38_gateway_set_ecm_capability(t38_gateway_state_t *s, int ecm_allowed)
+SPAN_DECLARE(void) t38_gateway_set_ecm_capability(t38_gateway_state_t *s, int ecm_allowed)
{
s->core.ecm_allowed = ecm_allowed;
}
/*- End of function --------------------------------------------------------*/
-void t38_gateway_set_transmit_on_idle(t38_gateway_state_t *s, int transmit_on_idle)
+SPAN_DECLARE(void) t38_gateway_set_transmit_on_idle(t38_gateway_state_t *s, int transmit_on_idle)
{
s->audio.modems.transmit_on_idle = transmit_on_idle;
}
/*- End of function --------------------------------------------------------*/
-void t38_gateway_set_supported_modems(t38_gateway_state_t *s, int supported_modems)
+SPAN_DECLARE(void) t38_gateway_set_supported_modems(t38_gateway_state_t *s, int supported_modems)
{
s->core.supported_modems = supported_modems;
if ((s->core.supported_modems & T30_SUPPORT_V17))
@@ -2150,7 +2150,7 @@
}
/*- End of function --------------------------------------------------------*/
-void t38_gateway_set_nsx_suppression(t38_gateway_state_t *s,
+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,
@@ -2161,19 +2161,19 @@
}
/*- End of function --------------------------------------------------------*/
-void t38_gateway_set_tep_mode(t38_gateway_state_t *s, int use_tep)
+SPAN_DECLARE(void) t38_gateway_set_tep_mode(t38_gateway_state_t *s, int use_tep)
{
s->audio.modems.use_tep = use_tep;
}
/*- End of function --------------------------------------------------------*/
-void t38_gateway_set_fill_bit_removal(t38_gateway_state_t *s, int remove)
+SPAN_DECLARE(void) t38_gateway_set_fill_bit_removal(t38_gateway_state_t *s, int remove)
{
s->core.to_t38.fill_bit_removal = remove;
}
/*- End of function --------------------------------------------------------*/
-void t38_gateway_set_real_time_frame_handler(t38_gateway_state_t *s,
+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)
{
@@ -2210,7 +2210,7 @@
}
/*- End of function --------------------------------------------------------*/
-t38_gateway_state_t *t38_gateway_init(t38_gateway_state_t *s,
+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)
{
@@ -2273,7 +2273,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t38_gateway_free(t38_gateway_state_t *s)
+SPAN_DECLARE(int) t38_gateway_free(t38_gateway_state_t *s)
{
free(s);
return 0;
Modified: freeswitch/trunk/libs/spandsp/src/t38_non_ecm_buffer.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t38_non_ecm_buffer.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t38_non_ecm_buffer.c Mon Feb 2 15:36:29 2009
@@ -114,7 +114,7 @@
}
/*- End of function --------------------------------------------------------*/
-void t38_non_ecm_buffer_push(t38_non_ecm_buffer_state_t *s)
+SPAN_DECLARE(void) t38_non_ecm_buffer_push(t38_non_ecm_buffer_state_t *s)
{
/* Don't flow control the data any more. Just push out the remainder of the data
in the buffer as fast as we can, and shut down. */
@@ -123,7 +123,7 @@
}
/*- End of function --------------------------------------------------------*/
-void t38_non_ecm_buffer_inject(t38_non_ecm_buffer_state_t *s, const uint8_t *buf, int len)
+SPAN_DECLARE(void) t38_non_ecm_buffer_inject(t38_non_ecm_buffer_state_t *s, const uint8_t *buf, int len)
{
int i;
int upper;
@@ -218,7 +218,7 @@
}
/*- End of function --------------------------------------------------------*/
-void t38_non_ecm_buffer_report_input_status(t38_non_ecm_buffer_state_t *s, logging_state_t *logging)
+SPAN_DECLARE(void) t38_non_ecm_buffer_report_input_status(t38_non_ecm_buffer_state_t *s, logging_state_t *logging)
{
if (s->in_octets || s->min_row_bits_fill_octets)
{
@@ -235,7 +235,7 @@
}
/*- End of function --------------------------------------------------------*/
-void t38_non_ecm_buffer_report_output_status(t38_non_ecm_buffer_state_t *s, logging_state_t *logging)
+SPAN_DECLARE(void) t38_non_ecm_buffer_report_output_status(t38_non_ecm_buffer_state_t *s, logging_state_t *logging)
{
if (s->out_octets || s->flow_control_fill_octets)
{
@@ -252,14 +252,14 @@
}
/*- End of function --------------------------------------------------------*/
-void t38_non_ecm_buffer_set_mode(t38_non_ecm_buffer_state_t *s, int mode, int min_row_bits)
+SPAN_DECLARE(void) t38_non_ecm_buffer_set_mode(t38_non_ecm_buffer_state_t *s, int mode, int min_row_bits)
{
s->image_data_mode = mode;
s->min_row_bits = min_row_bits;
}
/*- End of function --------------------------------------------------------*/
-t38_non_ecm_buffer_state_t *t38_non_ecm_buffer_init(t38_non_ecm_buffer_state_t *s, int mode, int min_row_bits)
+SPAN_DECLARE(t38_non_ecm_buffer_state_t *) t38_non_ecm_buffer_init(t38_non_ecm_buffer_state_t *s, int mode, int min_row_bits)
{
memset(s, 0, sizeof(*s));
s->octet = 0xFF;
Modified: freeswitch/trunk/libs/spandsp/src/t38_terminal.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t38_terminal.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t38_terminal.c Mon Feb 2 15:36:29 2009
@@ -825,7 +825,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t38_terminal_send_timeout(t38_terminal_state_t *s, int samples)
+SPAN_DECLARE(int) t38_terminal_send_timeout(t38_terminal_state_t *s, int samples)
{
t38_terminal_front_end_state_t *fe;
int delay;
@@ -1004,7 +1004,7 @@
}
/*- End of function --------------------------------------------------------*/
-void t38_terminal_set_config(t38_terminal_state_t *s, int without_pacing)
+SPAN_DECLARE(void) t38_terminal_set_config(t38_terminal_state_t *s, int without_pacing)
{
if (without_pacing)
{
@@ -1027,7 +1027,7 @@
}
/*- End of function --------------------------------------------------------*/
-void t38_terminal_set_tep_mode(t38_terminal_state_t *s, int use_tep)
+SPAN_DECLARE(void) t38_terminal_set_tep_mode(t38_terminal_state_t *s, int use_tep)
{
if (use_tep)
s->t38_fe.chunking_modes |= T38_CHUNKING_ALLOW_TEP_TIME;
@@ -1037,7 +1037,7 @@
}
/*- End of function --------------------------------------------------------*/
-void t38_terminal_set_fill_bit_removal(t38_terminal_state_t *s, int remove)
+SPAN_DECLARE(void) t38_terminal_set_fill_bit_removal(t38_terminal_state_t *s, int remove)
{
if (remove)
s->t38_fe.iaf |= T30_IAF_MODE_NO_FILL_BITS;
@@ -1047,13 +1047,13 @@
}
/*- End of function --------------------------------------------------------*/
-t30_state_t *t38_terminal_get_t30_state(t38_terminal_state_t *s)
+SPAN_DECLARE(t30_state_t *) t38_terminal_get_t30_state(t38_terminal_state_t *s)
{
return &s->t30;
}
/*- End of function --------------------------------------------------------*/
-t38_core_state_t *t38_terminal_get_t38_core_state(t38_terminal_state_t *s)
+SPAN_DECLARE(t38_core_state_t *) t38_terminal_get_t38_core_state(t38_terminal_state_t *s)
{
return &s->t38_fe.t38;
}
@@ -1090,13 +1090,13 @@
}
/*- End of function --------------------------------------------------------*/
-logging_state_t *t38_terminal_get_logging_state(t38_terminal_state_t *s)
+SPAN_DECLARE(logging_state_t *) t38_terminal_get_logging_state(t38_terminal_state_t *s)
{
return &s->logging;
}
/*- End of function --------------------------------------------------------*/
-t38_terminal_state_t *t38_terminal_init(t38_terminal_state_t *s,
+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)
@@ -1133,14 +1133,14 @@
}
/*- End of function --------------------------------------------------------*/
-int t38_terminal_release(t38_terminal_state_t *s)
+SPAN_DECLARE(int) t38_terminal_release(t38_terminal_state_t *s)
{
t30_release(&s->t30);
return 0;
}
/*- End of function --------------------------------------------------------*/
-int t38_terminal_free(t38_terminal_state_t *s)
+SPAN_DECLARE(int) t38_terminal_free(t38_terminal_state_t *s)
{
t30_release(&s->t30);
free(s);
Modified: freeswitch/trunk/libs/spandsp/src/t4.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t4.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t4.c Mon Feb 2 15:36:29 2009
@@ -743,7 +743,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t4_rx_end_page(t4_state_t *s)
+SPAN_DECLARE(int) t4_rx_end_page(t4_state_t *s)
{
int row;
int i;
@@ -1125,19 +1125,19 @@
}
/*- End of function --------------------------------------------------------*/
-int t4_rx_put_bit(t4_state_t *s, int bit)
+SPAN_DECLARE(int) t4_rx_put_bit(t4_state_t *s, int bit)
{
return rx_put_bits(s, bit & 1, 1);
}
/*- End of function --------------------------------------------------------*/
-int t4_rx_put_byte(t4_state_t *s, uint8_t byte)
+SPAN_DECLARE(int) t4_rx_put_byte(t4_state_t *s, uint8_t byte)
{
return rx_put_bits(s, byte & 0xFF, 8);
}
/*- End of function --------------------------------------------------------*/
-int t4_rx_put_chunk(t4_state_t *s, const uint8_t buf[], int len)
+SPAN_DECLARE(int) t4_rx_put_chunk(t4_state_t *s, const uint8_t buf[], int len)
{
int i;
uint8_t byte;
@@ -1152,7 +1152,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t4_rx_set_row_write_handler(t4_state_t *s, t4_row_write_handler_t handler, void *user_data)
+SPAN_DECLARE(int) t4_rx_set_row_write_handler(t4_state_t *s, t4_row_write_handler_t handler, void *user_data)
{
s->row_write_handler = handler;
s->row_write_user_data = user_data;
@@ -1160,7 +1160,7 @@
}
/*- End of function --------------------------------------------------------*/
-t4_state_t *t4_rx_init(t4_state_t *s, const char *file, int output_encoding)
+SPAN_DECLARE(t4_state_t *) t4_rx_init(t4_state_t *s, const char *file, int output_encoding)
{
memset(s, 0, sizeof(*s));
span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
@@ -1213,7 +1213,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t4_rx_start_page(t4_state_t *s)
+SPAN_DECLARE(int) t4_rx_start_page(t4_state_t *s)
{
int bytes_per_row;
int run_space;
@@ -1286,7 +1286,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t4_rx_delete(t4_state_t *s)
+SPAN_DECLARE(int) t4_rx_delete(t4_state_t *s)
{
if (t4_rx_end(s))
return -1;
@@ -1296,7 +1296,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t4_rx_end(t4_state_t *s)
+SPAN_DECLARE(int) t4_rx_end(t4_state_t *s)
{
if (!s->rx)
return -1;
@@ -1307,55 +1307,55 @@
}
/*- End of function --------------------------------------------------------*/
-void t4_rx_set_rx_encoding(t4_state_t *s, int encoding)
+SPAN_DECLARE(void) t4_rx_set_rx_encoding(t4_state_t *s, int encoding)
{
s->line_encoding = encoding;
}
/*- End of function --------------------------------------------------------*/
-void t4_rx_set_image_width(t4_state_t *s, int width)
+SPAN_DECLARE(void) t4_rx_set_image_width(t4_state_t *s, int width)
{
s->image_width = width;
}
/*- End of function --------------------------------------------------------*/
-void t4_rx_set_y_resolution(t4_state_t *s, int resolution)
+SPAN_DECLARE(void) t4_rx_set_y_resolution(t4_state_t *s, int resolution)
{
s->y_resolution = resolution;
}
/*- End of function --------------------------------------------------------*/
-void t4_rx_set_x_resolution(t4_state_t *s, int resolution)
+SPAN_DECLARE(void) t4_rx_set_x_resolution(t4_state_t *s, int resolution)
{
s->x_resolution = resolution;
}
/*- End of function --------------------------------------------------------*/
-void t4_rx_set_dcs(t4_state_t *s, const char *dcs)
+SPAN_DECLARE(void) t4_rx_set_dcs(t4_state_t *s, const char *dcs)
{
s->dcs = (dcs && dcs[0]) ? dcs : NULL;
}
/*- End of function --------------------------------------------------------*/
-void t4_rx_set_sub_address(t4_state_t *s, const char *sub_address)
+SPAN_DECLARE(void) t4_rx_set_sub_address(t4_state_t *s, const char *sub_address)
{
s->sub_address = (sub_address && sub_address[0]) ? sub_address : NULL;
}
/*- End of function --------------------------------------------------------*/
-void t4_rx_set_far_ident(t4_state_t *s, const char *ident)
+SPAN_DECLARE(void) t4_rx_set_far_ident(t4_state_t *s, const char *ident)
{
s->far_ident = (ident && ident[0]) ? ident : NULL;
}
/*- End of function --------------------------------------------------------*/
-void t4_rx_set_vendor(t4_state_t *s, const char *vendor)
+SPAN_DECLARE(void) t4_rx_set_vendor(t4_state_t *s, const char *vendor)
{
s->vendor = vendor;
}
/*- End of function --------------------------------------------------------*/
-void t4_rx_set_model(t4_state_t *s, const char *model)
+SPAN_DECLARE(void) t4_rx_set_model(t4_state_t *s, const char *model)
{
s->model = model;
}
@@ -1709,7 +1709,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t4_tx_set_row_read_handler(t4_state_t *s, t4_row_read_handler_t handler, void *user_data)
+SPAN_DECLARE(int) t4_tx_set_row_read_handler(t4_state_t *s, t4_row_read_handler_t handler, void *user_data)
{
s->row_read_handler = handler;
s->row_read_user_data = user_data;
@@ -1717,7 +1717,7 @@
}
/*- End of function --------------------------------------------------------*/
-t4_state_t *t4_tx_init(t4_state_t *s, const char *file, int start_page, int stop_page)
+SPAN_DECLARE(t4_state_t *) t4_tx_init(t4_state_t *s, const char *file, int start_page, int stop_page)
{
int run_space;
@@ -1806,7 +1806,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t4_tx_start_page(t4_state_t *s)
+SPAN_DECLARE(int) t4_tx_start_page(t4_state_t *s)
{
int row;
int i;
@@ -1965,7 +1965,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t4_tx_more_pages(t4_state_t *s)
+SPAN_DECLARE(int) t4_tx_more_pages(t4_state_t *s)
{
span_log(&s->logging, SPAN_LOG_FLOW, "Checking for the existance of page %d\n", s->pages_transferred + 1);
if (s->pages_transferred >= s->stop_page)
@@ -1986,7 +1986,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t4_tx_restart_page(t4_state_t *s)
+SPAN_DECLARE(int) t4_tx_restart_page(t4_state_t *s)
{
s->bit_pos = 7;
s->bit_ptr = 0;
@@ -1994,14 +1994,14 @@
}
/*- End of function --------------------------------------------------------*/
-int t4_tx_end_page(t4_state_t *s)
+SPAN_DECLARE(int) t4_tx_end_page(t4_state_t *s)
{
s->pages_transferred++;
return 0;
}
/*- End of function --------------------------------------------------------*/
-int t4_tx_get_bit(t4_state_t *s)
+SPAN_DECLARE(int) t4_tx_get_bit(t4_state_t *s)
{
int bit;
@@ -2017,7 +2017,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t4_tx_get_byte(t4_state_t *s)
+SPAN_DECLARE(int) t4_tx_get_byte(t4_state_t *s)
{
if (s->bit_ptr >= s->image_size)
return 0x100;
@@ -2025,7 +2025,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t4_tx_get_chunk(t4_state_t *s, uint8_t buf[], int max_len)
+SPAN_DECLARE(int) t4_tx_get_chunk(t4_state_t *s, uint8_t buf[], int max_len)
{
if (s->bit_ptr >= s->image_size)
return 0;
@@ -2037,7 +2037,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t4_tx_check_bit(t4_state_t *s)
+SPAN_DECLARE(int) t4_tx_check_bit(t4_state_t *s)
{
int bit;
@@ -2048,7 +2048,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t4_tx_delete(t4_state_t *s)
+SPAN_DECLARE(int) t4_tx_delete(t4_state_t *s)
{
if (t4_tx_end(s))
return -1;
@@ -2058,7 +2058,7 @@
}
/*- End of function --------------------------------------------------------*/
-int t4_tx_end(t4_state_t *s)
+SPAN_DECLARE(int) t4_tx_end(t4_state_t *s)
{
if (s->rx)
return -1;
@@ -2069,7 +2069,7 @@
}
/*- End of function --------------------------------------------------------*/
-void t4_tx_set_tx_encoding(t4_state_t *s, int encoding)
+SPAN_DECLARE(void) t4_tx_set_tx_encoding(t4_state_t *s, int encoding)
{
s->line_encoding = encoding;
s->rows_to_next_1d_row = s->max_rows_to_next_1d_row - 1;
@@ -2077,43 +2077,43 @@
}
/*- End of function --------------------------------------------------------*/
-void t4_tx_set_min_row_bits(t4_state_t *s, int bits)
+SPAN_DECLARE(void) t4_tx_set_min_row_bits(t4_state_t *s, int bits)
{
s->min_bits_per_row = bits;
}
/*- End of function --------------------------------------------------------*/
-void t4_tx_set_local_ident(t4_state_t *s, const char *ident)
+SPAN_DECLARE(void) t4_tx_set_local_ident(t4_state_t *s, const char *ident)
{
s->local_ident = (ident && ident[0]) ? ident : NULL;
}
/*- End of function --------------------------------------------------------*/
-void t4_tx_set_header_info(t4_state_t *s, const char *info)
+SPAN_DECLARE(void) t4_tx_set_header_info(t4_state_t *s, const char *info)
{
s->header_info = (info && info[0]) ? info : NULL;
}
/*- End of function --------------------------------------------------------*/
-int t4_tx_get_y_resolution(t4_state_t *s)
+SPAN_DECLARE(int) t4_tx_get_y_resolution(t4_state_t *s)
{
return s->y_resolution;
}
/*- End of function --------------------------------------------------------*/
-int t4_tx_get_x_resolution(t4_state_t *s)
+SPAN_DECLARE(int) t4_tx_get_x_resolution(t4_state_t *s)
{
return s->x_resolution;
}
/*- End of function --------------------------------------------------------*/
-int t4_tx_get_image_width(t4_state_t *s)
+SPAN_DECLARE(int) t4_tx_get_image_width(t4_state_t *s)
{
return s->image_width;
}
/*- End of function --------------------------------------------------------*/
-int t4_tx_get_pages_in_file(t4_state_t *s)
+SPAN_DECLARE(int) t4_tx_get_pages_in_file(t4_state_t *s)
{
int max;
@@ -2131,7 +2131,7 @@
}
/*- End of function --------------------------------------------------------*/
-void t4_get_transfer_statistics(t4_state_t *s, t4_stats_t *t)
+SPAN_DECLARE(void) t4_get_transfer_statistics(t4_state_t *s, t4_stats_t *t)
{
t->pages_transferred = s->pages_transferred - s->start_page;
t->pages_in_file = s->pages_in_file;
@@ -2146,7 +2146,7 @@
}
/*- End of function --------------------------------------------------------*/
-const char *t4_encoding_to_str(int encoding)
+SPAN_DECLARE(const char *) t4_encoding_to_str(int encoding)
{
switch (encoding)
{
Modified: freeswitch/trunk/libs/spandsp/src/time_scale.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/time_scale.c (original)
+++ freeswitch/trunk/libs/spandsp/src/time_scale.c Mon Feb 2 15:36:29 2009
@@ -99,7 +99,7 @@
}
/*- End of function --------------------------------------------------------*/
-int time_scale_rate(time_scale_state_t *s, float playout_rate)
+SPAN_DECLARE(int) time_scale_rate(time_scale_state_t *s, float playout_rate)
{
if (playout_rate <= 0.0f)
return -1;
@@ -124,7 +124,7 @@
}
/*- End of function --------------------------------------------------------*/
-time_scale_state_t *time_scale_init(time_scale_state_t *s, int sample_rate, float playout_rate)
+SPAN_DECLARE(time_scale_state_t *) time_scale_init(time_scale_state_t *s, int sample_rate, float playout_rate)
{
int alloced;
@@ -157,14 +157,14 @@
}
/*- End of function --------------------------------------------------------*/
-int time_scale_free(time_scale_state_t *s)
+SPAN_DECLARE(int) time_scale_free(time_scale_state_t *s)
{
free(s);
return 0;
}
/*- End of function --------------------------------------------------------*/
-int time_scale(time_scale_state_t *s, int16_t out[], int16_t in[], int len)
+SPAN_DECLARE(int) time_scale(time_scale_state_t *s, int16_t out[], int16_t in[], int len)
{
double lcpf;
int pitch;
@@ -272,7 +272,7 @@
}
/*- End of function --------------------------------------------------------*/
-int time_scale_max_output_len(time_scale_state_t *s, int input_len)
+SPAN_DECLARE(int) time_scale_max_output_len(time_scale_state_t *s, int input_len)
{
return (int) (input_len*s->playout_rate + s->min_pitch + 1);
}
Modified: freeswitch/trunk/libs/spandsp/src/tone_detect.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/tone_detect.c (original)
+++ freeswitch/trunk/libs/spandsp/src/tone_detect.c Mon Feb 2 15:36:29 2009
@@ -186,7 +186,7 @@
}
/*- End of function --------------------------------------------------------*/
-complexf_t periodogram(const complexf_t coeffs[], const complexf_t amp[], int len)
+SPAN_DECLARE(complexf_t) periodogram(const complexf_t coeffs[], const complexf_t amp[], int len)
{
complexf_t sum;
complexf_t diff;
@@ -205,7 +205,7 @@
}
/*- End of function --------------------------------------------------------*/
-int periodogram_prepare(complexf_t sum[], complexf_t diff[], const complexf_t amp[], int len)
+SPAN_DECLARE(int) periodogram_prepare(complexf_t sum[], complexf_t diff[], const complexf_t amp[], int len)
{
int i;
@@ -218,7 +218,7 @@
}
/*- End of function --------------------------------------------------------*/
-complexf_t periodogram_apply(const complexf_t coeffs[], const complexf_t sum[], const complexf_t diff[], int len)
+SPAN_DECLARE(complexf_t) periodogram_apply(const complexf_t coeffs[], const complexf_t sum[], const complexf_t diff[], int len)
{
complexf_t x;
int i;
@@ -233,7 +233,7 @@
}
/*- End of function --------------------------------------------------------*/
-int periodogram_generate_coeffs(complexf_t coeffs[], float freq, int sample_rate, int window_len)
+SPAN_DECLARE(int) periodogram_generate_coeffs(complexf_t coeffs[], float freq, int sample_rate, int window_len)
{
float window;
float sum;
@@ -262,7 +262,7 @@
}
/*- End of function --------------------------------------------------------*/
-float periodogram_generate_phase_offset(complexf_t *offset, float freq, int sample_rate, int interval)
+SPAN_DECLARE(float) periodogram_generate_phase_offset(complexf_t *offset, float freq, int sample_rate, int interval)
{
float x;
@@ -274,7 +274,7 @@
}
/*- End of function --------------------------------------------------------*/
-float periodogram_freq_error(const complexf_t *phase_offset, float scale, const complexf_t *last_result, const complexf_t *result)
+SPAN_DECLARE(float) periodogram_freq_error(const complexf_t *phase_offset, float scale, const complexf_t *last_result, const complexf_t *result)
{
complexf_t prediction;
Modified: freeswitch/trunk/libs/spandsp/src/tone_generate.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/tone_generate.c (original)
+++ freeswitch/trunk/libs/spandsp/src/tone_generate.c Mon Feb 2 15:36:29 2009
@@ -60,7 +60,7 @@
#define ms_to_samples(t) (((t)*SAMPLE_RATE)/1000)
-void make_tone_gen_descriptor(tone_gen_descriptor_t *s,
+SPAN_DECLARE(void) make_tone_gen_descriptor(tone_gen_descriptor_t *s,
int f1,
int l1,
int f2,
@@ -106,7 +106,7 @@
}
/*- End of function --------------------------------------------------------*/
-tone_gen_state_t *tone_gen_init(tone_gen_state_t *s, tone_gen_descriptor_t *t)
+SPAN_DECLARE(tone_gen_state_t *) tone_gen_init(tone_gen_state_t *s, tone_gen_descriptor_t *t)
{
int i;
@@ -128,7 +128,7 @@
}
/*- End of function --------------------------------------------------------*/
-int tone_gen(tone_gen_state_t *s, int16_t amp[], int max_samples)
+SPAN_DECLARE(int) tone_gen(tone_gen_state_t *s, int16_t amp[], int max_samples)
{
int samples;
int limit;
Modified: freeswitch/trunk/libs/spandsp/src/v17rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v17rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v17rx.c Mon Feb 2 15:36:29 2009
@@ -132,25 +132,25 @@
};
#endif
-float v17_rx_carrier_frequency(v17_rx_state_t *s)
+SPAN_DECLARE(float) v17_rx_carrier_frequency(v17_rx_state_t *s)
{
return dds_frequencyf(s->carrier_phase_rate);
}
/*- End of function --------------------------------------------------------*/
-float v17_rx_symbol_timing_correction(v17_rx_state_t *s)
+SPAN_DECLARE(float) v17_rx_symbol_timing_correction(v17_rx_state_t *s)
{
return (float) s->total_baud_timing_correction/((float) RX_PULSESHAPER_COEFF_SETS*10.0f/3.0f);
}
/*- End of function --------------------------------------------------------*/
-float v17_rx_signal_power(v17_rx_state_t *s)
+SPAN_DECLARE(float) v17_rx_signal_power(v17_rx_state_t *s)
{
return power_meter_current_dbm0(&s->power);
}
/*- End of function --------------------------------------------------------*/
-void v17_rx_signal_cutoff(v17_rx_state_t *s, float cutoff)
+SPAN_DECLARE(void) v17_rx_signal_cutoff(v17_rx_state_t *s, float cutoff)
{
/* The 0.4 factor allows for the gain of the DC blocker */
s->carrier_on_power = (int32_t) (power_meter_level_dbm0(cutoff + 2.5f)*0.4f);
@@ -168,9 +168,9 @@
/*- End of function --------------------------------------------------------*/
#if defined(SPANDSP_USE_FIXED_POINTx)
-int v17_rx_equalizer_state(v17_rx_state_t *s, complexi16_t **coeffs)
+SPAN_DECLARE(int) v17_rx_equalizer_state(v17_rx_state_t *s, complexi16_t **coeffs)
#else
-int v17_rx_equalizer_state(v17_rx_state_t *s, complexf_t **coeffs)
+SPAN_DECLARE(int) v17_rx_equalizer_state(v17_rx_state_t *s, complexf_t **coeffs)
#endif
{
*coeffs = s->eq_coeff;
@@ -955,7 +955,7 @@
}
/*- End of function --------------------------------------------------------*/
-int v17_rx(v17_rx_state_t *s, const int16_t amp[], int len)
+SPAN_DECLARE(int) v17_rx(v17_rx_state_t *s, const int16_t amp[], int len)
{
int i;
int step;
@@ -1111,27 +1111,27 @@
}
/*- End of function --------------------------------------------------------*/
-void v17_rx_set_put_bit(v17_rx_state_t *s, put_bit_func_t put_bit, void *user_data)
+SPAN_DECLARE(void) v17_rx_set_put_bit(v17_rx_state_t *s, put_bit_func_t put_bit, void *user_data)
{
s->put_bit = put_bit;
s->put_bit_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
-void v17_rx_set_modem_status_handler(v17_rx_state_t *s, modem_tx_status_func_t handler, void *user_data)
+SPAN_DECLARE(void) v17_rx_set_modem_status_handler(v17_rx_state_t *s, modem_tx_status_func_t handler, void *user_data)
{
s->status_handler = handler;
s->status_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
-logging_state_t *v17_rx_get_logging_state(v17_rx_state_t *s)
+SPAN_DECLARE(logging_state_t *) v17_rx_get_logging_state(v17_rx_state_t *s)
{
return &s->logging;
}
/*- End of function --------------------------------------------------------*/
-int v17_rx_restart(v17_rx_state_t *s, int bit_rate, int short_train)
+SPAN_DECLARE(int) v17_rx_restart(v17_rx_state_t *s, int bit_rate, int short_train)
{
int i;
@@ -1240,7 +1240,7 @@
}
/*- End of function --------------------------------------------------------*/
-v17_rx_state_t *v17_rx_init(v17_rx_state_t *s, int bit_rate, put_bit_func_t put_bit, void *user_data)
+SPAN_DECLARE(v17_rx_state_t *) v17_rx_init(v17_rx_state_t *s, int bit_rate, put_bit_func_t put_bit, void *user_data)
{
if (s == NULL)
{
@@ -1263,14 +1263,14 @@
}
/*- End of function --------------------------------------------------------*/
-int v17_rx_free(v17_rx_state_t *s)
+SPAN_DECLARE(int) v17_rx_free(v17_rx_state_t *s)
{
free(s);
return 0;
}
/*- End of function --------------------------------------------------------*/
-void v17_rx_set_qam_report_handler(v17_rx_state_t *s, qam_report_handler_t handler, void *user_data)
+SPAN_DECLARE(void) v17_rx_set_qam_report_handler(v17_rx_state_t *s, qam_report_handler_t handler, void *user_data)
{
s->qam_report = handler;
s->qam_user_data = user_data;
Modified: freeswitch/trunk/libs/spandsp/src/v17tx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v17tx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v17tx.c Mon Feb 2 15:36:29 2009
@@ -249,7 +249,7 @@
}
/*- End of function --------------------------------------------------------*/
-int v17_tx(v17_tx_state_t *s, int16_t amp[], int len)
+SPAN_DECLARE(int) v17_tx(v17_tx_state_t *s, int16_t amp[], int len)
{
#if defined(SPANDSP_USE_FIXED_POINT)
complexi_t x;
@@ -308,7 +308,7 @@
}
/*- End of function --------------------------------------------------------*/
-void v17_tx_power(v17_tx_state_t *s, float power)
+SPAN_DECLARE(void) v17_tx_power(v17_tx_state_t *s, float power)
{
/* The constellation design seems to keep the average power the same, regardless
of which bit rate is in use. */
@@ -320,7 +320,7 @@
}
/*- End of function --------------------------------------------------------*/
-void v17_tx_set_get_bit(v17_tx_state_t *s, get_bit_func_t get_bit, void *user_data)
+SPAN_DECLARE(void) v17_tx_set_get_bit(v17_tx_state_t *s, get_bit_func_t get_bit, void *user_data)
{
if (s->get_bit == s->current_get_bit)
s->current_get_bit = get_bit;
@@ -329,20 +329,20 @@
}
/*- End of function --------------------------------------------------------*/
-void v17_tx_set_modem_status_handler(v17_tx_state_t *s, modem_tx_status_func_t handler, void *user_data)
+SPAN_DECLARE(void) v17_tx_set_modem_status_handler(v17_tx_state_t *s, modem_tx_status_func_t handler, void *user_data)
{
s->status_handler = handler;
s->status_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
-logging_state_t *v17_tx_get_logging_state(v17_tx_state_t *s)
+SPAN_DECLARE(logging_state_t *) v17_tx_get_logging_state(v17_tx_state_t *s)
{
return &s->logging;
}
/*- End of function --------------------------------------------------------*/
-int v17_tx_restart(v17_tx_state_t *s, int bit_rate, int tep, int short_train)
+SPAN_DECLARE(int) v17_tx_restart(v17_tx_state_t *s, int bit_rate, int tep, int short_train)
{
switch (bit_rate)
{
@@ -387,7 +387,7 @@
}
/*- End of function --------------------------------------------------------*/
-v17_tx_state_t *v17_tx_init(v17_tx_state_t *s, int bit_rate, int tep, get_bit_func_t get_bit, void *user_data)
+SPAN_DECLARE(v17_tx_state_t *) v17_tx_init(v17_tx_state_t *s, int bit_rate, int tep, get_bit_func_t get_bit, void *user_data)
{
if (s == NULL)
{
@@ -406,7 +406,7 @@
}
/*- End of function --------------------------------------------------------*/
-int v17_tx_free(v17_tx_state_t *s)
+SPAN_DECLARE(int) v17_tx_free(v17_tx_state_t *s)
{
free(s);
return 0;
Modified: freeswitch/trunk/libs/spandsp/src/v22bis_rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v22bis_rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v22bis_rx.c Mon Feb 2 15:36:29 2009
@@ -124,25 +124,25 @@
{15, 14, 14, 1, 1, 3}
};
-float v22bis_rx_carrier_frequency(v22bis_state_t *s)
+SPAN_DECLARE(float) v22bis_rx_carrier_frequency(v22bis_state_t *s)
{
return dds_frequencyf(s->rx.carrier_phase_rate);
}
/*- End of function --------------------------------------------------------*/
-float v22bis_symbol_timing_correction(v22bis_state_t *s)
+SPAN_DECLARE(float) v22bis_symbol_timing_correction(v22bis_state_t *s)
{
return (float) s->rx.total_baud_timing_correction/((float) PULSESHAPER_COEFF_SETS*40.0f/(3.0f*2.0f));
}
/*- End of function --------------------------------------------------------*/
-float v22bis_rx_signal_power(v22bis_state_t *s)
+SPAN_DECLARE(float) v22bis_rx_signal_power(v22bis_state_t *s)
{
return power_meter_current_dbm0(&s->rx.rx_power);
}
/*- End of function --------------------------------------------------------*/
-int v22bis_equalizer_state(v22bis_state_t *s, complexf_t **coeffs)
+SPAN_DECLARE(int) v22bis_equalizer_state(v22bis_state_t *s, complexf_t **coeffs)
{
*coeffs = s->rx.eq_coeff;
return 2*V22BIS_EQUALIZER_LEN + 1;
@@ -566,7 +566,7 @@
}
/*- End of function --------------------------------------------------------*/
-int v22bis_rx(v22bis_state_t *s, const int16_t amp[], int len)
+SPAN_DECLARE(int) v22bis_rx(v22bis_state_t *s, const int16_t amp[], int len)
{
int i;
int j;
@@ -679,7 +679,7 @@
}
/*- End of function --------------------------------------------------------*/
-int v22bis_rx_restart(v22bis_state_t *s, int bit_rate)
+SPAN_DECLARE(int) v22bis_rx_restart(v22bis_state_t *s, int bit_rate)
{
/* If bit_rate is 2400, the real bit rate is negotiated. If bit_rate
is 1200, the real bit rate is forced to 1200. */
@@ -715,7 +715,7 @@
}
/*- End of function --------------------------------------------------------*/
-void v22bis_set_qam_report_handler(v22bis_state_t *s, qam_report_handler_t handler, void *user_data)
+SPAN_DECLARE(void) v22bis_set_qam_report_handler(v22bis_state_t *s, qam_report_handler_t handler, void *user_data)
{
s->rx.qam_report = handler;
s->rx.qam_user_data = user_data;
Modified: freeswitch/trunk/libs/spandsp/src/v22bis_tx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v22bis_tx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v22bis_tx.c Mon Feb 2 15:36:29 2009
@@ -522,7 +522,7 @@
}
/*- End of function --------------------------------------------------------*/
-int v22bis_tx(v22bis_state_t *s, int16_t amp[], int len)
+SPAN_DECLARE(int) v22bis_tx(v22bis_state_t *s, int16_t amp[], int len)
{
complexf_t x;
complexf_t z;
@@ -564,7 +564,7 @@
}
/*- End of function --------------------------------------------------------*/
-void v22bis_tx_power(v22bis_state_t *s, float power)
+SPAN_DECLARE(void) v22bis_tx_power(v22bis_state_t *s, float power)
{
float l;
@@ -592,27 +592,27 @@
}
/*- End of function --------------------------------------------------------*/
-void v22bis_set_get_bit(v22bis_state_t *s, get_bit_func_t get_bit, void *user_data)
+SPAN_DECLARE(void) v22bis_set_get_bit(v22bis_state_t *s, get_bit_func_t get_bit, void *user_data)
{
s->get_bit = get_bit;
s->user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
-void v22bis_set_put_bit(v22bis_state_t *s, put_bit_func_t put_bit, void *user_data)
+SPAN_DECLARE(void) v22bis_set_put_bit(v22bis_state_t *s, put_bit_func_t put_bit, void *user_data)
{
s->put_bit = put_bit;
s->user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
-logging_state_t *v22bis_get_logging_state(v22bis_state_t *s)
+SPAN_DECLARE(logging_state_t *) v22bis_get_logging_state(v22bis_state_t *s)
{
return &s->logging;
}
/*- End of function --------------------------------------------------------*/
-int v22bis_restart(v22bis_state_t *s, int bit_rate)
+SPAN_DECLARE(int) v22bis_restart(v22bis_state_t *s, int bit_rate)
{
if (bit_rate != 2400 && bit_rate != 1200)
return -1;
@@ -622,7 +622,7 @@
}
/*- End of function --------------------------------------------------------*/
-v22bis_state_t *v22bis_init(v22bis_state_t *s,
+SPAN_DECLARE(v22bis_state_t *) v22bis_init(v22bis_state_t *s,
int bit_rate,
int guard,
int caller,
@@ -672,7 +672,7 @@
}
/*- End of function --------------------------------------------------------*/
-int v22bis_free(v22bis_state_t *s)
+SPAN_DECLARE(int) v22bis_free(v22bis_state_t *s)
{
free(s);
return 0;
Modified: freeswitch/trunk/libs/spandsp/src/v27ter_rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v27ter_rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v27ter_rx.c Mon Feb 2 15:36:29 2009
@@ -128,13 +128,13 @@
};
#endif
-float v27ter_rx_carrier_frequency(v27ter_rx_state_t *s)
+SPAN_DECLARE(float) v27ter_rx_carrier_frequency(v27ter_rx_state_t *s)
{
return dds_frequencyf(s->carrier_phase_rate);
}
/*- End of function --------------------------------------------------------*/
-float v27ter_rx_symbol_timing_correction(v27ter_rx_state_t *s)
+SPAN_DECLARE(float) v27ter_rx_symbol_timing_correction(v27ter_rx_state_t *s)
{
int steps_per_symbol;
@@ -143,13 +143,13 @@
}
/*- End of function --------------------------------------------------------*/
-float v27ter_rx_signal_power(v27ter_rx_state_t *s)
+SPAN_DECLARE(float) v27ter_rx_signal_power(v27ter_rx_state_t *s)
{
return power_meter_current_dbm0(&s->power);
}
/*- End of function --------------------------------------------------------*/
-void v27ter_rx_signal_cutoff(v27ter_rx_state_t *s, float cutoff)
+SPAN_DECLARE(void) v27ter_rx_signal_cutoff(v27ter_rx_state_t *s, float cutoff)
{
/* The 0.4 factor allows for the gain of the DC blocker */
s->carrier_on_power = (int32_t) (power_meter_level_dbm0(cutoff + 2.5f)*0.4f);
@@ -167,9 +167,9 @@
/*- End of function --------------------------------------------------------*/
#if defined(SPANDSP_USE_FIXED_POINTx)
-int v27ter_rx_equalizer_state(v27ter_rx_state_t *s, complexi16_t **coeffs)
+SPAN_DECLARE(int) v27ter_rx_equalizer_state(v27ter_rx_state_t *s, complexi16_t **coeffs)
#else
-int v27ter_rx_equalizer_state(v27ter_rx_state_t *s, complexf_t **coeffs)
+SPAN_DECLARE(int) v27ter_rx_equalizer_state(v27ter_rx_state_t *s, complexf_t **coeffs)
#endif
{
*coeffs = s->eq_coeff;
@@ -741,7 +741,7 @@
}
/*- End of function --------------------------------------------------------*/
-int v27ter_rx(v27ter_rx_state_t *s, const int16_t amp[], int len)
+SPAN_DECLARE(int) v27ter_rx(v27ter_rx_state_t *s, const int16_t amp[], int len)
{
int i;
int step;
@@ -1009,27 +1009,27 @@
}
/*- End of function --------------------------------------------------------*/
-void v27ter_rx_set_put_bit(v27ter_rx_state_t *s, put_bit_func_t put_bit, void *user_data)
+SPAN_DECLARE(void) v27ter_rx_set_put_bit(v27ter_rx_state_t *s, put_bit_func_t put_bit, void *user_data)
{
s->put_bit = put_bit;
s->put_bit_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
-void v27ter_rx_set_modem_status_handler(v27ter_rx_state_t *s, modem_tx_status_func_t handler, void *user_data)
+SPAN_DECLARE(void) v27ter_rx_set_modem_status_handler(v27ter_rx_state_t *s, modem_tx_status_func_t handler, void *user_data)
{
s->status_handler = handler;
s->status_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
-logging_state_t *v27ter_rx_get_logging_state(v27ter_rx_state_t *s)
+SPAN_DECLARE(logging_state_t *) v27ter_rx_get_logging_state(v27ter_rx_state_t *s)
{
return &s->logging;
}
/*- End of function --------------------------------------------------------*/
-int v27ter_rx_restart(v27ter_rx_state_t *s, int bit_rate, int old_train)
+SPAN_DECLARE(int) v27ter_rx_restart(v27ter_rx_state_t *s, int bit_rate, int old_train)
{
span_log(&s->logging, SPAN_LOG_FLOW, "Restarting V.27ter\n");
if (bit_rate != 4800 && bit_rate != 2400)
@@ -1096,7 +1096,7 @@
}
/*- End of function --------------------------------------------------------*/
-v27ter_rx_state_t *v27ter_rx_init(v27ter_rx_state_t *s, int bit_rate, put_bit_func_t put_bit, void *user_data)
+SPAN_DECLARE(v27ter_rx_state_t *) v27ter_rx_init(v27ter_rx_state_t *s, int bit_rate, put_bit_func_t put_bit, void *user_data)
{
if (s == NULL)
{
@@ -1115,14 +1115,14 @@
}
/*- End of function --------------------------------------------------------*/
-int v27ter_rx_free(v27ter_rx_state_t *s)
+SPAN_DECLARE(int) v27ter_rx_free(v27ter_rx_state_t *s)
{
free(s);
return 0;
}
/*- End of function --------------------------------------------------------*/
-void v27ter_rx_set_qam_report_handler(v27ter_rx_state_t *s, qam_report_handler_t handler, void *user_data)
+SPAN_DECLARE(void) v27ter_rx_set_qam_report_handler(v27ter_rx_state_t *s, qam_report_handler_t handler, void *user_data)
{
s->qam_report = handler;
s->qam_user_data = user_data;
Modified: freeswitch/trunk/libs/spandsp/src/v27ter_tx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v27ter_tx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v27ter_tx.c Mon Feb 2 15:36:29 2009
@@ -235,7 +235,7 @@
}
/*- End of function --------------------------------------------------------*/
-int v27ter_tx(v27ter_tx_state_t *s, int16_t amp[], int len)
+SPAN_DECLARE(int) v27ter_tx(v27ter_tx_state_t *s, int16_t amp[], int len)
{
#if defined(SPANDSP_USE_FIXED_POINT)
complexi_t x;
@@ -341,7 +341,7 @@
}
/*- End of function --------------------------------------------------------*/
-void v27ter_tx_power(v27ter_tx_state_t *s, float power)
+SPAN_DECLARE(void) v27ter_tx_power(v27ter_tx_state_t *s, float power)
{
float l;
@@ -356,7 +356,7 @@
}
/*- End of function --------------------------------------------------------*/
-void v27ter_tx_set_get_bit(v27ter_tx_state_t *s, get_bit_func_t get_bit, void *user_data)
+SPAN_DECLARE(void) v27ter_tx_set_get_bit(v27ter_tx_state_t *s, get_bit_func_t get_bit, void *user_data)
{
if (s->get_bit == s->current_get_bit)
s->current_get_bit = get_bit;
@@ -365,20 +365,20 @@
}
/*- End of function --------------------------------------------------------*/
-void v27ter_tx_set_modem_status_handler(v27ter_tx_state_t *s, modem_tx_status_func_t handler, void *user_data)
+SPAN_DECLARE(void) v27ter_tx_set_modem_status_handler(v27ter_tx_state_t *s, modem_tx_status_func_t handler, void *user_data)
{
s->status_handler = handler;
s->status_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
-logging_state_t *v27ter_tx_get_logging_state(v27ter_tx_state_t *s)
+SPAN_DECLARE(logging_state_t *) v27ter_tx_get_logging_state(v27ter_tx_state_t *s)
{
return &s->logging;
}
/*- End of function --------------------------------------------------------*/
-int v27ter_tx_restart(v27ter_tx_state_t *s, int bit_rate, int tep)
+SPAN_DECLARE(int) v27ter_tx_restart(v27ter_tx_state_t *s, int bit_rate, int tep)
{
if (bit_rate != 4800 && bit_rate != 2400)
return -1;
@@ -401,7 +401,7 @@
}
/*- End of function --------------------------------------------------------*/
-v27ter_tx_state_t *v27ter_tx_init(v27ter_tx_state_t *s, int bit_rate, int tep, get_bit_func_t get_bit, void *user_data)
+SPAN_DECLARE(v27ter_tx_state_t *) v27ter_tx_init(v27ter_tx_state_t *s, int bit_rate, int tep, get_bit_func_t get_bit, void *user_data)
{
if (s == NULL)
{
@@ -420,7 +420,7 @@
}
/*- End of function --------------------------------------------------------*/
-int v27ter_tx_free(v27ter_tx_state_t *s)
+SPAN_DECLARE(int) v27ter_tx_free(v27ter_tx_state_t *s)
{
free(s);
return 0;
Modified: freeswitch/trunk/libs/spandsp/src/v29rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v29rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v29rx.c Mon Feb 2 15:36:29 2009
@@ -139,25 +139,25 @@
#define SYNC_CROSS_CORR_COEFF_C -0.378857f /* -alpha*sin(low_edge) */
#endif
-float v29_rx_carrier_frequency(v29_rx_state_t *s)
+SPAN_DECLARE(float) v29_rx_carrier_frequency(v29_rx_state_t *s)
{
return dds_frequencyf(s->carrier_phase_rate);
}
/*- End of function --------------------------------------------------------*/
-float v29_rx_symbol_timing_correction(v29_rx_state_t *s)
+SPAN_DECLARE(float) v29_rx_symbol_timing_correction(v29_rx_state_t *s)
{
return (float) s->total_baud_timing_correction/((float) RX_PULSESHAPER_COEFF_SETS*10.0f/3.0f);
}
/*- End of function --------------------------------------------------------*/
-float v29_rx_signal_power(v29_rx_state_t *s)
+SPAN_DECLARE(float) v29_rx_signal_power(v29_rx_state_t *s)
{
return power_meter_current_dbm0(&s->power);
}
/*- End of function --------------------------------------------------------*/
-void v29_rx_signal_cutoff(v29_rx_state_t *s, float cutoff)
+SPAN_DECLARE(void) v29_rx_signal_cutoff(v29_rx_state_t *s, float cutoff)
{
/* The 0.4 factor allows for the gain of the DC blocker */
s->carrier_on_power = (int32_t) (power_meter_level_dbm0(cutoff + 2.5f)*0.4f);
@@ -175,9 +175,9 @@
/*- End of function --------------------------------------------------------*/
#if defined(SPANDSP_USE_FIXED_POINT)
-int v29_rx_equalizer_state(v29_rx_state_t *s, complexi16_t **coeffs)
+SPAN_DECLARE(int) v29_rx_equalizer_state(v29_rx_state_t *s, complexi16_t **coeffs)
#else
-int v29_rx_equalizer_state(v29_rx_state_t *s, complexf_t **coeffs)
+SPAN_DECLARE(int) v29_rx_equalizer_state(v29_rx_state_t *s, complexf_t **coeffs)
#endif
{
*coeffs = s->eq_coeff;
@@ -829,7 +829,7 @@
}
/*- End of function --------------------------------------------------------*/
-int v29_rx(v29_rx_state_t *s, const int16_t amp[], int len)
+SPAN_DECLARE(int) v29_rx(v29_rx_state_t *s, const int16_t amp[], int len)
{
int i;
int step;
@@ -999,27 +999,27 @@
}
/*- End of function --------------------------------------------------------*/
-void v29_rx_set_put_bit(v29_rx_state_t *s, put_bit_func_t put_bit, void *user_data)
+SPAN_DECLARE(void) v29_rx_set_put_bit(v29_rx_state_t *s, put_bit_func_t put_bit, void *user_data)
{
s->put_bit = put_bit;
s->put_bit_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
-void v29_rx_set_modem_status_handler(v29_rx_state_t *s, modem_tx_status_func_t handler, void *user_data)
+SPAN_DECLARE(void) v29_rx_set_modem_status_handler(v29_rx_state_t *s, modem_tx_status_func_t handler, void *user_data)
{
s->status_handler = handler;
s->status_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
-logging_state_t *v29_rx_get_logging_state(v29_rx_state_t *s)
+SPAN_DECLARE(logging_state_t *) v29_rx_get_logging_state(v29_rx_state_t *s)
{
return &s->logging;
}
/*- End of function --------------------------------------------------------*/
-int v29_rx_restart(v29_rx_state_t *s, int bit_rate, int old_train)
+SPAN_DECLARE(int) v29_rx_restart(v29_rx_state_t *s, int bit_rate, int old_train)
{
switch (bit_rate)
{
@@ -1116,7 +1116,7 @@
}
/*- End of function --------------------------------------------------------*/
-v29_rx_state_t *v29_rx_init(v29_rx_state_t *s, int rate, put_bit_func_t put_bit, void *user_data)
+SPAN_DECLARE(v29_rx_state_t *) v29_rx_init(v29_rx_state_t *s, int rate, put_bit_func_t put_bit, void *user_data)
{
if (s == NULL)
{
@@ -1141,14 +1141,14 @@
}
/*- End of function --------------------------------------------------------*/
-int v29_rx_free(v29_rx_state_t *s)
+SPAN_DECLARE(int) v29_rx_free(v29_rx_state_t *s)
{
free(s);
return 0;
}
/*- End of function --------------------------------------------------------*/
-void v29_rx_set_qam_report_handler(v29_rx_state_t *s, qam_report_handler_t handler, void *user_data)
+SPAN_DECLARE(void) v29_rx_set_qam_report_handler(v29_rx_state_t *s, qam_report_handler_t handler, void *user_data)
{
s->qam_report = handler;
s->qam_user_data = user_data;
Modified: freeswitch/trunk/libs/spandsp/src/v29tx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v29tx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v29tx.c Mon Feb 2 15:36:29 2009
@@ -193,7 +193,7 @@
}
/*- End of function --------------------------------------------------------*/
-int v29_tx(v29_tx_state_t *s, int16_t amp[], int len)
+SPAN_DECLARE(int) v29_tx(v29_tx_state_t *s, int16_t amp[], int len)
{
#if defined(SPANDSP_USE_FIXED_POINT)
complexi_t x;
@@ -288,7 +288,7 @@
}
/*- End of function --------------------------------------------------------*/
-void v29_tx_power(v29_tx_state_t *s, float power)
+SPAN_DECLARE(void) v29_tx_power(v29_tx_state_t *s, float power)
{
/* The constellation does not maintain constant average power as we change bit rates.
We need to scale the gain we get here by a bit rate specific scaling factor each
@@ -298,7 +298,7 @@
}
/*- End of function --------------------------------------------------------*/
-void v29_tx_set_get_bit(v29_tx_state_t *s, get_bit_func_t get_bit, void *user_data)
+SPAN_DECLARE(void) v29_tx_set_get_bit(v29_tx_state_t *s, get_bit_func_t get_bit, void *user_data)
{
if (s->get_bit == s->current_get_bit)
s->current_get_bit = get_bit;
@@ -307,20 +307,20 @@
}
/*- End of function --------------------------------------------------------*/
-void v29_tx_set_modem_status_handler(v29_tx_state_t *s, modem_tx_status_func_t handler, void *user_data)
+SPAN_DECLARE(void) v29_tx_set_modem_status_handler(v29_tx_state_t *s, modem_tx_status_func_t handler, void *user_data)
{
s->status_handler = handler;
s->status_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
-logging_state_t *v29_tx_get_logging_state(v29_tx_state_t *s)
+SPAN_DECLARE(logging_state_t *) v29_tx_get_logging_state(v29_tx_state_t *s)
{
return &s->logging;
}
/*- End of function --------------------------------------------------------*/
-int v29_tx_restart(v29_tx_state_t *s, int bit_rate, int tep)
+SPAN_DECLARE(int) v29_tx_restart(v29_tx_state_t *s, int bit_rate, int tep)
{
span_log(&s->logging, SPAN_LOG_FLOW, "Restarting V.29\n");
s->bit_rate = bit_rate;
@@ -357,7 +357,7 @@
}
/*- End of function --------------------------------------------------------*/
-v29_tx_state_t *v29_tx_init(v29_tx_state_t *s, int bit_rate, int tep, get_bit_func_t get_bit, void *user_data)
+SPAN_DECLARE(v29_tx_state_t *) v29_tx_init(v29_tx_state_t *s, int bit_rate, int tep, get_bit_func_t get_bit, void *user_data)
{
if (s == NULL)
{
@@ -376,7 +376,7 @@
}
/*- End of function --------------------------------------------------------*/
-int v29_tx_free(v29_tx_state_t *s)
+SPAN_DECLARE(int) v29_tx_free(v29_tx_state_t *s)
{
free(s);
return 0;
Modified: freeswitch/trunk/libs/spandsp/src/v42.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v42.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v42.c Mon Feb 2 15:36:29 2009
@@ -356,7 +356,7 @@
}
/*- End of function --------------------------------------------------------*/
-const char *lapm_status_to_str(int status)
+SPAN_DECLARE(const char *) lapm_status_to_str(int status)
{
switch (status)
{
@@ -382,34 +382,34 @@
}
/*- End of function --------------------------------------------------------*/
-int lapm_tx(lapm_state_t *s, const void *buf, int len)
+SPAN_DECLARE(int) lapm_tx(lapm_state_t *s, const void *buf, int len)
{
return queue_write(s->tx_queue, buf, len);
}
/*- End of function --------------------------------------------------------*/
-int lapm_release(lapm_state_t *s)
+SPAN_DECLARE(int) lapm_release(lapm_state_t *s)
{
s->state = LAPM_RELEASE;
return 0;
}
/*- End of function --------------------------------------------------------*/
-int lapm_loopback(lapm_state_t *s, int enable)
+SPAN_DECLARE(int) lapm_loopback(lapm_state_t *s, int enable)
{
s->state = LAPM_TEST;
return 0;
}
/*- End of function --------------------------------------------------------*/
-int lapm_break(lapm_state_t *s, int enable)
+SPAN_DECLARE(int) lapm_break(lapm_state_t *s, int enable)
{
s->state = LAPM_SIGNAL;
return 0;
}
/*- End of function --------------------------------------------------------*/
-int lapm_tx_iframe(lapm_state_t *s, const void *buf, int len, int cr)
+SPAN_DECLARE(int) lapm_tx_iframe(lapm_state_t *s, const void *buf, int len, int cr)
{
lapm_frame_queue_t *f;
@@ -480,7 +480,7 @@
}
/*- End of function --------------------------------------------------------*/
-void lapm_dump(lapm_state_t *s, const uint8_t *frame, int len, int showraw, int txrx)
+SPAN_DECLARE(void) lapm_dump(lapm_state_t *s, const uint8_t *frame, int len, int showraw, int txrx)
{
const char *type;
char direction_tag[2];
@@ -1316,7 +1316,7 @@
}
/*- End of function --------------------------------------------------------*/
-void v42_rx_bit(void *user_data, int bit)
+SPAN_DECLARE(void) v42_rx_bit(void *user_data, int bit)
{
v42_state_t *s;
@@ -1329,7 +1329,7 @@
}
/*- End of function --------------------------------------------------------*/
-int v42_tx_bit(void *user_data)
+SPAN_DECLARE(int) v42_tx_bit(void *user_data)
{
v42_state_t *s;
int bit;
@@ -1344,14 +1344,14 @@
}
/*- End of function --------------------------------------------------------*/
-void v42_set_status_callback(v42_state_t *s, v42_status_func_t callback, void *user_data)
+SPAN_DECLARE(void) v42_set_status_callback(v42_state_t *s, v42_status_func_t callback, void *user_data)
{
s->lapm.status_callback = callback;
s->lapm.status_callback_user_data = user_data;
}
/*- End of function --------------------------------------------------------*/
-void v42_restart(v42_state_t *s)
+SPAN_DECLARE(void) v42_restart(v42_state_t *s)
{
span_schedule_init(&s->lapm.sched);
@@ -1379,7 +1379,7 @@
}
/*- End of function --------------------------------------------------------*/
-v42_state_t *v42_init(v42_state_t *s, int caller, int detect, v42_frame_handler_t frame_handler, void *user_data)
+SPAN_DECLARE(v42_state_t *) v42_init(v42_state_t *s, int caller, int detect, v42_frame_handler_t frame_handler, void *user_data)
{
int alloced;
@@ -1417,7 +1417,7 @@
}
/*- End of function --------------------------------------------------------*/
-int v42_release(v42_state_t *s)
+SPAN_DECLARE(int) v42_release(v42_state_t *s)
{
free(s);
return 0;
Modified: freeswitch/trunk/libs/spandsp/src/v42bis.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v42bis.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v42bis.c Mon Feb 2 15:36:29 2009
@@ -111,7 +111,7 @@
}
/*- End of function --------------------------------------------------------*/
-int v42bis_compress(v42bis_state_t *s, const uint8_t *buf, int len)
+SPAN_DECLARE(int) v42bis_compress(v42bis_state_t *s, const uint8_t *buf, int len)
{
int ptr;
int i;
@@ -323,7 +323,7 @@
}
/*- End of function --------------------------------------------------------*/
-int v42bis_compress_flush(v42bis_state_t *s)
+SPAN_DECLARE(int) v42bis_compress_flush(v42bis_state_t *s)
{
v42bis_compress_state_t *ss;
@@ -369,7 +369,7 @@
/*- End of function --------------------------------------------------------*/
#endif
-int v42bis_decompress(v42bis_state_t *s, const uint8_t *buf, int len)
+SPAN_DECLARE(int) v42bis_decompress(v42bis_state_t *s, const uint8_t *buf, int len)
{
int ptr;
int i;
@@ -567,7 +567,7 @@
}
/*- End of function --------------------------------------------------------*/
-int v42bis_decompress_flush(v42bis_state_t *s)
+SPAN_DECLARE(int) v42bis_decompress_flush(v42bis_state_t *s)
{
v42bis_decompress_state_t *ss;
@@ -599,7 +599,7 @@
/*- End of function --------------------------------------------------------*/
#endif
-void v42bis_compression_control(v42bis_state_t *s, int mode)
+SPAN_DECLARE(void) v42bis_compression_control(v42bis_state_t *s, int mode)
{
s->compress.compression_mode = mode;
switch (mode)
@@ -614,7 +614,7 @@
}
/*- End of function --------------------------------------------------------*/
-v42bis_state_t *v42bis_init(v42bis_state_t *s,
+SPAN_DECLARE(v42bis_state_t *) v42bis_init(v42bis_state_t *s,
int negotiated_p0,
int negotiated_p1,
int negotiated_p2,
@@ -687,7 +687,7 @@
}
/*- End of function --------------------------------------------------------*/
-int v42bis_release(v42bis_state_t *s)
+SPAN_DECLARE(int) v42bis_release(v42bis_state_t *s)
{
free(s);
return 0;
Modified: freeswitch/trunk/libs/spandsp/src/v8.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v8.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v8.c Mon Feb 2 15:36:29 2009
@@ -91,7 +91,7 @@
V8_SYNC_V92
} v8_sync_types_e;
-const char *v8_call_function_to_str(int call_function)
+SPAN_DECLARE(const char *) v8_call_function_to_str(int call_function)
{
switch (call_function)
{
@@ -116,7 +116,7 @@
}
/*- End of function --------------------------------------------------------*/
-const char *v8_modulation_to_str(int modulation_scheme)
+SPAN_DECLARE(const char *) v8_modulation_to_str(int modulation_scheme)
{
switch (modulation_scheme)
{
@@ -155,7 +155,7 @@
}
/*- End of function --------------------------------------------------------*/
-const char *v8_protocol_to_str(int protocol)
+SPAN_DECLARE(const char *) v8_protocol_to_str(int protocol)
{
switch (protocol)
{
@@ -170,19 +170,19 @@
}
/*- End of function --------------------------------------------------------*/
-const char *v8_pstn_access_to_str(int pstn_access)
+SPAN_DECLARE(const char *) v8_pstn_access_to_str(int pstn_access)
{
return "???";
}
/*- End of function --------------------------------------------------------*/
-const char *v8_pcm_modem_availability_to_str(int pcm_modem_availability)
+SPAN_DECLARE(const char *) v8_pcm_modem_availability_to_str(int pcm_modem_availability)
{
return "???";
}
/*- End of function --------------------------------------------------------*/
-void v8_log_supported_modulations(v8_state_t *s, int modulation_schemes)
+SPAN_DECLARE(void) v8_log_supported_modulations(v8_state_t *s, int modulation_schemes)
{
const char *comma;
int i;
@@ -609,7 +609,7 @@
}
/*- End of function --------------------------------------------------------*/
-int v8_tx(v8_state_t *s, int16_t *amp, int max_len)
+SPAN_DECLARE(int) v8_tx(v8_state_t *s, int16_t *amp, int max_len)
{
int len;
@@ -632,7 +632,7 @@
}
/*- End of function --------------------------------------------------------*/
-int v8_rx(v8_state_t *s, const int16_t *amp, int len)
+SPAN_DECLARE(int) v8_rx(v8_state_t *s, const int16_t *amp, int len)
{
int i;
int residual_samples;
@@ -850,13 +850,13 @@
}
/*- End of function --------------------------------------------------------*/
-logging_state_t *v8_get_logging_state(v8_state_t *s)
+SPAN_DECLARE(logging_state_t *) v8_get_logging_state(v8_state_t *s)
{
return &s->logging;
}
/*- End of function --------------------------------------------------------*/
-v8_state_t *v8_init(v8_state_t *s,
+SPAN_DECLARE(v8_state_t *) v8_init(v8_state_t *s,
int caller,
int available_modulations,
v8_result_handler_t *result_handler,
@@ -890,13 +890,13 @@
}
/*- End of function --------------------------------------------------------*/
-int v8_release(v8_state_t *s)
+SPAN_DECLARE(int) v8_release(v8_state_t *s)
{
return queue_free(s->tx_queue);
}
/*- End of function --------------------------------------------------------*/
-int v8_free(v8_state_t *s)
+SPAN_DECLARE(int) v8_free(v8_state_t *s)
{
int ret;
Modified: freeswitch/trunk/libs/spandsp/src/vector_float.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/vector_float.c (original)
+++ freeswitch/trunk/libs/spandsp/src/vector_float.c Mon Feb 2 15:36:29 2009
@@ -73,7 +73,7 @@
#include "spandsp/vector_float.h"
#if defined(__GNUC__) && defined(SPANDSP_USE_SSE2)
-void vec_copyf(float z[], const float x[], int n)
+SPAN_DECLARE(void) vec_copyf(float z[], const float x[], int n)
{
int i;
__m128 n1;
@@ -98,7 +98,7 @@
}
}
#else
-void vec_copyf(float z[], const float x[], int n)
+SPAN_DECLARE(void) vec_copyf(float z[], const float x[], int n)
{
int i;
@@ -108,7 +108,7 @@
#endif
/*- End of function --------------------------------------------------------*/
-void vec_copy(double z[], const double x[], int n)
+SPAN_DECLARE(void) vec_copy(double z[], const double x[], int n)
{
int i;
@@ -129,7 +129,7 @@
#endif
#if defined(__GNUC__) && defined(SPANDSP_USE_SSE2)
-void vec_negatef(float z[], const float x[], int n)
+SPAN_DECLARE(void) vec_negatef(float z[], const float x[], int n)
{
int i;
static const uint32_t mask = 0x80000000;
@@ -158,7 +158,7 @@
}
}
#else
-void vec_negatef(float z[], const float x[], int n)
+SPAN_DECLARE(void) vec_negatef(float z[], const float x[], int n)
{
int i;
@@ -168,7 +168,7 @@
#endif
/*- End of function --------------------------------------------------------*/
-void vec_negate(double z[], const double x[], int n)
+SPAN_DECLARE(void) vec_negate(double z[], const double x[], int n)
{
int i;
@@ -189,7 +189,7 @@
#endif
#if defined(__GNUC__) && defined(SPANDSP_USE_SSE2)
-void vec_zerof(float z[], int n)
+SPAN_DECLARE(void) vec_zerof(float z[], int n)
{
int i;
__m128 n1;
@@ -212,7 +212,7 @@
}
}
#else
-void vec_zerof(float z[], int n)
+SPAN_DECLARE(void) vec_zerof(float z[], int n)
{
int i;
@@ -222,7 +222,7 @@
#endif
/*- End of function --------------------------------------------------------*/
-void vec_zero(double z[], int n)
+SPAN_DECLARE(void) vec_zero(double z[], int n)
{
int i;
@@ -243,7 +243,7 @@
#endif
#if defined(__GNUC__) && defined(SPANDSP_USE_SSE2)
-void vec_setf(float z[], float x, int n)
+SPAN_DECLARE(void) vec_setf(float z[], float x, int n)
{
int i;
__m128 n1;
@@ -266,7 +266,7 @@
}
}
#else
-void vec_setf(float z[], float x, int n)
+SPAN_DECLARE(void) vec_setf(float z[], float x, int n)
{
int i;
@@ -276,7 +276,7 @@
#endif
/*- End of function --------------------------------------------------------*/
-void vec_set(double z[], double x, int n)
+SPAN_DECLARE(void) vec_set(double z[], double x, int n)
{
int i;
@@ -297,7 +297,7 @@
#endif
#if defined(__GNUC__) && defined(SPANDSP_USE_SSE2)
-void vec_addf(float z[], const float x[], const float y[], int n)
+SPAN_DECLARE(void) vec_addf(float z[], const float x[], const float y[], int n)
{
int i;
__m128 n1;
@@ -325,7 +325,7 @@
}
}
#else
-void vec_addf(float z[], const float x[], const float y[], int n)
+SPAN_DECLARE(void) vec_addf(float z[], const float x[], const float y[], int n)
{
int i;
@@ -335,7 +335,7 @@
#endif
/*- End of function --------------------------------------------------------*/
-void vec_add(double z[], const double x[], const double y[], int n)
+SPAN_DECLARE(void) vec_add(double z[], const double x[], const double y[], int n)
{
int i;
@@ -354,7 +354,7 @@
/*- End of function --------------------------------------------------------*/
#if defined(__GNUC__) && defined(SPANDSP_USE_SSE2)
-void vec_scaledxy_addf(float z[], const float x[], float x_scale, const float y[], float y_scale, int n)
+SPAN_DECLARE(void) vec_scaledxy_addf(float z[], const float x[], float x_scale, const float y[], float y_scale, int n)
{
int i;
__m128 n1;
@@ -388,7 +388,7 @@
}
}
#else
-void vec_scaledxy_addf(float z[], const float x[], float x_scale, const float y[], float y_scale, int n)
+SPAN_DECLARE(void) vec_scaledxy_addf(float z[], const float x[], float x_scale, const float y[], float y_scale, int n)
{
int i;
@@ -398,7 +398,7 @@
#endif
/*- End of function --------------------------------------------------------*/
-void vec_scaledxy_add(double z[], const double x[], double x_scale, const double y[], double y_scale, int n)
+SPAN_DECLARE(void) vec_scaledxy_add(double z[], const double x[], double x_scale, const double y[], double y_scale, int n)
{
int i;
@@ -419,7 +419,7 @@
#endif
#if defined(__GNUC__) && defined(SPANDSP_USE_SSE2)
-void vec_scaledy_addf(float z[], const float x[], const float y[], float y_scale, int n)
+SPAN_DECLARE(void) vec_scaledy_addf(float z[], const float x[], const float y[], float y_scale, int n)
{
int i;
__m128 n1;
@@ -450,7 +450,7 @@
}
}
#else
-void vec_scaledy_addf(float z[], const float x[], const float y[], float y_scale, int n)
+SPAN_DECLARE(void) vec_scaledy_addf(float z[], const float x[], const float y[], float y_scale, int n)
{
int i;
@@ -460,7 +460,7 @@
#endif
/*- End of function --------------------------------------------------------*/
-void vec_scaledy_add(double z[], const double x[], const double y[], double y_scale, int n)
+SPAN_DECLARE(void) vec_scaledy_add(double z[], const double x[], const double y[], double y_scale, int n)
{
int i;
@@ -481,7 +481,7 @@
#endif
#if defined(__GNUC__) && defined(SPANDSP_USE_SSE2)
-void vec_subf(float z[], const float x[], const float y[], int n)
+SPAN_DECLARE(void) vec_subf(float z[], const float x[], const float y[], int n)
{
int i;
__m128 n1;
@@ -509,7 +509,7 @@
}
}
#else
-void vec_subf(float z[], const float x[], const float y[], int n)
+SPAN_DECLARE(void) vec_subf(float z[], const float x[], const float y[], int n)
{
int i;
@@ -519,7 +519,7 @@
#endif
/*- End of function --------------------------------------------------------*/
-void vec_sub(double z[], const double x[], const double y[], int n)
+SPAN_DECLARE(void) vec_sub(double z[], const double x[], const double y[], int n)
{
int i;
@@ -539,7 +539,7 @@
/*- End of function --------------------------------------------------------*/
#endif
-void vec_scaledxy_subf(float z[], const float x[], float x_scale, const float y[], float y_scale, int n)
+SPAN_DECLARE(void) vec_scaledxy_subf(float z[], const float x[], float x_scale, const float y[], float y_scale, int n)
{
int i;
@@ -548,7 +548,7 @@
}
/*- End of function --------------------------------------------------------*/
-void vec_scaledxy_sub(double z[], const double x[], double x_scale, const double y[], double y_scale, int n)
+SPAN_DECLARE(void) vec_scaledxy_sub(double z[], const double x[], double x_scale, const double y[], double y_scale, int n)
{
int i;
@@ -569,7 +569,7 @@
#endif
#if defined(__GNUC__) && defined(SPANDSP_USE_SSE2)
-void vec_scalar_mulf(float z[], const float x[], float y, int n)
+SPAN_DECLARE(void) vec_scalar_mulf(float z[], const float x[], float y, int n)
{
int i;
__m128 n1;
@@ -597,7 +597,7 @@
}
}
#else
-void vec_scalar_mulf(float z[], const float x[], float y, int n)
+SPAN_DECLARE(void) vec_scalar_mulf(float z[], const float x[], float y, int n)
{
int i;
@@ -607,7 +607,7 @@
#endif
/*- End of function --------------------------------------------------------*/
-void vec_scalar_mul(double z[], const double x[], double y, int n)
+SPAN_DECLARE(void) vec_scalar_mul(double z[], const double x[], double y, int n)
{
int i;
@@ -617,7 +617,7 @@
/*- End of function --------------------------------------------------------*/
#if defined(__GNUC__) && defined(SPANDSP_USE_SSE2)
-void vec_scalar_addf(float z[], const float x[], float y, int n)
+SPAN_DECLARE(void) vec_scalar_addf(float z[], const float x[], float y, int n)
{
int i;
__m128 n1;
@@ -645,7 +645,7 @@
}
}
#else
-void vec_scalar_addf(float z[], const float x[], float y, int n)
+SPAN_DECLARE(void) vec_scalar_addf(float z[], const float x[], float y, int n)
{
int i;
@@ -655,7 +655,7 @@
#endif
/*- End of function --------------------------------------------------------*/
-void vec_scalar_add(double z[], const double x[], double y, int n)
+SPAN_DECLARE(void) vec_scalar_add(double z[], const double x[], double y, int n)
{
int i;
@@ -676,7 +676,7 @@
#endif
#if defined(__GNUC__) && defined(SPANDSP_USE_SSE2)
-void vec_scalar_subf(float z[], const float x[], float y, int n)
+SPAN_DECLARE(void) vec_scalar_subf(float z[], const float x[], float y, int n)
{
int i;
__m128 n1;
@@ -704,7 +704,7 @@
}
}
#else
-void vec_scalar_subf(float z[], const float x[], float y, int n)
+SPAN_DECLARE(void) vec_scalar_subf(float z[], const float x[], float y, int n)
{
int i;
@@ -714,7 +714,7 @@
#endif
/*- End of function --------------------------------------------------------*/
-void vec_scalar_sub(double z[], const double x[], double y, int n)
+SPAN_DECLARE(void) vec_scalar_sub(double z[], const double x[], double y, int n)
{
int i;
@@ -735,7 +735,7 @@
#endif
#if defined(__GNUC__) && defined(SPANDSP_USE_SSE2)
-void vec_mulf(float z[], const float x[], const float y[], int n)
+SPAN_DECLARE(void) vec_mulf(float z[], const float x[], const float y[], int n)
{
int i;
__m128 n1;
@@ -764,7 +764,7 @@
}
}
#else
-void vec_mulf(float z[], const float x[], const float y[], int n)
+SPAN_DECLARE(void) vec_mulf(float z[], const float x[], const float y[], int n)
{
int i;
@@ -774,7 +774,7 @@
/*- End of function --------------------------------------------------------*/
#endif
-void vec_mul(double z[], const double x[], const double y[], int n)
+SPAN_DECLARE(void) vec_mul(double z[], const double x[], const double y[], int n)
{
int i;
@@ -795,7 +795,7 @@
#endif
#if defined(__GNUC__) && defined(SPANDSP_USE_SSE2)
-float vec_dot_prodf(const float x[], const float y[], int n)
+SPAN_DECLARE(float) vec_dot_prodf(const float x[], const float y[], int n)
{
int i;
float z;
@@ -832,7 +832,7 @@
return z;
}
#else
-float vec_dot_prodf(const float x[], const float y[], int n)
+SPAN_DECLARE(float) vec_dot_prodf(const float x[], const float y[], int n)
{
int i;
float z;
@@ -845,7 +845,7 @@
/*- End of function --------------------------------------------------------*/
#endif
-double vec_dot_prod(const double x[], const double y[], int n)
+SPAN_DECLARE(double) vec_dot_prod(const double x[], const double y[], int n)
{
int i;
double z;
@@ -871,7 +871,7 @@
/*- End of function --------------------------------------------------------*/
#endif
-float vec_circular_dot_prodf(const float x[], const float y[], int n, int pos)
+SPAN_DECLARE(float) vec_circular_dot_prodf(const float x[], const float y[], int n, int pos)
{
float z;
@@ -884,7 +884,7 @@
#define LMS_LEAK_RATE 0.9999f
#if defined(__GNUC__) && defined(SPANDSP_USE_SSE2)
-void vec_lmsf(const float x[], float y[], int n, float error)
+SPAN_DECLARE(void) vec_lmsf(const float x[], float y[], int n, float error)
{
int i;
__m128 n1;
@@ -918,7 +918,7 @@
}
}
#else
-void vec_lmsf(const float x[], float y[], int n, float error)
+SPAN_DECLARE(void) vec_lmsf(const float x[], float y[], int n, float error)
{
int i;
@@ -931,7 +931,7 @@
#endif
/*- End of function --------------------------------------------------------*/
-void vec_circular_lmsf(const float x[], float y[], int n, int pos, float error)
+SPAN_DECLARE(void) vec_circular_lmsf(const float x[], float y[], int n, int pos, float error)
{
vec_lmsf(&x[pos], &y[0], n - pos, error);
vec_lmsf(&x[0], &y[n - pos], pos, error);
Modified: freeswitch/trunk/libs/spandsp/src/vector_int.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/vector_int.c (original)
+++ freeswitch/trunk/libs/spandsp/src/vector_int.c Mon Feb 2 15:36:29 2009
@@ -72,7 +72,7 @@
#include "spandsp/telephony.h"
#include "spandsp/vector_int.h"
-int32_t vec_dot_prodi16(const int16_t x[], const int16_t y[], int n)
+SPAN_DECLARE(int32_t) vec_dot_prodi16(const int16_t x[], const int16_t y[], int n)
{
int32_t z;
@@ -285,7 +285,7 @@
}
/*- End of function --------------------------------------------------------*/
-int32_t vec_circular_dot_prodi16(const int16_t x[], const int16_t y[], int n, int pos)
+SPAN_DECLARE(int32_t) vec_circular_dot_prodi16(const int16_t x[], const int16_t y[], int n, int pos)
{
int32_t z;
@@ -295,7 +295,7 @@
}
/*- End of function --------------------------------------------------------*/
-void vec_lmsi16(const int16_t x[], int16_t y[], int n, int16_t error)
+SPAN_DECLARE(void) vec_lmsi16(const int16_t x[], int16_t y[], int n, int16_t error)
{
int i;
@@ -304,14 +304,14 @@
}
/*- End of function --------------------------------------------------------*/
-void vec_circular_lmsi16(const int16_t x[], int16_t y[], int n, int pos, int16_t error)
+SPAN_DECLARE(void) vec_circular_lmsi16(const int16_t x[], int16_t y[], int n, int pos, int16_t error)
{
vec_lmsi16(&x[pos], &y[0], n - pos, error);
vec_lmsi16(&x[0], &y[n - pos], pos, error);
}
/*- End of function --------------------------------------------------------*/
-int32_t vec_min_maxi16(const int16_t x[], int n, int16_t out[])
+SPAN_DECLARE(int32_t) vec_min_maxi16(const int16_t x[], int n, int16_t out[])
{
#if defined(__GNUC__) && defined(SPANDSP_USE_MMX)
static const int32_t lower_bound = 0x80008000;
1
0