mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
fix windows build issues from snapshot spandsp-20090131
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11602 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -99,7 +99,7 @@ static goertzel_descriptor_t dtmf_detect_col[4];
|
||||
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 @@ int dtmf_rx(dtmf_rx_state_t *s, const int16_t amp[], int samples)
|
||||
}
|
||||
/*- 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 @@ int dtmf_rx_status(dtmf_rx_state_t *s)
|
||||
}
|
||||
/*- 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 @@ size_t dtmf_rx_get(dtmf_rx_state_t *s, char *buf, int max)
|
||||
}
|
||||
/*- 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 @@ void dtmf_rx_set_realtime_callback(dtmf_rx_state_t *s,
|
||||
}
|
||||
/*- 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 @@ void dtmf_rx_parms(dtmf_rx_state_t *s,
|
||||
}
|
||||
/*- 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 @@ dtmf_rx_state_t *dtmf_rx_init(dtmf_rx_state_t *s,
|
||||
}
|
||||
/*- 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 @@ static void dtmf_tx_initialise(void)
|
||||
}
|
||||
/*- 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 @@ int dtmf_tx(dtmf_tx_state_t *s, int16_t amp[], int max_samples)
|
||||
}
|
||||
/*- 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 @@ int dtmf_tx_put(dtmf_tx_state_t *s, const char *digits, int len)
|
||||
}
|
||||
/*- 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 @@ dtmf_tx_state_t *dtmf_tx_init(dtmf_tx_state_t *s)
|
||||
}
|
||||
/*- 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;
|
||||
|
Reference in New Issue
Block a user