* 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.67 2009/01/28 03:41:26 steveu Exp $
+ * $Id: adsi.c,v 1.68 2009/01/29 01:41:05 steveu Exp $
*/
/*! \file */
if (field_type != CLIP_DTMF_HASH_UNSPECIFIED)
msg[len++] = field_type;
memcpy(msg + len, field_body, field_len);
- msg[len + field_len] = x;
+ msg[len + field_len] = (uint8_t) x;
len += (field_len + 1);
}
break;
* 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.33 2009/01/28 03:41:26 steveu Exp $
+ * $Id: bell_r2_mf.c,v 1.34 2009/01/29 01:41:05 steveu Exp $
*/
/*! \file */
if (!initialised)
{
for (i = 0; i < 6; i++)
- make_goertzel_descriptor(&bell_mf_detect_desc[i], bell_mf_frequencies[i], BELL_MF_SAMPLES_PER_BLOCK);
+ make_goertzel_descriptor(&bell_mf_detect_desc[i], (float) bell_mf_frequencies[i], BELL_MF_SAMPLES_PER_BLOCK);
initialised = TRUE;
}
s->digits_callback = callback;
{
for (i = 0; i < 6; i++)
{
- make_goertzel_descriptor(&mf_fwd_detect_desc[i], r2_mf_fwd_frequencies[i], R2_MF_SAMPLES_PER_BLOCK);
- make_goertzel_descriptor(&mf_back_detect_desc[i], r2_mf_back_frequencies[i], R2_MF_SAMPLES_PER_BLOCK);
+ make_goertzel_descriptor(&mf_fwd_detect_desc[i], (float) r2_mf_fwd_frequencies[i], R2_MF_SAMPLES_PER_BLOCK);
+ make_goertzel_descriptor(&mf_back_detect_desc[i], (float) r2_mf_back_frequencies[i], R2_MF_SAMPLES_PER_BLOCK);
}
initialised = TRUE;
}
* 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.13 2009/01/28 03:41:26 steveu Exp $
+ * $Id: dds_int.c,v 1.14 2009/01/29 01:41:05 steveu Exp $
*/
/*! \file */
}
/*- End of function --------------------------------------------------------*/
-int dds_scaling_dbm0(float level)
+int16_t dds_scaling_dbm0(float level)
{
- return (int) (powf(10.0f, (level - DBM0_MAX_SINE_POWER)/20.0f)*32767.0f);
+ return (int16_t) (powf(10.0f, (level - DBM0_MAX_SINE_POWER)/20.0f)*32767.0f);
}
/*- End of function --------------------------------------------------------*/
-int dds_scaling_dbov(float level)
+int16_t dds_scaling_dbov(float level)
{
- return (int) (powf(10.0f, (level - DBOV_MAX_SINE_POWER)/20.0f)*32767.0f);
+ return (int16_t) (powf(10.0f, (level - DBOV_MAX_SINE_POWER)/20.0f)*32767.0f);
}
/*- End of function --------------------------------------------------------*/
* 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.5 2008/08/03 03:44:00 steveu Exp $
+ * $Id: floating_fudge.h,v 1.6 2009/01/29 01:41:05 steveu Exp $
*/
#if !defined(_FLOATING_FUDGE_H_)
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;
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="src; src\spandsp; src\msvc;..\libtiff\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_MATH_H;HAVE_TGMATH_H"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
CompileAs="1"
+ DisableSpecificWarnings="4127"
/>
<Tool
Name="VCManagedResourceCompilerTool"
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="src; src\spandsp; src\msvc;..\libtiff\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_MATH_H;HAVE_TGMATH_H"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="4"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
+ DisableSpecificWarnings="4127"
/>
<Tool
Name="VCManagedResourceCompilerTool"
echo_can_update
fax_rx
fax_tx
-fax_set_flush_handler
fax_init
fax_release
fsk_tx_init
queue_write
queue_read_msg
queue_write_msg
-sig_tone_init
+sig_tone_rx_init
+sig_tone_tx_init
sig_tone_rx
sig_tone_tx
super_tone_rx_make_descriptor
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="src; src\spandsp; src\msvc;..\libtiff\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_MATH_H;HAVE_TGMATH_H"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
CompileAs="1"
+ DisableSpecificWarnings="4127"
/>
<Tool
Name="VCManagedResourceCompilerTool"
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="src; src\spandsp; src\msvc;..\libtiff\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_MATH_H;HAVE_TGMATH_H"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="4"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
+ DisableSpecificWarnings="4127"
/>
<Tool
Name="VCManagedResourceCompilerTool"
* 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.25 2009/01/05 13:48:31 steveu Exp $
+ * $Id: queue.c,v 1.26 2009/01/29 01:41:06 steveu Exp $
*/
/*! \file */
if ((real_len = optr - iptr - 1) < 0)
real_len += s->len;
/*endif*/
- if (real_len < len + sizeof(uint16_t))
+ if (real_len < len + (int) sizeof(uint16_t))
return -1;
/*endif*/
- real_len = len + sizeof(uint16_t);
+ real_len = len + (int) sizeof(uint16_t);
to_end = s->len - iptr;
lenx = (uint16_t) len;
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: dds.h,v 1.21 2008/09/11 15:13:42 steveu Exp $
+ * $Id: dds.h,v 1.22 2009/01/29 01:41:06 steveu Exp $
*/
/*! \file */
\param level The desired signal level, in dBm0.
\return The scaling factor.
*/
-int dds_scaling_dbm0(float level);
+int16_t dds_scaling_dbm0(float level);
/*! \brief Find the scaling factor needed to achieve a specified level in dBmov.
\param level The desired signal level, in dBmov.
\return The scaling factor.
*/
-int dds_scaling_dbov(float level);
+int16_t dds_scaling_dbov(float level);
/*! \brief Find the amplitude for a particular phase.
\param phase The desired phase 32 bit phase.
* 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.33 2009/01/23 16:07:14 steveu Exp $
+ * $Id: t38_core.h,v 1.34 2009/01/29 01:41:06 steveu Exp $
*/
/*! \file */
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,
+ t38_tx_packet_handler_t *tx_packet_handler,
void *tx_packet_user_data);
#if defined(__cplusplus)
/* The date and time of the version are in UTC form. */
-#define SPANDSP_RELEASE_DATE 20090128
-#define SPANDSP_RELEASE_TIME 034417
+#define SPANDSP_RELEASE_DATE 20090129
+#define SPANDSP_RELEASE_TIME 014346
#endif
/*- End of file ------------------------------------------------------------*/
* 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.278 2009/01/28 03:41:27 steveu Exp $
+ * $Id: t30.c,v 1.279 2009/01/29 01:41:06 steveu Exp $
*/
/*! \file */
s->ecm_at_page_end = TRUE;
return i;
}
- s->ecm_len[i] = (int16_t) 4 + len;
+ s->ecm_len[i] = (int16_t) (4 + len);
}
/* We filled the entire buffer */
s->ecm_frames = 256;
* 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.136 2009/01/28 03:41:27 steveu Exp $
+ * $Id: t31.c,v 1.137 2009/01/29 01:41:06 steveu Exp $
*/
/*! \file */
t31_state_t *s;
t31_t38_front_end_state_t *fe;
#if defined(_MSC_VER)
- uint8_t *buf2 = (uint8_t *) alloca(len);
+ uint8_t *buf2 = (uint8_t *) _alloca(len);
#else
uint8_t buf2[len];
#endif
s->hdlc_tx.len = 0;
s->dled = FALSE;
fsk_rx_init(&(s->audio.modems.v21_rx), &preset_fsk_specs[FSK_V21CH2], TRUE, (put_bit_func_t) hdlc_rx_put_bit, &(s->audio.modems.hdlc_rx));
- fsk_rx_signal_cutoff(&(s->audio.modems.v21_rx), -39.09);
+ fsk_rx_signal_cutoff(&(s->audio.modems.v21_rx), -39.09f);
s->at_state.transmit = TRUE;
}
/*- End of function --------------------------------------------------------*/
hdlc_rx_init(&s->hdlc_rx, FALSE, TRUE, HDLC_FRAMING_OK_THRESHOLD, hdlc_accept_frame, user_data);
hdlc_tx_init(&s->hdlc_tx, FALSE, 2, FALSE, hdlc_tx_underflow, user_data);
fsk_rx_init(&s->v21_rx, &preset_fsk_specs[FSK_V21CH2], TRUE, (put_bit_func_t) hdlc_rx_put_bit, &s->hdlc_rx);
- fsk_rx_signal_cutoff(&s->v21_rx, -39.09);
+ fsk_rx_signal_cutoff(&s->v21_rx, -39.09f);
fsk_tx_init(&s->v21_tx, &preset_fsk_specs[FSK_V21CH2], (get_bit_func_t) hdlc_tx_get_bit, &s->hdlc_tx);
v17_rx_init(&s->v17_rx, 14400, non_ecm_put_bit, user_data);
v17_tx_init(&s->v17_tx, 14400, s->use_tep, non_ecm_get_bit, user_data);
* 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.119 2009/01/28 03:41:27 steveu Exp $
+ * $Id: t38_terminal.c,v 1.120 2009/01/29 01:41:06 steveu Exp $
*/
/*! \file */
t38_terminal_state_t *s;
t38_terminal_front_end_state_t *fe;
#if defined(_MSC_VER)
- uint8_t *buf2 = (uint8_t *) alloca(len);
+ uint8_t *buf2 = (uint8_t *) _alloca(len);
#else
uint8_t buf2[len];
#endif
* 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.27 2009/01/28 03:41:27 steveu Exp $
+ * $Id: time_scale.c,v 1.28 2009/01/29 01:41:06 steveu Exp $
*/
/*! \file */
int time_scale_max_output_len(time_scale_state_t *s, int input_len)
{
- return input_len*s->playout_rate + s->min_pitch + 1;
+ return (int) (input_len*s->playout_rate + s->min_pitch + 1);
}
/*- End of function --------------------------------------------------------*/
/*- End of file ------------------------------------------------------------*/
* 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.129 2009/01/28 03:41:27 steveu Exp $
+ * $Id: v17rx.c,v 1.130 2009/01/29 01:41:06 steveu Exp $
*/
/*! \file */
We need to measure the power with the DC blocked, but not using
a slow to respond DC blocker. Use the most elementary HPF. */
x = amp[i] >> 1;
- diff = x - s->last_sample;
+ diff = (int32_t) x - s->last_sample;
power = power_meter_update(&(s->power), diff);
#if defined(IAXMODEM_STUFF)
/* Quick power drop fudge */
* 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.113 2009/01/28 03:41:27 steveu Exp $
+ * $Id: v27ter_rx.c,v 1.114 2009/01/29 01:41:06 steveu Exp $
*/
/*! \file */
We need to measure the power with the DC blocked, but not using
a slow to respond DC blocker. Use the most elementary HPF. */
x = amp[i] >> 1;
- diff = x - s->last_sample;
+ diff = (int32_t) x - s->last_sample;
power = power_meter_update(&(s->power), diff);
#if defined(IAXMODEM_STUFF)
/* Quick power drop fudge */
* 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.150 2009/01/28 03:41:27 steveu Exp $
+ * $Id: v29rx.c,v 1.151 2009/01/29 01:41:06 steveu Exp $
*/
/*! \file */
We need to measure the power with the DC blocked, but not using
a slow to respond DC blocker. Use the most elementary HPF. */
x = amp[i] >> 1;
- diff = x - s->last_sample;
+ diff = (int32_t) x - s->last_sample;
power = power_meter_update(&(s->power), diff);
#if defined(IAXMODEM_STUFF)
/* Quick power drop fudge */