Removed use of _NONSTD for Windows builds of spandsp, so (hopefully) eliminate

compatibility problems with recent versions of MSVC
This commit is contained in:
Steve Underwood 2015-09-28 21:47:27 +08:00
parent 3a13f0df1a
commit 721ea6dceb
60 changed files with 2343 additions and 2081 deletions

View File

@ -16,9 +16,6 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# $Id: autogen.sh,v 1.1.1.1 2009/11/19 12:10:48 steveu Exp $
#
UNAME=`uname` UNAME=`uname`

View File

@ -16,9 +16,6 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# $Id: regression_tests.sh.in,v 1.2 2009/11/20 13:12:24 steveu Exp $
#
STDOUT_DEST=xyzzy STDOUT_DEST=xyzzy
STDERR_DEST=xyzzy2 STDERR_DEST=xyzzy2

View File

@ -21,8 +21,6 @@
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software * License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: timing.h,v 1.1.1.1 2009/11/19 12:10:48 steveu Exp $
*/ */
#if !defined(_TIMING_H_) #if !defined(_TIMING_H_)

View File

@ -90,7 +90,7 @@ SPAN_DECLARE(const char *) signal_status_to_str(int status)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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; async_rx_state_t *s;
@ -215,7 +215,7 @@ SPAN_DECLARE(int) async_rx_free(async_rx_state_t *s)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) async_tx_get_bit(void *user_data) SPAN_DECLARE(int) async_tx_get_bit(void *user_data)
{ {
async_tx_state_t *s; async_tx_state_t *s;
int bit; int bit;

View File

@ -161,7 +161,7 @@ static void hdlc_underflow_handler(void *user_data)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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; int i;
@ -180,7 +180,7 @@ SPAN_DECLARE_NONSTD(int) fax_rx(fax_state_t *s, int16_t *amp, int len)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) fax_rx_fillin(fax_state_t *s, int len) SPAN_DECLARE(int) fax_rx_fillin(fax_state_t *s, int len)
{ {
/* To mitigate the effect of lost packets on a packet network we should /* To mitigate the effect of lost packets on a packet network we should
try to sustain the status quo. If there is no receive modem running, keep try to sustain the status quo. If there is no receive modem running, keep
@ -209,7 +209,7 @@ SPAN_DECLARE_NONSTD(int) fax_rx_fillin(fax_state_t *s, int len)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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; int len;
#if defined(LOG_FAX_AUDIO) #if defined(LOG_FAX_AUDIO)

View File

@ -152,7 +152,7 @@ SPAN_DECLARE(const char *) fax_modem_to_str(int modem)
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
//static void fax_modems_hdlc_accept(void *user_data, const uint8_t *msg, int len, int ok) //static void fax_modems_hdlc_accept(void *user_data, const uint8_t *msg, int len, int ok)
SPAN_DECLARE_NONSTD(void) fax_modems_hdlc_accept(void *user_data, const uint8_t *msg, int len, int ok) SPAN_DECLARE(void) fax_modems_hdlc_accept(void *user_data, const uint8_t *msg, int len, int ok)
{ {
fax_modems_state_t *s; fax_modems_state_t *s;
@ -168,7 +168,7 @@ SPAN_DECLARE_NONSTD(void) fax_modems_hdlc_accept(void *user_data, const uint8_t
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(void) fax_modems_hdlc_tx_frame(void *user_data, const uint8_t *msg, int len) SPAN_DECLARE(void) fax_modems_hdlc_tx_frame(void *user_data, const uint8_t *msg, int len)
{ {
fax_modems_state_t *s; fax_modems_state_t *s;
@ -206,7 +206,7 @@ static void v17_rx_status_handler(void *user_data, int status)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) fax_modems_v17_v21_rx(void *user_data, const int16_t amp[], int len) SPAN_DECLARE(int) fax_modems_v17_v21_rx(void *user_data, const int16_t amp[], int len)
{ {
fax_modems_state_t *s; fax_modems_state_t *s;
@ -224,7 +224,7 @@ SPAN_DECLARE_NONSTD(int) fax_modems_v17_v21_rx(void *user_data, const int16_t am
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) fax_modems_v17_v21_rx_fillin(void *user_data, int len) SPAN_DECLARE(int) fax_modems_v17_v21_rx_fillin(void *user_data, int len)
{ {
fax_modems_state_t *s; fax_modems_state_t *s;
@ -253,7 +253,7 @@ static void v27ter_rx_status_handler(void *user_data, int status)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) fax_modems_v27ter_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)
{ {
fax_modems_state_t *s; fax_modems_state_t *s;
@ -271,7 +271,7 @@ SPAN_DECLARE_NONSTD(int) fax_modems_v27ter_v21_rx(void *user_data, const int16_t
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) fax_modems_v27ter_v21_rx_fillin(void *user_data, int len) SPAN_DECLARE(int) fax_modems_v27ter_v21_rx_fillin(void *user_data, int len)
{ {
fax_modems_state_t *s; fax_modems_state_t *s;
@ -300,7 +300,7 @@ static void v29_rx_status_handler(void *user_data, int status)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) fax_modems_v29_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)
{ {
fax_modems_state_t *s; fax_modems_state_t *s;
@ -318,7 +318,7 @@ SPAN_DECLARE_NONSTD(int) fax_modems_v29_v21_rx(void *user_data, const int16_t am
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) fax_modems_v29_v21_rx_fillin(void *user_data, int len) SPAN_DECLARE(int) fax_modems_v29_v21_rx_fillin(void *user_data, int len)
{ {
fax_modems_state_t *s; fax_modems_state_t *s;

View File

@ -200,7 +200,7 @@ SPAN_DECLARE(int) fsk_tx_free(fsk_tx_state_t *s)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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 sample;
int bit; int bit;
@ -382,7 +382,7 @@ static void report_status_change(fsk_rx_state_t *s, int status)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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 buf_ptr;
int baudstate; int baudstate;
@ -626,7 +626,7 @@ SPAN_DECLARE_NONSTD(int) fsk_rx(fsk_rx_state_t *s, const int16_t *amp, int len)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) fsk_rx_fillin(fsk_rx_state_t *s, int len) SPAN_DECLARE(int) fsk_rx_fillin(fsk_rx_state_t *s, int len)
{ {
int buf_ptr; int buf_ptr;
int i; int i;

View File

@ -299,7 +299,7 @@ static __inline__ void hdlc_rx_put_bit_core(hdlc_rx_state_t *s)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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) if (new_bit < 0)
{ {
@ -312,7 +312,7 @@ SPAN_DECLARE_NONSTD(void) hdlc_rx_put_bit(hdlc_rx_state_t *s, int new_bit)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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; int i;
@ -332,7 +332,7 @@ SPAN_DECLARE_NONSTD(void) hdlc_rx_put_byte(hdlc_rx_state_t *s, int new_byte)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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; int i;
@ -517,7 +517,7 @@ SPAN_DECLARE(int) hdlc_tx_corrupt_frame(hdlc_tx_state_t *s)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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 i;
int byte_in_progress; int byte_in_progress;
@ -636,7 +636,7 @@ SPAN_DECLARE_NONSTD(int) hdlc_tx_get_byte(hdlc_tx_state_t *s)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) hdlc_tx_get_bit(hdlc_tx_state_t *s) SPAN_DECLARE(int) hdlc_tx_get_bit(hdlc_tx_state_t *s)
{ {
int txbit; int txbit;
@ -652,7 +652,7 @@ SPAN_DECLARE_NONSTD(int) hdlc_tx_get_bit(hdlc_tx_state_t *s)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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; size_t i;
int x; int x;

View File

@ -110,9 +110,9 @@ SPAN_DECLARE(const char *) modem_connect_tone_to_str(int tone)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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[], int16_t amp[],
int len) int len)
{ {
int16_t mod; int16_t mod;
int i; int i;
@ -456,9 +456,9 @@ static void v21_put_bit(void *user_data, int bit)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) modem_connect_tones_rx(modem_connect_tones_rx_state_t *s, SPAN_DECLARE(int) modem_connect_tones_rx(modem_connect_tones_rx_state_t *s,
const int16_t amp[], const int16_t amp[],
int len) int len)
{ {
int i; int i;
int16_t notched; int16_t notched;
@ -700,7 +700,7 @@ SPAN_DECLARE_NONSTD(int) modem_connect_tones_rx(modem_connect_tones_rx_state_t *
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) modem_connect_tones_rx_fillin(modem_connect_tones_rx_state_t *s, int len) SPAN_DECLARE(int) modem_connect_tones_rx_fillin(modem_connect_tones_rx_state_t *s, int len)
{ {
return 0; return 0;
} }

View File

@ -57,7 +57,7 @@
#include "spandsp/private/silence_gen.h" #include "spandsp/private/silence_gen.h"
SPAN_DECLARE_NONSTD(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) if (s->remaining_samples != INT_MAX)
{ {
@ -151,7 +151,7 @@ SPAN_DECLARE(int) silence_gen_free(silence_gen_state_t *s)
/* The following dummy routines, to absorb data, don't really have a proper home, /* The following dummy routines, to absorb data, don't really have a proper home,
so they have been put here. */ so they have been put here. */
SPAN_DECLARE_NONSTD(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; return 0;
} }
@ -163,7 +163,7 @@ SPAN_DECLARE(int) span_dummy_mod(void *user_data, int16_t amp[], int len)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) span_dummy_rx_fillin(void *user_data, int len) SPAN_DECLARE(int) span_dummy_rx_fillin(void *user_data, int len)
{ {
return 0; return 0;
} }

View File

@ -156,7 +156,7 @@ SPAN_DECLARE(const char *) signal_status_to_str(int status);
- SIG_STATUS_TRAINING_SUCCEEDED - SIG_STATUS_TRAINING_SUCCEEDED
- SIG_STATUS_TRAINING_FAILED - SIG_STATUS_TRAINING_FAILED
- SIG_STATUS_END_OF_DATA */ - SIG_STATUS_END_OF_DATA */
SPAN_DECLARE_NONSTD(void) async_rx_put_bit(void *user_data, int bit); SPAN_DECLARE(void) async_rx_put_bit(void *user_data, int bit);
/*! Initialise an asynchronous data receiver context. /*! Initialise an asynchronous data receiver context.
\brief Initialise an asynchronous data receiver context. \brief Initialise an asynchronous data receiver context.
@ -190,7 +190,7 @@ SPAN_DECLARE(void) async_tx_presend_bits(async_tx_state_t *s, int bits);
\brief 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. \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. */ \return the next bit, or PUTBIT_END_OF_DATA to indicate the data stream has ended. */
SPAN_DECLARE_NONSTD(int) async_tx_get_bit(void *user_data); SPAN_DECLARE(int) async_tx_get_bit(void *user_data);
/*! Initialise an asynchronous data transmit context. /*! Initialise an asynchronous data transmit context.
\brief Initialise an asynchronous data transmit context. \brief Initialise an asynchronous data transmit context.

View File

@ -50,7 +50,7 @@ extern "C"
\return The number of samples unprocessed. This should only be non-zero if \return The number of samples unprocessed. This should only be non-zero if
the software has reached the end of the FAX call. the software has reached the end of the FAX call.
*/ */
SPAN_DECLARE_NONSTD(int) fax_rx(fax_state_t *s, int16_t *amp, int len); SPAN_DECLARE(int) fax_rx(fax_state_t *s, int16_t *amp, int len);
/*! Apply fake T.30 receive processing when a block of audio samples is missing (e.g due /*! Apply fake T.30 receive processing when a block of audio samples is missing (e.g due
to packet loss). to packet loss).
@ -60,7 +60,7 @@ SPAN_DECLARE_NONSTD(int) fax_rx(fax_state_t *s, int16_t *amp, int len);
\return The number of samples unprocessed. This should only be non-zero if \return The number of samples unprocessed. This should only be non-zero if
the software has reached the end of the FAX call. the software has reached the end of the FAX call.
*/ */
SPAN_DECLARE_NONSTD(int) fax_rx_fillin(fax_state_t *s, int len); SPAN_DECLARE(int) fax_rx_fillin(fax_state_t *s, int len);
/*! Apply T.30 transmit processing to generate a block of audio samples. /*! Apply T.30 transmit processing to generate a block of audio samples.
\brief Apply T.30 transmit processing to generate a block of audio samples. \brief Apply T.30 transmit processing to generate a block of audio samples.
@ -70,7 +70,7 @@ SPAN_DECLARE_NONSTD(int) fax_rx_fillin(fax_state_t *s, int len);
\return The number of samples actually generated. This will be zero when \return The number of samples actually generated. This will be zero when
there is nothing to send. there is nothing to send.
*/ */
SPAN_DECLARE_NONSTD(int) fax_tx(fax_state_t *s, int16_t *amp, int max_len); SPAN_DECLARE(int) fax_tx(fax_state_t *s, int16_t *amp, int max_len);
/*! Select whether silent audio will be sent when FAX transmit is idle. /*! Select whether silent audio will be sent when FAX transmit is idle.
\brief Select whether silent audio will be sent when FAX transmit is idle. \brief Select whether silent audio will be sent when FAX transmit is idle.

View File

@ -64,7 +64,7 @@ extern "C"
#endif #endif
/* TEMPORARY FUDGE */ /* TEMPORARY FUDGE */
SPAN_DECLARE_NONSTD(void) fax_modems_hdlc_accept(void *user_data, const uint8_t *msg, int len, int ok); SPAN_DECLARE(void) fax_modems_hdlc_accept(void *user_data, const uint8_t *msg, int len, int ok);
/*! Convert a FAX modem type to a short text description. /*! Convert a FAX modem type to a short text description.
\brief Convert a FAX modem type to a short text description. \brief Convert a FAX modem type to a short text description.
@ -73,14 +73,14 @@ SPAN_DECLARE_NONSTD(void) fax_modems_hdlc_accept(void *user_data, const uint8_t
SPAN_DECLARE(const char *) fax_modem_to_str(int modem); SPAN_DECLARE(const char *) fax_modem_to_str(int modem);
/* N.B. the following are currently a work in progress */ /* N.B. the following are currently a work in progress */
SPAN_DECLARE_NONSTD(int) fax_modems_v17_v21_rx(void *user_data, const int16_t amp[], int len); SPAN_DECLARE(int) fax_modems_v17_v21_rx(void *user_data, const int16_t amp[], int len);
SPAN_DECLARE_NONSTD(int) fax_modems_v27ter_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_NONSTD(int) fax_modems_v29_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_NONSTD(int) fax_modems_v17_v21_rx_fillin(void *user_data, int len); SPAN_DECLARE(int) fax_modems_v17_v21_rx_fillin(void *user_data, int len);
SPAN_DECLARE_NONSTD(int) fax_modems_v27ter_v21_rx_fillin(void *user_data, int len); SPAN_DECLARE(int) fax_modems_v27ter_v21_rx_fillin(void *user_data, int len);
SPAN_DECLARE_NONSTD(int) fax_modems_v29_v21_rx_fillin(void *user_data, int len); SPAN_DECLARE(int) fax_modems_v29_v21_rx_fillin(void *user_data, int len);
SPAN_DECLARE_NONSTD(void) fax_modems_hdlc_tx_frame(void *user_data, const uint8_t *msg, int len); SPAN_DECLARE(void) fax_modems_hdlc_tx_frame(void *user_data, const uint8_t *msg, int len);
SPAN_DECLARE(void) fax_modems_hdlc_tx_flags(fax_modems_state_t *s, int flags); SPAN_DECLARE(void) fax_modems_hdlc_tx_flags(fax_modems_state_t *s, int flags);

View File

@ -187,7 +187,7 @@ SPAN_DECLARE(void) fsk_tx_set_modem_status_handler(fsk_tx_state_t *s, modem_stat
\param len The number of samples to be generated. \param len The number of samples to be generated.
\return The number of samples actually generated. \return The number of samples actually generated.
*/ */
SPAN_DECLARE_NONSTD(int) fsk_tx(fsk_tx_state_t *s, int16_t amp[], int len); SPAN_DECLARE(int) fsk_tx(fsk_tx_state_t *s, int16_t amp[], int len);
/*! Get the current received signal power. /*! Get the current received signal power.
\param s The modem context. \param s The modem context.
@ -228,7 +228,7 @@ SPAN_DECLARE(int) fsk_rx_free(fsk_rx_state_t *s);
\param len The number of samples in the buffer. \param len The number of samples in the buffer.
\return The number of samples unprocessed. \return The number of samples unprocessed.
*/ */
SPAN_DECLARE_NONSTD(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);
/*! Fake processing of a missing block of received FSK modem audio samples /*! Fake processing of a missing block of received FSK modem audio samples
(e.g due to packet loss). (e.g due to packet loss).
@ -237,7 +237,7 @@ SPAN_DECLARE_NONSTD(int) fsk_rx(fsk_rx_state_t *s, const int16_t *amp, int len);
\param len The number of samples to fake. \param len The number of samples to fake.
\return The number of samples unprocessed. \return The number of samples unprocessed.
*/ */
SPAN_DECLARE_NONSTD(int) fsk_rx_fillin(fsk_rx_state_t *s, int len); SPAN_DECLARE(int) fsk_rx_fillin(fsk_rx_state_t *s, int len);
SPAN_DECLARE(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);

View File

@ -160,20 +160,20 @@ SPAN_DECLARE(int) hdlc_rx_get_stats(hdlc_rx_state_t *s,
\param s A pointer to an HDLC receiver context. \param s A pointer to an HDLC receiver context.
\param new_bit The bit. \param new_bit The bit.
*/ */
SPAN_DECLARE_NONSTD(void) hdlc_rx_put_bit(hdlc_rx_state_t *s, int new_bit); SPAN_DECLARE(void) hdlc_rx_put_bit(hdlc_rx_state_t *s, int new_bit);
/*! \brief Put a byte of data to an HDLC receiver. /*! \brief Put a byte of data to an HDLC receiver.
\param s A pointer to an HDLC receiver context. \param s A pointer to an HDLC receiver context.
\param new_byte The byte of data. \param new_byte The byte of data.
*/ */
SPAN_DECLARE_NONSTD(void) hdlc_rx_put_byte(hdlc_rx_state_t *s, int new_byte); SPAN_DECLARE(void) hdlc_rx_put_byte(hdlc_rx_state_t *s, int new_byte);
/*! \brief Put a series of bytes of data to an HDLC receiver. /*! \brief Put a series of bytes of data to an HDLC receiver.
\param s A pointer to an HDLC receiver context. \param s A pointer to an HDLC receiver context.
\param buf The buffer of data. \param buf The buffer of data.
\param len The length of the data in the buffer. \param len The length of the data in the buffer.
*/ */
SPAN_DECLARE_NONSTD(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);
/*! Initialise an HDLC transmitter context. /*! Initialise an HDLC transmitter context.
\brief Initialise an HDLC transmitter context. \brief Initialise an HDLC transmitter context.
@ -250,13 +250,13 @@ SPAN_DECLARE(int) hdlc_tx_abort(hdlc_tx_state_t *s);
\param s A pointer to an HDLC transmitter context. \param s A pointer to an HDLC transmitter context.
\return The next bit for transmission. \return The next bit for transmission.
*/ */
SPAN_DECLARE_NONSTD(int) hdlc_tx_get_bit(hdlc_tx_state_t *s); SPAN_DECLARE(int) hdlc_tx_get_bit(hdlc_tx_state_t *s);
/*! \brief Get the next byte for transmission. /*! \brief Get the next byte for transmission.
\param s A pointer to an HDLC transmitter context. \param s A pointer to an HDLC transmitter context.
\return The next byte for transmission. \return The next byte for transmission.
*/ */
SPAN_DECLARE_NONSTD(int) hdlc_tx_get_byte(hdlc_tx_state_t *s); SPAN_DECLARE(int) hdlc_tx_get_byte(hdlc_tx_state_t *s);
/*! \brief Get the next sequence of bytes for transmission. /*! \brief Get the next sequence of bytes for transmission.
\param s A pointer to an HDLC transmitter context. \param s A pointer to an HDLC transmitter context.
@ -264,7 +264,7 @@ SPAN_DECLARE_NONSTD(int) hdlc_tx_get_byte(hdlc_tx_state_t *s);
\param max_len The number of bytes to get. \param max_len The number of bytes to get.
\return The number of bytes actually got. \return The number of bytes actually got.
*/ */
SPAN_DECLARE_NONSTD(int) hdlc_tx_get(hdlc_tx_state_t *s, uint8_t buf[], size_t max_len); SPAN_DECLARE(int) hdlc_tx_get(hdlc_tx_state_t *s, uint8_t buf[], size_t max_len);
#if defined(__cplusplus) #if defined(__cplusplus)
} }

View File

@ -127,9 +127,9 @@ SPAN_DECLARE(int) modem_connect_tones_tx_free(modem_connect_tones_tx_state_t *s)
\param len The number of samples to generate. \param len The number of samples to generate.
\return The number of samples generated. \return The number of samples generated.
*/ */
SPAN_DECLARE_NONSTD(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[], int16_t amp[],
int len); int len);
/*! \brief Process a block of samples through an instance of the modem connect /*! \brief Process a block of samples through an instance of the modem connect
tones detector. tones detector.
@ -138,9 +138,9 @@ SPAN_DECLARE_NONSTD(int) modem_connect_tones_tx(modem_connect_tones_tx_state_t *
\param len The number of samples in the array. \param len The number of samples in the array.
\return The number of unprocessed samples. \return The number of unprocessed samples.
*/ */
SPAN_DECLARE_NONSTD(int) modem_connect_tones_rx(modem_connect_tones_rx_state_t *s, SPAN_DECLARE(int) modem_connect_tones_rx(modem_connect_tones_rx_state_t *s,
const int16_t amp[], const int16_t amp[],
int len); int len);
/*! Fake processing of a missing block of received modem connect tone samples /*! Fake processing of a missing block of received modem connect tone samples
(e.g due to packet loss). (e.g due to packet loss).
@ -149,7 +149,7 @@ SPAN_DECLARE_NONSTD(int) modem_connect_tones_rx(modem_connect_tones_rx_state_t *
\param len The number of samples to fake. \param len The number of samples to fake.
\return The number of samples unprocessed. \return The number of samples unprocessed.
*/ */
SPAN_DECLARE_NONSTD(int) modem_connect_tones_rx_fillin(modem_connect_tones_rx_state_t *s, int len); SPAN_DECLARE(int) modem_connect_tones_rx_fillin(modem_connect_tones_rx_state_t *s, int len);
/*! \brief Test if a modem_connect tone has been detected. /*! \brief Test if a modem_connect tone has been detected.
\param s The context. \param s The context.

View File

@ -41,7 +41,7 @@ extern "C"
\return The number of samples actually generated. This will be zero when \return The number of samples actually generated. This will be zero when
there is nothing to send. there is nothing to send.
*/ */
SPAN_DECLARE_NONSTD(int) silence_gen(silence_gen_state_t *s, int16_t *amp, int max_len); SPAN_DECLARE(int) silence_gen(silence_gen_state_t *s, int16_t *amp, int max_len);
/*! Set a silence generator context to output continuous silence. /*! Set a silence generator context to output continuous silence.
\brief Set a silence generator context to output continuous silence. \brief Set a silence generator context to output continuous silence.
@ -110,7 +110,7 @@ SPAN_DECLARE(int) silence_gen_free(silence_gen_state_t *s);
\param len The length of the signal buffer \param len The length of the signal buffer
\return 0. \return 0.
*/ */
SPAN_DECLARE_NONSTD(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 /*! 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 really trying to process the signal. It just returns without affecting
@ -131,7 +131,7 @@ SPAN_DECLARE(int) span_dummy_mod(void *user_data, int16_t amp[], int len);
\param len The length of the signal buffer \param len The length of the signal buffer
\return 0. \return 0.
*/ */
SPAN_DECLARE_NONSTD(int) span_dummy_rx_fillin(void *user_data, int len); SPAN_DECLARE(int) span_dummy_rx_fillin(void *user_data, int len);
#if defined(__cplusplus) #if defined(__cplusplus)
} }

View File

@ -32,14 +32,16 @@
#if !defined(_STDBOOL_H) #if !defined(_STDBOOL_H)
#define _STDBOOL_H #define _STDBOOL_H
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning (disable: 4005) #pragma warning (disable: 4005)
#endif #endif
#if !defined(__cplusplus) #if !defined(__cplusplus)
#define _Bool int #define _Bool int
#define false 0
#define bool int #define bool int
#define false 0
#define true (!false) #define true (!false)
#else #else

View File

@ -576,7 +576,7 @@ SPAN_DECLARE(void) t30_front_end_status(void *user_data, int status);
\brief Get a bit of received non-ECM image data. \brief Get a bit of received non-ECM image data.
\param user_data An opaque pointer, which must point to the T.30 context. \param user_data An opaque pointer, which must point to the T.30 context.
\return The next bit to transmit. */ \return The next bit to transmit. */
SPAN_DECLARE_NONSTD(int) t30_non_ecm_get_bit(void *user_data); SPAN_DECLARE(int) t30_non_ecm_get_bit(void *user_data);
/*! Get a chunk of received non-ECM image data. /*! Get a chunk of received non-ECM image data.
\brief Get a bit of received non-ECM image data. \brief Get a bit of received non-ECM image data.
@ -590,7 +590,7 @@ SPAN_DECLARE(int) t30_non_ecm_get(void *user_data, uint8_t buf[], int max_len);
\brief Process a bit of received non-ECM image data \brief Process a bit of received non-ECM image data
\param user_data An opaque pointer, which must point to the T.30 context. \param user_data An opaque pointer, which must point to the T.30 context.
\param bit The received bit. */ \param bit The received bit. */
SPAN_DECLARE_NONSTD(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 chunk of received non-ECM image data. /*! Process a chunk of received non-ECM image data.
\brief Process a chunk of received non-ECM image data \brief Process a chunk of received non-ECM image data
@ -605,7 +605,7 @@ SPAN_DECLARE(void) t30_non_ecm_put(void *user_data, const uint8_t buf[], int len
\param msg The HDLC message. \param msg The HDLC message.
\param len The length of the message, in octets. \param len The length of the message, in octets.
\param ok True if the frame was received without error. */ \param ok True if the frame was received without error. */
SPAN_DECLARE_NONSTD(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. /*! Report the passage of time to the T.30 engine.
\brief Report the passage of time to the T.30 engine. \brief Report the passage of time to the T.30 engine.

View File

@ -65,7 +65,7 @@ SPAN_DECLARE(int) t31_at_rx(t31_state_t *s, const char *t, int len);
\param amp The audio sample buffer. \param amp The audio sample buffer.
\param len The number of samples in the buffer. \param len The number of samples in the buffer.
\return The number of samples unprocessed. */ \return The number of samples unprocessed. */
SPAN_DECLARE_NONSTD(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);
/*! Fake processing of a missing block of received T.31 modem audio samples /*! Fake processing of a missing block of received T.31 modem audio samples
(e.g due to packet loss). (e.g due to packet loss).
@ -73,7 +73,7 @@ SPAN_DECLARE_NONSTD(int) t31_rx(t31_state_t *s, int16_t amp[], int len);
\param s The T.31 modem context. \param s The T.31 modem context.
\param len The number of samples to fake. \param len The number of samples to fake.
\return The number of samples unprocessed. */ \return The number of samples unprocessed. */
SPAN_DECLARE_NONSTD(int) t31_rx_fillin(t31_state_t *s, int len); SPAN_DECLARE(int) t31_rx_fillin(t31_state_t *s, int len);
/*! Generate a block of T.31 modem audio samples. /*! Generate a block of T.31 modem audio samples.
\brief Generate a block of T.31 modem audio samples. \brief Generate a block of T.31 modem audio samples.
@ -82,7 +82,7 @@ SPAN_DECLARE_NONSTD(int) t31_rx_fillin(t31_state_t *s, int len);
\param max_len The number of samples to be generated. \param max_len The number of samples to be generated.
\return The number of samples actually generated. \return The number of samples actually generated.
*/ */
SPAN_DECLARE_NONSTD(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);
SPAN_DECLARE(int) t31_t38_send_timeout(t31_state_t *s, int samples); SPAN_DECLARE(int) t31_t38_send_timeout(t31_state_t *s, int samples);

View File

@ -288,7 +288,7 @@ SPAN_DECLARE(int) t38_core_send_data_multi_field(t38_core_state_t *s, int data_t
\param len The length of the packet contents. \param len The length of the packet contents.
\param seq_no The packet sequence number. \param seq_no The packet sequence number.
\return 0 for OK, else -1. */ \return 0 for OK, else -1. */
SPAN_DECLARE_NONSTD(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);
/*! \brief Process a received T.38 IFP packet from a reliable stream (e.g. TCP). /*! \brief Process a received T.38 IFP packet from a reliable stream (e.g. TCP).
\param s The T.38 context. \param s The T.38 context.
@ -296,7 +296,7 @@ SPAN_DECLARE_NONSTD(int) t38_core_rx_ifp_packet(t38_core_state_t *s, const uint8
\param len The length of the packet contents. \param len The length of the packet contents.
\param seq_no The packet sequence number, used for logging purposes. \param seq_no The packet sequence number, used for logging purposes.
\return The length of the packet processed, or -1 if there is an error in the packet, or too few bytes of data to complete it. */ \return The length of the packet processed, or -1 if there is an error in the packet, or too few bytes of data to complete it. */
SPAN_DECLARE_NONSTD(int) t38_core_rx_ifp_stream(t38_core_state_t *s, const uint8_t *buf, int len, uint16_t log_seq_no); SPAN_DECLARE(int) t38_core_rx_ifp_stream(t38_core_state_t *s, const uint8_t *buf, int len, uint16_t log_seq_no);
/*! Set the method to be used for data rate management, as per the T.38 spec. /*! Set the method to be used for data rate management, as per the T.38 spec.
\param s The T.38 context. \param s The T.38 context.

View File

@ -102,7 +102,7 @@ SPAN_DECLARE(int) t38_gateway_free(t38_gateway_state_t *s);
\param amp The audio sample buffer. \param amp The audio sample buffer.
\param len The number of samples in the buffer. \param len The number of samples in the buffer.
\return The number of samples unprocessed. */ \return The number of samples unprocessed. */
SPAN_DECLARE_NONSTD(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);
/*! Apply fake processing when a block of audio samples is missing (e.g due /*! Apply fake processing when a block of audio samples is missing (e.g due
to packet loss). to packet loss).
@ -112,7 +112,7 @@ SPAN_DECLARE_NONSTD(int) t38_gateway_rx(t38_gateway_state_t *s, int16_t amp[], i
\return The number of samples unprocessed. This should only be non-zero if \return The number of samples unprocessed. This should only be non-zero if
the software has reached the end of the FAX call. the software has reached the end of the FAX call.
*/ */
SPAN_DECLARE_NONSTD(int) t38_gateway_rx_fillin(t38_gateway_state_t *s, int len); SPAN_DECLARE(int) t38_gateway_rx_fillin(t38_gateway_state_t *s, int len);
/*! Generate a block of FAX audio samples. /*! Generate a block of FAX audio samples.
\brief Generate a block of FAX audio samples. \brief Generate a block of FAX audio samples.
@ -121,7 +121,7 @@ SPAN_DECLARE_NONSTD(int) t38_gateway_rx_fillin(t38_gateway_state_t *s, int len);
\param max_len The number of samples to be generated. \param max_len The number of samples to be generated.
\return The number of samples actually generated. \return The number of samples actually generated.
*/ */
SPAN_DECLARE_NONSTD(int) t38_gateway_tx(t38_gateway_state_t *s, int16_t amp[], int max_len); SPAN_DECLARE(int) t38_gateway_tx(t38_gateway_state_t *s, int16_t amp[], int max_len);
/*! Control whether error correcting mode (ECM) is allowed. /*! Control whether error correcting mode (ECM) is allowed.
\brief Control whether error correcting mode (ECM) is allowed. \brief Control whether error correcting mode (ECM) is allowed.

View File

@ -124,7 +124,7 @@ SPAN_DECLARE(void) t38_non_ecm_buffer_report_output_status(t38_non_ecm_buffer_st
/*! \brief Get the next bit of data from a T.38 rate adapting non-ECM buffer context. /*! \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. \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. */ \return The next bit, or one of the values indicating a change of modem status. */
SPAN_DECLARE_NONSTD(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) #if defined(__cplusplus)
} }

View File

@ -28,21 +28,17 @@
#if defined(_M_IX86) || defined(_M_X64) #if defined(_M_IX86) || defined(_M_X64)
#if defined(LIBSPANDSP_EXPORTS) #if defined(LIBSPANDSP_EXPORTS)
#define SPAN_DECLARE(type) __declspec(dllexport) type __stdcall #define SPAN_DECLARE(type) __declspec(dllexport) type
#define SPAN_DECLARE_NONSTD(type) __declspec(dllexport) type __cdecl
#define SPAN_DECLARE_DATA __declspec(dllexport) #define SPAN_DECLARE_DATA __declspec(dllexport)
#else #else
#define SPAN_DECLARE(type) __declspec(dllimport) type __stdcall #define SPAN_DECLARE(type) __declspec(dllimport) type
#define SPAN_DECLARE_NONSTD(type) __declspec(dllimport) type __cdecl
#define SPAN_DECLARE_DATA __declspec(dllimport) #define SPAN_DECLARE_DATA __declspec(dllimport)
#endif #endif
#elif defined(SPANDSP_USE_EXPORT_CAPABILITY) && (defined(__GNUC__) || defined(__SUNCC__)) #elif defined(SPANDSP_USE_EXPORT_CAPABILITY) && (defined(__GNUC__) || defined(__SUNCC__))
#define SPAN_DECLARE(type) __attribute__((visibility("default"))) type #define SPAN_DECLARE(type) __attribute__((visibility("default"))) type
#define SPAN_DECLARE_NONSTD(type) __attribute__((visibility("default"))) type
#define SPAN_DECLARE_DATA __attribute__((visibility("default"))) #define SPAN_DECLARE_DATA __attribute__((visibility("default")))
#else #else
#define SPAN_DECLARE(type) /**/ type #define SPAN_DECLARE(type) /**/ type
#define SPAN_DECLARE_NONSTD(type) /**/ type
#define SPAN_DECLARE_DATA /**/ #define SPAN_DECLARE_DATA /**/
#endif #endif

View File

@ -88,7 +88,7 @@ SPAN_DECLARE(tone_gen_descriptor_t *) tone_gen_descriptor_init(tone_gen_descript
SPAN_DECLARE(void) tone_gen_descriptor_free(tone_gen_descriptor_t *s); SPAN_DECLARE(void) tone_gen_descriptor_free(tone_gen_descriptor_t *s);
SPAN_DECLARE_NONSTD(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);
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);

View File

@ -284,7 +284,7 @@ SPAN_DECLARE(void) v17_rx_set_modem_status_handler(v17_rx_state_t *s, modem_stat
\param len The number of samples in the buffer. \param len The number of samples in the buffer.
\return The number of samples unprocessed. \return The number of samples unprocessed.
*/ */
SPAN_DECLARE_NONSTD(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);
/*! Fake processing of a missing block of received V.17 modem audio samples. /*! Fake processing of a missing block of received V.17 modem audio samples.
(e.g due to packet loss). (e.g due to packet loss).
@ -293,7 +293,7 @@ SPAN_DECLARE_NONSTD(int) v17_rx(v17_rx_state_t *s, const int16_t amp[], int len)
\param len The number of samples to fake. \param len The number of samples to fake.
\return The number of samples unprocessed. \return The number of samples unprocessed.
*/ */
SPAN_DECLARE_NONSTD(int) v17_rx_fillin(v17_rx_state_t *s, int len); SPAN_DECLARE(int) v17_rx_fillin(v17_rx_state_t *s, int len);
/*! Get a snapshot of the current equalizer coefficients. /*! Get a snapshot of the current equalizer coefficients.
\brief Get a snapshot of the current equalizer coefficients. \brief Get a snapshot of the current equalizer coefficients.

View File

@ -155,7 +155,7 @@ SPAN_DECLARE(void) v17_tx_set_modem_status_handler(v17_tx_state_t *s, modem_stat
\param len The number of samples to be generated. \param len The number of samples to be generated.
\return The number of samples actually generated. \return The number of samples actually generated.
*/ */
SPAN_DECLARE_NONSTD(int) v17_tx(v17_tx_state_t *s, int16_t amp[], int len); SPAN_DECLARE(int) v17_tx(v17_tx_state_t *s, int16_t amp[], int len);
#if defined(__cplusplus) #if defined(__cplusplus)
} }

View File

@ -143,7 +143,7 @@ SPAN_DECLARE(int) v18_free(v18_state_t *s);
\param max_len The number of samples to be generated. \param max_len The number of samples to be generated.
\return The number of samples actually generated. \return The number of samples actually generated.
*/ */
SPAN_DECLARE_NONSTD(int) v18_tx(v18_state_t *s, int16_t amp[], int max_len); SPAN_DECLARE(int) v18_tx(v18_state_t *s, int16_t amp[], int max_len);
/*! Process a block of received V.18 audio samples. /*! Process a block of received V.18 audio samples.
\brief Process a block of received V.18 audio samples. \brief Process a block of received V.18 audio samples.
@ -152,7 +152,7 @@ SPAN_DECLARE_NONSTD(int) v18_tx(v18_state_t *s, int16_t amp[], int max_len);
\param len The number of samples in the buffer. \param len The number of samples in the buffer.
\return The number of unprocessed samples. \return The number of unprocessed samples.
*/ */
SPAN_DECLARE_NONSTD(int) v18_rx(v18_state_t *s, const int16_t amp[], int len); SPAN_DECLARE(int) v18_rx(v18_state_t *s, const int16_t amp[], int len);
/*! Fake processing of a missing block of received V.18 audio samples. /*! Fake processing of a missing block of received V.18 audio samples.
(e.g due to packet loss). (e.g due to packet loss).
@ -161,7 +161,7 @@ SPAN_DECLARE_NONSTD(int) v18_rx(v18_state_t *s, const int16_t amp[], int len);
\param len The number of samples to fake. \param len The number of samples to fake.
\return The number of unprocessed samples. \return The number of unprocessed samples.
*/ */
SPAN_DECLARE_NONSTD(int) v18_rx_fillin(v18_state_t *s, int len); SPAN_DECLARE(int) v18_rx_fillin(v18_state_t *s, int len);
/*! \brief Put a string to a V.18 context's input buffer. /*! \brief Put a string to a V.18 context's input buffer.
\param s The V.18 context. \param s The V.18 context.

View File

@ -78,7 +78,7 @@ extern "C"
\param amp The audio sample buffer. \param amp The audio sample buffer.
\param len The number of samples in the buffer. \param len The number of samples in the buffer.
\return The number of samples unprocessed. */ \return The number of samples unprocessed. */
SPAN_DECLARE_NONSTD(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);
/*! Fake processing of a missing block of received V.22bis modem audio samples. /*! Fake processing of a missing block of received V.22bis modem audio samples.
(e.g due to packet loss). (e.g due to packet loss).
@ -86,7 +86,7 @@ SPAN_DECLARE_NONSTD(int) v22bis_rx(v22bis_state_t *s, const int16_t amp[], int l
\param s The modem context. \param s The modem context.
\param len The number of samples to fake. \param len The number of samples to fake.
\return The number of samples unprocessed. */ \return The number of samples unprocessed. */
SPAN_DECLARE_NONSTD(int) v22bis_rx_fillin(v22bis_state_t *s, int len); SPAN_DECLARE(int) v22bis_rx_fillin(v22bis_state_t *s, int len);
/*! Get a snapshot of the current equalizer coefficients. /*! Get a snapshot of the current equalizer coefficients.
\brief Get a snapshot of the current equalizer coefficients. \brief Get a snapshot of the current equalizer coefficients.
@ -130,7 +130,7 @@ SPAN_DECLARE(void) v22bis_rx_set_qam_report_handler(v22bis_state_t *s, qam_repor
\param amp The audio sample buffer. \param amp The audio sample buffer.
\param len The number of samples to be generated. \param len The number of samples to be generated.
\return The number of samples actually generated. */ \return The number of samples actually generated. */
SPAN_DECLARE_NONSTD(int) v22bis_tx(v22bis_state_t *s, int16_t amp[], int len); SPAN_DECLARE(int) v22bis_tx(v22bis_state_t *s, int16_t amp[], int len);
/*! Adjust a V.22bis modem transmit context's power output. /*! Adjust a V.22bis modem transmit context's power output.
\brief Adjust a V.22bis modem transmit context's output power. \brief Adjust a V.22bis modem transmit context's output power.

View File

@ -117,7 +117,7 @@ SPAN_DECLARE(void) v27ter_rx_set_modem_status_handler(v27ter_rx_state_t *s, mode
\param len The number of samples in the buffer. \param len The number of samples in the buffer.
\return The number of samples unprocessed. \return The number of samples unprocessed.
*/ */
SPAN_DECLARE_NONSTD(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);
/*! Fake processing of a missing block of received V.27ter modem audio samples. /*! Fake processing of a missing block of received V.27ter modem audio samples.
(e.g due to packet loss). (e.g due to packet loss).
@ -126,7 +126,7 @@ SPAN_DECLARE_NONSTD(int) v27ter_rx(v27ter_rx_state_t *s, const int16_t amp[], in
\param len The number of samples to fake. \param len The number of samples to fake.
\return The number of samples unprocessed. \return The number of samples unprocessed.
*/ */
SPAN_DECLARE_NONSTD(int) v27ter_rx_fillin(v27ter_rx_state_t *s, int len); SPAN_DECLARE(int) v27ter_rx_fillin(v27ter_rx_state_t *s, int len);
/*! Get a snapshot of the current equalizer coefficients. /*! Get a snapshot of the current equalizer coefficients.
\brief Get a snapshot of the current equalizer coefficients. \brief Get a snapshot of the current equalizer coefficients.

View File

@ -136,7 +136,7 @@ SPAN_DECLARE(void) v27ter_tx_set_modem_status_handler(v27ter_tx_state_t *s, mode
\param len The number of samples to be generated. \param len The number of samples to be generated.
\return The number of samples actually generated. \return The number of samples actually generated.
*/ */
SPAN_DECLARE_NONSTD(int) v27ter_tx(v27ter_tx_state_t *s, int16_t amp[], int len); SPAN_DECLARE(int) v27ter_tx(v27ter_tx_state_t *s, int16_t amp[], int len);
#if defined(__cplusplus) #if defined(__cplusplus)
} }

View File

@ -196,7 +196,7 @@ SPAN_DECLARE(void) v29_rx_set_modem_status_handler(v29_rx_state_t *s, modem_stat
\param amp The audio sample buffer. \param amp The audio sample buffer.
\param len The number of samples in the buffer. \param len The number of samples in the buffer.
\return The number of samples unprocessed. */ \return The number of samples unprocessed. */
SPAN_DECLARE_NONSTD(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);
/*! Fake processing of a missing block of received V.29 modem audio samples. /*! Fake processing of a missing block of received V.29 modem audio samples.
(e.g due to packet loss). (e.g due to packet loss).
@ -204,7 +204,7 @@ SPAN_DECLARE_NONSTD(int) v29_rx(v29_rx_state_t *s, const int16_t amp[], int len)
\param s The modem context. \param s The modem context.
\param len The number of samples to fake. \param len The number of samples to fake.
\return The number of samples unprocessed. */ \return The number of samples unprocessed. */
SPAN_DECLARE_NONSTD(int) v29_rx_fillin(v29_rx_state_t *s, int len); SPAN_DECLARE(int) v29_rx_fillin(v29_rx_state_t *s, int len);
/*! Get a snapshot of the current equalizer coefficients. /*! Get a snapshot of the current equalizer coefficients.
\brief Get a snapshot of the current equalizer coefficients. \brief Get a snapshot of the current equalizer coefficients.

View File

@ -167,7 +167,7 @@ SPAN_DECLARE(void) v29_tx_set_modem_status_handler(v29_tx_state_t *s, modem_stat
\param len The number of samples to be generated. \param len The number of samples to be generated.
\return The number of samples actually generated. \return The number of samples actually generated.
*/ */
SPAN_DECLARE_NONSTD(int) v29_tx(v29_tx_state_t *s, int16_t amp[], int len); SPAN_DECLARE(int) v29_tx(v29_tx_state_t *s, int16_t amp[], int len);
#if defined(__cplusplus) #if defined(__cplusplus)
} }

View File

@ -45,7 +45,7 @@ extern "C"
SPAN_DECLARE(const char *) lapm_status_to_str(int status); SPAN_DECLARE(const char *) lapm_status_to_str(int status);
SPAN_DECLARE_NONSTD(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);
SPAN_DECLARE(void) v42_start(v42_state_t *s); SPAN_DECLARE(void) v42_start(v42_state_t *s);

View File

@ -173,7 +173,7 @@ SPAN_DECLARE(logging_state_t *) v8_get_logging_state(v8_state_t *s);
\param max_len The number of samples to be generated. \param max_len The number of samples to be generated.
\return The number of samples actually generated. \return The number of samples actually generated.
*/ */
SPAN_DECLARE_NONSTD(int) v8_tx(v8_state_t *s, int16_t *amp, int max_len); SPAN_DECLARE(int) v8_tx(v8_state_t *s, int16_t *amp, int max_len);
/*! Process a block of received V.8 audio samples. /*! Process a block of received V.8 audio samples.
\brief Process a block of received V.8 audio samples. \brief Process a block of received V.8 audio samples.
@ -181,7 +181,7 @@ SPAN_DECLARE_NONSTD(int) v8_tx(v8_state_t *s, int16_t *amp, int max_len);
\param amp The audio sample buffer. \param amp The audio sample buffer.
\param len The number of samples in the buffer. \param len The number of samples in the buffer.
*/ */
SPAN_DECLARE_NONSTD(int) v8_rx(v8_state_t *s, const int16_t *amp, int len); SPAN_DECLARE(int) v8_rx(v8_state_t *s, const int16_t *amp, int len);
/*! Log the list of supported modulations. /*! Log the list of supported modulations.
\brief Log the list of supported modulations. \brief Log the list of supported modulations.

View File

@ -6401,7 +6401,7 @@ static void t30_non_ecm_rx_status(void *user_data, int status)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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; t30_state_t *s;
int res; int res;
@ -6499,7 +6499,7 @@ SPAN_DECLARE(void) t30_non_ecm_put(void *user_data, const uint8_t buf[], int len
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) t30_non_ecm_get_bit(void *user_data) SPAN_DECLARE(int) t30_non_ecm_get_bit(void *user_data)
{ {
int bit; int bit;
t30_state_t *s; t30_state_t *s;
@ -6705,7 +6705,7 @@ static void t30_hdlc_rx_status(void *user_data, int status)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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; t30_state_t *s;

View File

@ -2772,7 +2772,7 @@ static int initial_timed_rx(void *user_data, const int16_t amp[], int len)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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; int i;
int32_t power; int32_t power;
@ -2822,7 +2822,7 @@ SPAN_DECLARE_NONSTD(int) t31_rx(t31_state_t *s, int16_t amp[], int len)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) t31_rx_fillin(t31_state_t *s, int len) SPAN_DECLARE(int) t31_rx_fillin(t31_state_t *s, int len)
{ {
/* To mitigate the effect of lost packets on a packet network we should /* To mitigate the effect of lost packets on a packet network we should
try to sustain the status quo. If there is no receive modem running, keep try to sustain the status quo. If there is no receive modem running, keep
@ -2848,7 +2848,7 @@ SPAN_DECLARE_NONSTD(int) t31_rx_fillin(t31_state_t *s, int len)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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; int len;

View File

@ -347,7 +347,7 @@ static __inline__ int classify_seq_no_offset(int expected, int actual)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) t38_core_rx_ifp_stream(t38_core_state_t *s, const uint8_t *buf, int len, uint16_t log_seq_no) SPAN_DECLARE(int) t38_core_rx_ifp_stream(t38_core_state_t *s, const uint8_t *buf, int len, uint16_t log_seq_no)
{ {
int i; int i;
int t30_indicator; int t30_indicator;
@ -668,7 +668,7 @@ SPAN_DECLARE_NONSTD(int) t38_core_rx_ifp_stream(t38_core_state_t *s, const uint8
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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 log_seq_no; int log_seq_no;
int ptr; int ptr;

View File

@ -2134,7 +2134,7 @@ static void update_rx_timing(t38_gateway_state_t *s, int len)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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; int i;
@ -2153,7 +2153,7 @@ SPAN_DECLARE_NONSTD(int) t38_gateway_rx(t38_gateway_state_t *s, int16_t amp[], i
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) t38_gateway_rx_fillin(t38_gateway_state_t *s, int len) SPAN_DECLARE(int) t38_gateway_rx_fillin(t38_gateway_state_t *s, int len)
{ {
/* To mitigate the effect of lost packets on a packet network we should /* To mitigate the effect of lost packets on a packet network we should
try to sustain the status quo. If there is no receive modem running, keep try to sustain the status quo. If there is no receive modem running, keep
@ -2181,7 +2181,7 @@ SPAN_DECLARE_NONSTD(int) t38_gateway_rx_fillin(t38_gateway_state_t *s, int len)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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; int len;
#if defined(LOG_FAX_AUDIO) #if defined(LOG_FAX_AUDIO)

View File

@ -85,7 +85,7 @@ static void restart_buffer(t38_non_ecm_buffer_state_t *s)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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; t38_non_ecm_buffer_state_t *s;
int bit; int bit;

View File

@ -119,7 +119,7 @@ SPAN_DECLARE(void) tone_gen_descriptor_free(tone_gen_descriptor_t *s)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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 samples;
int limit; int limit;

View File

@ -1229,7 +1229,7 @@ static __inline__ int signal_detect(v17_rx_state_t *s, int16_t amp)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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 i;
int step; int step;
@ -1341,7 +1341,7 @@ SPAN_DECLARE_NONSTD(int) v17_rx(v17_rx_state_t *s, const int16_t amp[], int len)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) v17_rx_fillin(v17_rx_state_t *s, int len) SPAN_DECLARE(int) v17_rx_fillin(v17_rx_state_t *s, int len)
{ {
int i; int i;

View File

@ -296,7 +296,7 @@ static __inline__ complexf_t getbaud(v17_tx_state_t *s)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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) #if defined(SPANDSP_USE_FIXED_POINT)
complexi16_t v; complexi16_t v;

View File

@ -978,7 +978,7 @@ static void v18_textphone_put_async_byte(void *user_data, int byte)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) v18_tx(v18_state_t *s, int16_t *amp, int max_len) SPAN_DECLARE(int) v18_tx(v18_state_t *s, int16_t *amp, int max_len)
{ {
int len; int len;
int lenx; int lenx;
@ -1006,7 +1006,7 @@ SPAN_DECLARE_NONSTD(int) v18_tx(v18_state_t *s, int16_t *amp, int max_len)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) v18_rx(v18_state_t *s, const int16_t amp[], int len) SPAN_DECLARE(int) v18_rx(v18_state_t *s, const int16_t amp[], int len)
{ {
if (s->rx_suppression > 0) if (s->rx_suppression > 0)
{ {
@ -1037,7 +1037,7 @@ SPAN_DECLARE_NONSTD(int) v18_rx(v18_state_t *s, const int16_t amp[], int len)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) v18_rx_fillin(v18_state_t *s, int len) SPAN_DECLARE(int) v18_rx_fillin(v18_state_t *s, int len)
{ {
if (s->rx_suppression > 0) if (s->rx_suppression > 0)
{ {

View File

@ -776,7 +776,7 @@ static __inline__ void process_half_baud(v22bis_state_t *s, const complexf_t *sa
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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 i;
int step; int step;
@ -919,7 +919,7 @@ SPAN_DECLARE_NONSTD(int) v22bis_rx(v22bis_state_t *s, const int16_t amp[], int l
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) v22bis_rx_fillin(v22bis_state_t *s, int len) SPAN_DECLARE(int) v22bis_rx_fillin(v22bis_state_t *s, int len)
{ {
int i; int i;

View File

@ -469,7 +469,7 @@ static complexf_t getbaud(v22bis_state_t *s)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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)
{ {
#if defined(SPANDSP_USE_FIXED_POINT) #if defined(SPANDSP_USE_FIXED_POINT)
complexi16_t v; complexi16_t v;

View File

@ -828,7 +828,7 @@ static __inline__ int signal_detect(v27ter_rx_state_t *s, int16_t amp)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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 i;
int step; int step;
@ -978,7 +978,7 @@ SPAN_DECLARE_NONSTD(int) v27ter_rx(v27ter_rx_state_t *s, const int16_t amp[], in
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) v27ter_rx_fillin(v27ter_rx_state_t *s, int len) SPAN_DECLARE(int) v27ter_rx_fillin(v27ter_rx_state_t *s, int len)
{ {
int i; int i;

View File

@ -241,7 +241,7 @@ static complexf_t getbaud(v27ter_tx_state_t *s)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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) #if defined(SPANDSP_USE_FIXED_POINT)
complexi16_t v; complexi16_t v;

View File

@ -910,7 +910,7 @@ static __inline__ int signal_detect(v29_rx_state_t *s, int16_t amp)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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 i;
int step; int step;
@ -1026,7 +1026,7 @@ SPAN_DECLARE_NONSTD(int) v29_rx(v29_rx_state_t *s, const int16_t amp[], int len)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(int) v29_rx_fillin(v29_rx_state_t *s, int len) SPAN_DECLARE(int) v29_rx_fillin(v29_rx_state_t *s, int len)
{ {
int i; int i;

View File

@ -212,7 +212,7 @@ static __inline__ complexf_t getbaud(v29_tx_state_t *s)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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) #if defined(SPANDSP_USE_FIXED_POINT)
complexi16_t v; complexi16_t v;

View File

@ -1065,7 +1065,7 @@ static void lapm_hdlc_underflow(void *user_data)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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_state_t *s;
v42_state_t *ss; v42_state_t *ss;

View File

@ -734,7 +734,7 @@ static void send_cm_jm(v8_state_t *s)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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; int len;
@ -852,7 +852,7 @@ static void handle_modem_connect_tone(v8_state_t *s, int tone)
} }
/*- End of function --------------------------------------------------------*/ /*- End of function --------------------------------------------------------*/
SPAN_DECLARE_NONSTD(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 residual_samples; int residual_samples;
int tone; int tone;

View File

@ -225,7 +225,7 @@ echo_tests_LDADD = -L$(top_builddir)/spandsp-sim -lspandsp-sim $(LIBDIR) -lspand
fax_decode_SOURCES = fax_decode.c fax_decode_SOURCES = fax_decode.c
fax_decode_LDADD = $(LIBDIR) -lspandsp fax_decode_LDADD = $(LIBDIR) -lspandsp
fax_tests_SOURCES = fax_tests.c fax_utils.c media_monitor.cpp fax_tests_SOURCES = fax_tests.c fax_utils.c media_monitor.cpp fax_tester.c
fax_tests_LDADD = -L$(top_builddir)/spandsp-sim -lspandsp-sim $(LIBDIR) -lspandsp fax_tests_LDADD = -L$(top_builddir)/spandsp-sim -lspandsp-sim $(LIBDIR) -lspandsp
fsk_tests_SOURCES = fsk_tests.c fsk_tests_SOURCES = fsk_tests.c

File diff suppressed because it is too large Load Diff

View File

@ -39,23 +39,6 @@ typedef struct faxtester_state_s faxtester_state_t;
typedef void (*faxtester_flush_handler_t)(faxtester_state_t *s, void *user_data, int which); typedef void (*faxtester_flush_handler_t)(faxtester_state_t *s, void *user_data, int which);
/*!
FAX tester real time frame handler.
\brief FAX tester real time frame handler.
\param s The FAX tester context.
\param user_data An opaque pointer.
\param direction True for incoming, false for outgoing.
\param msg The HDLC message.
\param len The length of the message.
*/
typedef void (*faxtester_real_time_frame_handler_t)(faxtester_state_t *s,
void *user_data,
int direction,
const uint8_t *msg,
int len);
typedef void (*faxtester_front_end_step_complete_handler_t)(faxtester_state_t *s, void *user_data);
/*! /*!
FAX tester descriptor. FAX tester descriptor.
*/ */
@ -63,9 +46,19 @@ struct faxtester_state_s
{ {
/*! \brief The far end FAX context */ /*! \brief The far end FAX context */
fax_state_t *far_fax; fax_state_t *far_fax;
t38_terminal_state_t *far_t38;
int far_tag;
/*! \brief The far end T.38 terminal context */ /*! \brief The far end T.38 terminal context */
t38_terminal_state_t *far_t38_fax; t38_terminal_state_t *far_t38_fax;
t30_state_t *far_t30;
t30_exchanged_info_t expected_rx_info;
bool use_receiver_not_ready;
bool test_local_interrupt;
/*! \brief Path for the FAX image test files. */ /*! \brief Path for the FAX image test files. */
char image_path[1024]; char image_path[1024];
@ -74,27 +67,23 @@ struct faxtester_state_s
xmlDocPtr doc; xmlDocPtr doc;
/*! \brief Pointer to our current step in the test. */ /*! \brief Pointer to our current step in the test. */
xmlNodePtr cur; xmlNodePtr cur;
int repeat_min;
int repeat_max;
int repeat_count;
xmlNodePtr repeat_start;
xmlNodePtr repeat_parent;
faxtester_flush_handler_t flush_handler; faxtester_flush_handler_t flush_handler;
void *flush_user_data; void *flush_user_data;
/*! \brief A pointer to a callback routine to be called when frames are
exchanged. */
faxtester_real_time_frame_handler_t real_time_frame_handler;
/*! \brief An opaque pointer supplied in real time frame callbacks. */
void *real_time_frame_user_data;
faxtester_front_end_step_complete_handler_t front_end_step_complete_handler;
void *front_end_step_complete_user_data;
faxtester_front_end_step_complete_handler_t front_end_step_timeout_handler;
void *front_end_step_timeout_user_data;
const uint8_t *image_buffer; const uint8_t *image_buffer;
int image_len; int image_len;
int image_ptr; int image_ptr;
int image_bit_ptr; int image_bit_ptr;
uint8_t image[1000000];
int ecm_frame_size; int ecm_frame_size;
int corrupt_crc; int corrupt_crc;
@ -194,26 +183,24 @@ void faxtester_set_transmit_on_idle(faxtester_state_t *s, int transmit_on_idle);
*/ */
void faxtester_set_tep_mode(faxtester_state_t *s, int use_tep); void faxtester_set_tep_mode(faxtester_state_t *s, int use_tep);
void faxtester_set_real_time_frame_handler(faxtester_state_t *s, faxtester_real_time_frame_handler_t handler, void *user_data);
void faxtester_set_front_end_step_complete_handler(faxtester_state_t *s, faxtester_front_end_step_complete_handler_t handler, void *user_data);
void faxtester_set_front_end_step_timeout_handler(faxtester_state_t *s, faxtester_front_end_step_complete_handler_t handler, void *user_data);
void faxtester_set_timeout(faxtester_state_t *s, int timeout); void faxtester_set_timeout(faxtester_state_t *s, int timeout);
void faxtester_set_non_ecm_image_buffer(faxtester_state_t *s, const uint8_t *buf, int len); SPAN_DECLARE(int) faxtester_next_step(faxtester_state_t *s);
void faxtester_set_ecm_image_buffer(faxtester_state_t *s, const uint8_t *buf, int len, int block, int frame_size, int crc_hit); /*! Get the logging context associated with a FAX tester context.
\brief Get the logging context associated with a FAX tester context.
/*! Initialise a FAX context.
\brief Initialise a FAX context.
\param s The FAX tester context. \param s The FAX tester context.
\param calling_party true if the context is for a calling party. FALSE if the \return A pointer to the logging context */
context is for an answering party. SPAN_DECLARE(logging_state_t *) faxtester_get_logging_state(faxtester_state_t *s);
/*! Initialise a FAX tester context.
\brief Initialise a FAX tester context.
\param s The FAX tester context.
\param test_file The name of the file of XML test scripts.
\param test The name of the XML script test.
\return A pointer to the FAX context, or NULL if there was a problem. \return A pointer to the FAX context, or NULL if there was a problem.
*/ */
faxtester_state_t *faxtester_init(faxtester_state_t *s, int calling_party); faxtester_state_t *faxtester_init(faxtester_state_t *s, const char *test_file, const char *test);
/*! Release a FAX context. /*! Release a FAX context.
\brief Release a FAX context. \brief Release a FAX context.

File diff suppressed because it is too large Load Diff

View File

@ -94,7 +94,7 @@ LOCALTESTS_DIR=../test-data/local
TIFFCMP=tiffcmp TIFFCMP=tiffcmp
# Colour/gray -> bilevel by not allowing ECM # Colour/gray -> bilevel by not allowing ECM
#for OPTS in "-p AA" "-p TT" "-p GG" "-p TG" "-p GT" #for OPTS in "-p FAX-FAX" "-p T38-T38" "-p FAX-T38gateway-T38gateway-FAX" "-p T38-T38gateway-FAX" "-p FAX-T38gateway-T38"
#do #do
# IN_FILE="${LOCALTESTS_DIR}/lenna-colour.tif" # IN_FILE="${LOCALTESTS_DIR}/lenna-colour.tif"
# OUT_FILE="${LOCALTESTS_DIR}/lenna-colour-bilevel.tif" # OUT_FILE="${LOCALTESTS_DIR}/lenna-colour-bilevel.tif"
@ -118,7 +118,7 @@ TIFFCMP=tiffcmp
#done #done
# Colour/gray -> colour/gray # Colour/gray -> colour/gray
#for OPTS in "-p AA -C -e" "-p TT -C -e" "-p GG -C -e" "-p TG -C -e" "-p GT -C -e" #for OPTS in "-p FAX-FAX -C -e" "-p T38-T38 -C -e" "-p FAX-T38gateway-T38gateway-FAX -C -e" "-p T38-T38gateway-FAX -C -e" "-p FAX-T38gateway-T38 -C -e"
#do #do
# IN_FILE="${LOCALTESTS_DIR}/lenna-colour.tif" # IN_FILE="${LOCALTESTS_DIR}/lenna-colour.tif"
# OUT_FILE="${LOCALTESTS_DIR}/lenna-colour-out.tif" # OUT_FILE="${LOCALTESTS_DIR}/lenna-colour-out.tif"
@ -142,7 +142,7 @@ TIFFCMP=tiffcmp
#done #done
# Bi-level tests with image squashing # Bi-level tests with image squashing
for OPTS in "-p AA" "-p AA -e" "-p TT" "-p TT -e" "-p GG" "-p GG -e" "-p TG" "-p TG -e" "-p GT" "-p GT -e" for OPTS in "-p FAX-FAX" "-p FAX-FAX -e" "-p T38-T38" "-p T38-T38 -e" "-p FAX-T38gateway-T38gateway-FAX" "-p FAX-T38gateway-T38gateway-FAX -e" "-p T38-T38gateway-FAX" "-p T38-T38gateway-FAX -e" "-p FAX-T38gateway-T38" "-p FAX-T38gateway-T38 -e"
do do
IN_FILE="${ITUTESTS_DIR}/bilevel_R8_77_A4.tif" IN_FILE="${ITUTESTS_DIR}/bilevel_R8_77_A4.tif"
OUT_FILE="${ITUTESTS_DIR}/bilevel_R8_77SQ_A4.tif" OUT_FILE="${ITUTESTS_DIR}/bilevel_R8_77SQ_A4.tif"
@ -241,7 +241,7 @@ do
done done
# Bi-level tests # Bi-level tests
for OPTS in "-p AA" "-p AA -e" "-p TT" "-p TT -e" "-p GG" "-p GG -e" "-p TG" "-p TG -e" "-p GT" "-p GT -e" for OPTS in "-p FAX-FAX" "-p FAX-FAX -e" "-p T38-T38" "-p T38-T38 -e" "-p FAX-T38gateway-T38gateway-FAX" "-p FAX-T38gateway-T38gateway-FAX -e" "-p T38-T38gateway-FAX" "-p T38-T38gateway-FAX -e" "-p FAX-T38gateway-T38" "-p FAX-T38gateway-T38 -e"
do do
FILE="${ITUTESTS_DIR}/itutests.tif" FILE="${ITUTESTS_DIR}/itutests.tif"
run_fax_test run_fax_test

View File

@ -113,7 +113,7 @@ typedef struct _null_hdr
typedef struct _ipv6_hdr typedef struct _ipv6_hdr
{ {
char dontcare[6]; char dontcare[6];
uint8_t nxt_header; /* we only need the next header, so we can determine, if the next header is UDP or not */ u_int8_t nxt_header; /* we only need the next header, so we can determine, if the next header is UDP or not */
char dontcare2[33]; char dontcare2[33];
} ipv6_hdr; } ipv6_hdr;
#endif #endif

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
alsa_nogsmlib_nocplusplus