mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-16 22:38:38 +00:00
Removal of numerous trailing spaces, to tidy up spandsp in line with the master
version.
This commit is contained in:
1 parent
4e812bb263
commit
93bb5ca5c7
130 files changed
+494
-498
No files matched your search
@@ -168,7 +168,7 @@ static void codec_munge(int16_t amp[], int len)
|
||||
{
|
||||
int i;
|
||||
uint8_t alaw;
|
||||
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
alaw = linear_to_alaw (amp[i]);
|
||||
@@ -288,11 +288,11 @@ int main(int argc, char *argv[])
|
||||
RRB% = (N+ + N-)/10
|
||||
Receiver Center Frequency Offset (RCFO) is calculated as follows:
|
||||
RCFO% = X + (N+ - N-)/20
|
||||
|
||||
|
||||
Note that this test doesn't test what it says it is testing at all,
|
||||
and the results are quite inaccurate, if not a downright lie! However,
|
||||
it follows the Mitel procedure, so how can it be bad? :)
|
||||
|
||||
|
||||
The spec calls for +-1.5% +-10Hz of bandwidth.
|
||||
*/
|
||||
printf ("Test 3: Recognition bandwidth and channel centre frequency check\n");
|
||||
@@ -411,11 +411,11 @@ int main(int argc, char *argv[])
|
||||
printf(" Passed\n");
|
||||
|
||||
/* Test 5: Dynamic range
|
||||
This test sends all possible digits, with gradually increasing
|
||||
This test sends all possible digits, with gradually increasing
|
||||
amplitude. We determine the span over which we achieve reliable
|
||||
detection. The spec says we should detect between -14dBm and 0dBm,
|
||||
but the tones clip above -3dBm, so this cannot really work. */
|
||||
|
||||
|
||||
printf("Test 5: Dynamic range\n");
|
||||
for (nplus = nminus = -1000, i = -50; i <= 3; i++)
|
||||
{
|
||||
@@ -450,7 +450,7 @@ int main(int argc, char *argv[])
|
||||
printf(" Passed\n");
|
||||
|
||||
/* Test 6: Guard time
|
||||
This test sends all possible digits, with a gradually reducing
|
||||
This test sends all possible digits, with a gradually reducing
|
||||
duration. The spec defines a narrow range of tone duration
|
||||
times we can expect, so as long as we detect reliably at the
|
||||
specified minimum we should be OK. However, the spec also says
|
||||
|
||||
@@ -172,7 +172,7 @@ int main(int argc, char *argv[])
|
||||
printf("Test failed.\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
|
||||
tx_bert = bert_init(NULL, 0, BERT_PATTERN_7_TO_1, 300, 20);
|
||||
rx_bert = bert_init(NULL, 0, BERT_PATTERN_7_TO_1, 300, 20);
|
||||
for (i = 0; i < 511*2; i++)
|
||||
@@ -447,7 +447,7 @@ int main(int argc, char *argv[])
|
||||
// bert_put_bit(bert, bit);
|
||||
bert_put_bit(bert, bit);
|
||||
}
|
||||
|
||||
|
||||
printf("Tests passed.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ uint8_t to[1000000];
|
||||
static __inline__ int top_bit_dumb(unsigned int data)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
if (data == 0)
|
||||
return -1;
|
||||
for (i = 31; i >= 0; i--)
|
||||
@@ -64,7 +64,7 @@ static __inline__ int top_bit_dumb(unsigned int data)
|
||||
static __inline__ int bottom_bit_dumb(unsigned int data)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
if (data == 0)
|
||||
return -1;
|
||||
for (i = 0; i < 32; i++)
|
||||
@@ -80,11 +80,11 @@ static __inline__ uint8_t bit_reverse8_dumb(uint8_t data)
|
||||
{
|
||||
int i;
|
||||
int result;
|
||||
|
||||
|
||||
result = 0;
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
result = (result << 1) | (data & 1);
|
||||
result = (result << 1) | (data & 1);
|
||||
data >>= 1;
|
||||
}
|
||||
return result;
|
||||
@@ -95,11 +95,11 @@ static __inline__ uint32_t bit_reverse_4bytes_dumb(uint32_t data)
|
||||
{
|
||||
int i;
|
||||
uint32_t result;
|
||||
|
||||
|
||||
result = 0;
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
result = (result << 1) | (data & 0x01010101);
|
||||
result = (result << 1) | (data & 0x01010101);
|
||||
data >>= 1;
|
||||
}
|
||||
return result;
|
||||
@@ -110,11 +110,11 @@ static __inline__ uint16_t bit_reverse16_dumb(uint16_t data)
|
||||
{
|
||||
int i;
|
||||
uint16_t result;
|
||||
|
||||
|
||||
result = 0;
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
result = (result << 1) | (data & 1);
|
||||
result = (result << 1) | (data & 1);
|
||||
data >>= 1;
|
||||
}
|
||||
return result;
|
||||
@@ -125,11 +125,11 @@ static __inline__ uint32_t bit_reverse32_dumb(uint32_t data)
|
||||
{
|
||||
int i;
|
||||
uint32_t result;
|
||||
|
||||
|
||||
result = 0;
|
||||
for (i = 0; i < 32; i++)
|
||||
{
|
||||
result = (result << 1) | (data & 1);
|
||||
result = (result << 1) | (data & 1);
|
||||
data >>= 1;
|
||||
}
|
||||
return result;
|
||||
@@ -154,7 +154,7 @@ static __inline__ int one_bits32_dumb(uint32_t x)
|
||||
{
|
||||
int i;
|
||||
int bits;
|
||||
|
||||
|
||||
bits = 0;
|
||||
for (i = 0; i < 32; i++)
|
||||
{
|
||||
@@ -165,7 +165,7 @@ static __inline__ int one_bits32_dumb(uint32_t x)
|
||||
return bits;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -153,7 +153,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
bitstream_flush(s, &w);
|
||||
printf("%d bits written\n", total_bits);
|
||||
|
||||
|
||||
for (cc = buffer; cc < w; cc++)
|
||||
printf("%02X ", *cc);
|
||||
printf("\n");
|
||||
|
||||
@@ -79,7 +79,7 @@ int main(int argc, char *argv[])
|
||||
printf("CRC module tests\n");
|
||||
|
||||
/* TODO: This doesn't check every function in the module */
|
||||
|
||||
|
||||
/* Try a few random messages through the CRC logic. */
|
||||
printf("Testing the CRC-16 routines\n");
|
||||
for (i = 0; i < 100; i++)
|
||||
@@ -93,7 +93,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
printf("Test passed.\n\n");
|
||||
|
||||
|
||||
printf("Testing the CRC-16 byte by byte and bit by bit routines\n");
|
||||
for (i = 0; i < 100; i++)
|
||||
{
|
||||
@@ -111,7 +111,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
printf("Test passed.\n\n");
|
||||
|
||||
|
||||
printf("Testing the CRC-32 routines\n");
|
||||
for (i = 0; i < 100; i++)
|
||||
{
|
||||
|
||||
@@ -216,7 +216,7 @@ int echo_can_monitor_line_spectrum_update(const int16_t amp[], int len)
|
||||
#endif
|
||||
}
|
||||
s->in_ptr = 0;
|
||||
#if defined(HAVE_FFTW3_H)
|
||||
#if defined(HAVE_FFTW3_H)
|
||||
fftw_execute(s->p);
|
||||
#else
|
||||
fftw_one(s->p, s->in, s->out);
|
||||
@@ -227,7 +227,7 @@ int echo_can_monitor_line_spectrum_update(const int16_t amp[], int len)
|
||||
for (i = 0; i < 512; i++)
|
||||
{
|
||||
s->spec_re_plot[2*i] = i*4000.0/512.0;
|
||||
#if defined(HAVE_FFTW3_H)
|
||||
#if defined(HAVE_FFTW3_H)
|
||||
s->spec_re_plot[2*i + 1] = 10.0*log10((s->out[i][0]*s->out[i][0] + s->out[i][1]*s->out[i][1])/(256.0*32768*256.0*32768) + 1.0e-10) + 3.14;
|
||||
#else
|
||||
s->spec_re_plot[2*i + 1] = 10.0*log10((s->out[i].re*s->out[i].re + s->out[i].im*s->out[i].im)/(256.0*32768*256.0*32768) + 1.0e-10) + 3.14;
|
||||
@@ -394,7 +394,7 @@ int start_echo_can_monitor(int len)
|
||||
s->w->end();
|
||||
s->w->show();
|
||||
|
||||
#if defined(HAVE_FFTW3_H)
|
||||
#if defined(HAVE_FFTW3_H)
|
||||
s->p = fftw_plan_dft_1d(1024, s->in, s->out, FFTW_BACKWARD, FFTW_ESTIMATE);
|
||||
for (i = 0; i < 1024; i++)
|
||||
{
|
||||
@@ -416,7 +416,7 @@ int start_echo_can_monitor(int len)
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
void echo_can_monitor_wait_to_end(void)
|
||||
void echo_can_monitor_wait_to_end(void)
|
||||
{
|
||||
fd_set rfds;
|
||||
int res;
|
||||
@@ -437,7 +437,7 @@ void echo_can_monitor_wait_to_end(void)
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
void echo_can_monitor_update_display(void)
|
||||
void echo_can_monitor_update_display(void)
|
||||
{
|
||||
Fl::check();
|
||||
Fl::check();
|
||||
|
||||
@@ -106,7 +106,7 @@ struct faxtester_state_s
|
||||
int current_tx_type;
|
||||
|
||||
int wait_for_silence;
|
||||
|
||||
|
||||
int tone_state;
|
||||
int64_t tone_on_time;
|
||||
|
||||
|
||||
@@ -417,7 +417,7 @@ int start_line_model_monitor(int len)
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
void line_model_monitor_wait_to_end(void)
|
||||
void line_model_monitor_wait_to_end(void)
|
||||
{
|
||||
fd_set rfds;
|
||||
int res;
|
||||
@@ -438,7 +438,7 @@ void line_model_monitor_wait_to_end(void)
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
void line_model_monitor_update_display(void)
|
||||
void line_model_monitor_update_display(void)
|
||||
{
|
||||
Fl::check();
|
||||
Fl::check();
|
||||
|
||||
@@ -115,13 +115,13 @@ static void test_one_way_model(int line_model_no, int speech_test)
|
||||
int i;
|
||||
int j;
|
||||
awgn_state_t noise1;
|
||||
|
||||
|
||||
if ((model = one_way_line_model_init(line_model_no, -50, channel_codec, rbs_pattern)) == NULL)
|
||||
{
|
||||
fprintf(stderr, " Failed to create line model\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
|
||||
awgn_init_dbm0(&noise1, 1234567, -10.0f);
|
||||
|
||||
if (speech_test)
|
||||
@@ -157,7 +157,7 @@ static void test_one_way_model(int line_model_no, int speech_test)
|
||||
}
|
||||
for (j = 0; j < samples; j++)
|
||||
{
|
||||
one_way_line_model(model,
|
||||
one_way_line_model(model,
|
||||
&output1[j],
|
||||
&input1[j],
|
||||
1);
|
||||
@@ -204,7 +204,7 @@ static void test_both_ways_model(int line_model_no, int speech_test)
|
||||
int j;
|
||||
awgn_state_t noise1;
|
||||
awgn_state_t noise2;
|
||||
|
||||
|
||||
if ((model = both_ways_line_model_init(line_model_no,
|
||||
-50,
|
||||
-15.0f,
|
||||
@@ -219,7 +219,7 @@ static void test_both_ways_model(int line_model_no, int speech_test)
|
||||
fprintf(stderr, " Failed to create line model\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
|
||||
awgn_init_dbm0(&noise1, 1234567, -10.0f);
|
||||
awgn_init_dbm0(&noise2, 1234567, -10.0f);
|
||||
|
||||
@@ -268,7 +268,7 @@ static void test_both_ways_model(int line_model_no, int speech_test)
|
||||
}
|
||||
for (j = 0; j < samples; j++)
|
||||
{
|
||||
both_ways_line_model(model,
|
||||
both_ways_line_model(model,
|
||||
&output1[j],
|
||||
&input1[j],
|
||||
&output2[j],
|
||||
@@ -339,7 +339,7 @@ static void test_line_filter(int line_model_no)
|
||||
if (++p == 129)
|
||||
p = 0;
|
||||
ptr = p;
|
||||
|
||||
|
||||
/* Apply the filter */
|
||||
out = 0.0f;
|
||||
for (j = 0; j < 129; j++)
|
||||
|
||||
@@ -149,13 +149,13 @@ int main(int argc, char *argv[])
|
||||
fprintf(stderr, " Cannot create audio file '%s'\n", OUT_FILE_NAME);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
|
||||
if ((lpc10_enc_state = lpc10_encode_init(NULL, TRUE)) == NULL)
|
||||
{
|
||||
fprintf(stderr, " Cannot create encoder\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
|
||||
if ((lpc10_dec_state = lpc10_decode_init(NULL, TRUE)) == NULL)
|
||||
{
|
||||
fprintf(stderr, " Cannot create decoder\n");
|
||||
@@ -226,7 +226,7 @@ int main(int argc, char *argv[])
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (sf_close_telephony(outhandle))
|
||||
{
|
||||
fprintf(stderr, " Cannot close audio file '%s'\n", OUT_FILE_NAME);
|
||||
|
||||
@@ -114,7 +114,7 @@ void media_monitor_rx(int seq_no, double departure_time, double arrival_time)
|
||||
}
|
||||
|
||||
s->received_delays = new Ca_Line(2000, s->received_delays_plot, 0, 0, FL_BLUE, CA_NO_POINT);
|
||||
|
||||
|
||||
if (s->sent_re)
|
||||
delete s->sent_re;
|
||||
|
||||
@@ -126,7 +126,7 @@ void media_monitor_rx(int seq_no, double departure_time, double arrival_time)
|
||||
s->sent_re_plot[2*(i%500) + 1] = 0.0;
|
||||
}
|
||||
s->sent_re_plot[2*(seq_no%500) + 1] = fdiff;
|
||||
|
||||
|
||||
if (fdiff > s->sent_re_plot_max)
|
||||
{
|
||||
s->sent_re_plot_max = fdiff;
|
||||
@@ -157,7 +157,7 @@ int start_media_monitor(void)
|
||||
float y;
|
||||
int i;
|
||||
int len;
|
||||
|
||||
|
||||
len = 128;
|
||||
|
||||
s->w = new Fl_Double_Window(465, 400, "IP streaming media monitor");
|
||||
@@ -255,7 +255,7 @@ int start_media_monitor(void)
|
||||
s->received_delays_plot_max = 0.0;
|
||||
s->min_diff = 2000;
|
||||
s->max_diff = 0;
|
||||
|
||||
|
||||
s->received_delays = NULL;
|
||||
s->highest_seq_no_seen = -1;
|
||||
|
||||
@@ -278,7 +278,7 @@ int start_media_monitor(void)
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
void media_monitor_wait_to_end(void)
|
||||
void media_monitor_wait_to_end(void)
|
||||
{
|
||||
fd_set rfds;
|
||||
int res;
|
||||
@@ -299,7 +299,7 @@ void media_monitor_wait_to_end(void)
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
void media_monitor_update_display(void)
|
||||
void media_monitor_update_display(void)
|
||||
{
|
||||
Fl::check();
|
||||
Fl::check();
|
||||
|
||||
@@ -61,7 +61,7 @@ struct qam_monitor_s
|
||||
Fl_Group *c_right;
|
||||
Fl_Group *c_eq;
|
||||
Fl_Group *c_symbol_track;
|
||||
|
||||
|
||||
/* Constellation stuff */
|
||||
Ca_Canvas *canvas_const;
|
||||
Ca_X_Axis *sig_i;
|
||||
@@ -202,7 +202,7 @@ int qam_monitor_update_equalizer(qam_monitor_t *s, const complexf_t *coeffs, int
|
||||
if (max < coeffs[i].im)
|
||||
max = coeffs[i].im;
|
||||
}
|
||||
|
||||
|
||||
s->eq_x->minimum(-len/4.0);
|
||||
s->eq_x->maximum(len/4.0);
|
||||
s->eq_y->maximum((max == min) ? max + 0.2 : max);
|
||||
@@ -316,7 +316,7 @@ int qam_monitor_update_audio_level(qam_monitor_t *s, const int16_t amp[], int le
|
||||
int i;
|
||||
char buf[11];
|
||||
double val;
|
||||
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
s->audio_meter->sample(amp[i]/32768.0);
|
||||
@@ -385,10 +385,10 @@ qam_monitor_t *qam_monitor_init(float constel_width, float constel_scaling, cons
|
||||
float x;
|
||||
float y;
|
||||
qam_monitor_t *s;
|
||||
|
||||
|
||||
if ((s = (qam_monitor_t *) malloc(sizeof(*s))) == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
s->w = new Fl_Double_Window(905, 400, (tag) ? tag : "QAM monitor");
|
||||
|
||||
s->constel_scaling = 1.0/constel_scaling;
|
||||
@@ -567,7 +567,7 @@ qam_monitor_t *qam_monitor_init(float constel_width, float constel_scaling, cons
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
void qam_wait_to_end(qam_monitor_t *s)
|
||||
void qam_wait_to_end(qam_monitor_t *s)
|
||||
{
|
||||
fd_set rfds;
|
||||
int res;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* SpanDSP - a series of DSP components for telephony
|
||||
*
|
||||
* t31_pseudo_terminal_tests.c -
|
||||
* t31_pseudo_terminal_tests.c -
|
||||
*
|
||||
* Written by Steve Underwood <steveu@coppice.org>
|
||||
*
|
||||
@@ -125,7 +125,7 @@ static void phase_e_handler(t30_state_t *s, void *user_data, int result)
|
||||
{
|
||||
int i;
|
||||
char tag[20];
|
||||
|
||||
|
||||
i = (intptr_t) user_data;
|
||||
snprintf(tag, sizeof(tag), "%c: Phase E", i);
|
||||
printf("Phase E handler on channel %c\n", i);
|
||||
@@ -316,7 +316,7 @@ static int modem_wait_sock(modem_t *modem, int ms, modem_poll_t flags)
|
||||
{
|
||||
if (GetLastError() != ERROR_IO_PENDING)
|
||||
{
|
||||
/* Something went horribly wrong with WaitCommEvent(), so
|
||||
/* Something went horribly wrong with WaitCommEvent(), so
|
||||
clear all errors and try again */
|
||||
ClearCommError(modem->master, &comerrors, 0);
|
||||
}
|
||||
@@ -412,7 +412,7 @@ static int t30_tests(int t38_mode, int use_ecm, int use_gui, int log_audio, int
|
||||
#endif
|
||||
|
||||
/* Test the T.31 modem against the full FAX machine in spandsp */
|
||||
|
||||
|
||||
/* Set up the test environment */
|
||||
t38_version = 1;
|
||||
without_pacing = FALSE;
|
||||
@@ -580,7 +580,7 @@ static int t30_tests(int t38_mode, int use_ecm, int use_gui, int log_audio, int
|
||||
|
||||
while (!done)
|
||||
{
|
||||
/* Deal with call setup, through the AT interface. */
|
||||
/* Deal with call setup, through the AT interface. */
|
||||
if (test_sending)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -312,7 +312,7 @@ static void phase_e_handler(t30_state_t *s, void *user_data, int result)
|
||||
{
|
||||
int i;
|
||||
char tag[20];
|
||||
|
||||
|
||||
i = (intptr_t) user_data;
|
||||
snprintf(tag, sizeof(tag), "%c: Phase E", i);
|
||||
printf("Phase E handler on channel %c\n", i);
|
||||
@@ -508,7 +508,7 @@ static int t30_tests(int t38_mode, int use_gui, int log_audio, int test_sending,
|
||||
SNDFILE *in_handle;
|
||||
|
||||
/* Test the T.31 modem against the full FAX machine in spandsp */
|
||||
|
||||
|
||||
/* Set up the test environment */
|
||||
t38_version = 1;
|
||||
without_pacing = FALSE;
|
||||
@@ -668,7 +668,7 @@ static int t30_tests(int t38_mode, int use_gui, int log_audio, int test_sending,
|
||||
{
|
||||
if (countdown)
|
||||
{
|
||||
/* Deal with call setup, through the AT interface. */
|
||||
/* Deal with call setup, through the AT interface. */
|
||||
if (answered)
|
||||
{
|
||||
countdown = 0;
|
||||
|
||||
@@ -126,7 +126,7 @@ static int rx_data_handler(t38_core_state_t *s, void *user_data, int data_type,
|
||||
static int tx_packet_handler(t38_core_state_t *s, void *user_data, const uint8_t *buf, int len, int count)
|
||||
{
|
||||
t38_core_state_t *t;
|
||||
|
||||
|
||||
t = (t38_core_state_t *) user_data;
|
||||
span_log(t38_core_get_logging_state(s), SPAN_LOG_FLOW, "Send seq %d, len %d, count %d\n", s->tx_seq_no, len, count);
|
||||
if (t38_core_rx_ifp_packet(t, buf, len, seq_no) < 0)
|
||||
@@ -151,7 +151,7 @@ static int encode_decode_tests(t38_core_state_t *a, t38_core_state_t *b)
|
||||
t38_data_field_t field[MAX_FIELDS];
|
||||
int i;
|
||||
int j;
|
||||
|
||||
|
||||
ok_indicator_packets = 0;
|
||||
bad_indicator_packets = 0;
|
||||
ok_data_packets = 0;
|
||||
@@ -296,7 +296,7 @@ static int encode_then_decode_tests(t38_core_state_t *a, t38_core_state_t *b)
|
||||
int len;
|
||||
int i;
|
||||
int j;
|
||||
|
||||
|
||||
ok_indicator_packets = 0;
|
||||
bad_indicator_packets = 0;
|
||||
ok_data_packets = 0;
|
||||
|
||||
@@ -224,7 +224,7 @@ static int t38_gateway_timing_update(void *user_data, struct timeval *ts)
|
||||
}
|
||||
if (t38_gateway_rx(t38_gateway_state, t30_amp, t30_len))
|
||||
break;
|
||||
|
||||
|
||||
t38_len = t38_gateway_tx(t38_gateway_state, t38_amp, partial);
|
||||
if (!use_transmit_on_idle)
|
||||
{
|
||||
@@ -295,7 +295,7 @@ static uint32_t parse_inet_addr(const char *s)
|
||||
uint32_t b;
|
||||
uint32_t c;
|
||||
uint32_t d;
|
||||
|
||||
|
||||
a = 0;
|
||||
b = 0;
|
||||
c = 0;
|
||||
|
||||
@@ -645,7 +645,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
printf(" Initial ones from an empty TCF buffer OK\n");
|
||||
|
||||
|
||||
/* Now send some initial ones, and see that we continue to get all ones
|
||||
as the stuffing. */
|
||||
memset(buf, 0xFF, 500);
|
||||
|
||||
@@ -288,10 +288,10 @@ int main(int argc, char *argv[])
|
||||
#if defined(SPANDSP_SUPPORT_T42x)
|
||||
T4_COMPRESSION_ITU_T42,
|
||||
T4_COMPRESSION_ITU_SYCC_T42,
|
||||
#endif
|
||||
#endif
|
||||
#if defined(SPANDSP_SUPPORT_T43x)
|
||||
T4_COMPRESSION_ITU_T43,
|
||||
#endif
|
||||
#endif
|
||||
T4_COMPRESSION_ITU_T85,
|
||||
T4_COMPRESSION_ITU_T85_L0,
|
||||
//T4_COMPRESSION_ITU_T45,
|
||||
|
||||
@@ -99,7 +99,7 @@ static int phase_b_handler(t30_state_t *s, void *user_data, int result)
|
||||
int i;
|
||||
int status;
|
||||
const char *u;
|
||||
|
||||
|
||||
i = (intptr_t) user_data;
|
||||
status = T30_ERR_OK;
|
||||
if ((u = t30_get_rx_ident(s)))
|
||||
@@ -256,10 +256,10 @@ static void phase_e_handler(t30_state_t *s, void *user_data, int result)
|
||||
{
|
||||
int i;
|
||||
char tag[20];
|
||||
|
||||
|
||||
i = (intptr_t) user_data;
|
||||
snprintf(tag, sizeof(tag), "%c: Phase E", i);
|
||||
printf("%c: Phase E handler on channel %c - (%d) %s\n", i, i, result, t30_completion_code_to_str(result));
|
||||
printf("%c: Phase E handler on channel %c - (%d) %s\n", i, i, result, t30_completion_code_to_str(result));
|
||||
fax_log_final_transfer_statistics(s, tag);
|
||||
fax_log_tx_parameters(s, tag);
|
||||
fax_log_rx_parameters(s, tag);
|
||||
@@ -289,7 +289,7 @@ static void t30_real_time_frame_handler(t30_state_t *s,
|
||||
static int document_handler(t30_state_t *s, void *user_data, int event)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
i = (intptr_t) user_data;
|
||||
fprintf(stderr, "%d: Document handler on channel %d - event %d\n", i, i, event);
|
||||
if (next_tx_file[0])
|
||||
@@ -498,7 +498,7 @@ static int string_to_msg(uint8_t msg[], uint8_t mask[], const char buf[])
|
||||
static void string_test2(const uint8_t msg[], int len)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
if (len > 0)
|
||||
{
|
||||
for (i = 0; i < len - 1; i++)
|
||||
@@ -514,7 +514,7 @@ static void string_test3(const char buf[])
|
||||
uint8_t mask[1000];
|
||||
int len;
|
||||
int i;
|
||||
|
||||
|
||||
len = string_to_msg(msg, mask, buf);
|
||||
printf("Len = %d: ", len);
|
||||
string_test2(msg, abs(len));
|
||||
@@ -671,7 +671,7 @@ static int next_step(faxtester_state_t *s)
|
||||
s->cur = s->cur->next;
|
||||
|
||||
span_log(&s->logging,
|
||||
SPAN_LOG_FLOW,
|
||||
SPAN_LOG_FLOW,
|
||||
"Dir - %s, type - %s, modem - %s, value - %s, timeout - %s, tag - %s\n",
|
||||
(dir) ? (const char *) dir : "",
|
||||
(type) ? (const char *) type : "",
|
||||
@@ -1111,7 +1111,7 @@ static void exchange(faxtester_state_t *s)
|
||||
span_log_bump_samples(logging, len);
|
||||
|
||||
span_log_bump_samples(&s->logging, len);
|
||||
|
||||
|
||||
len = faxtester_tx(s, amp, SAMPLES_PER_CHUNK);
|
||||
if (fax_rx(fax, amp, len))
|
||||
break;
|
||||
@@ -1207,7 +1207,7 @@ static int get_test_set(faxtester_state_t *s, const char *test_file, const char
|
||||
xmlNodePtr cur;
|
||||
xmlValidCtxt valid;
|
||||
|
||||
ns = NULL;
|
||||
ns = NULL;
|
||||
xmlKeepBlanksDefault(0);
|
||||
xmlCleanupParser();
|
||||
if ((doc = xmlParseFile(test_file)) == NULL)
|
||||
|
||||
@@ -1639,7 +1639,7 @@ static int test_x_06(void)
|
||||
msg[i] = i + 1;
|
||||
msg[127] = '\0';
|
||||
printf("%s\n", msg);
|
||||
|
||||
|
||||
v18_encode_dtmf(NULL, dtmf, msg);
|
||||
printf("%s\n", dtmf);
|
||||
|
||||
@@ -1780,7 +1780,7 @@ static int test_x_12(void)
|
||||
static void put_v18_msg(void *user_data, const uint8_t *msg, int len)
|
||||
{
|
||||
char buf[1024];
|
||||
|
||||
|
||||
memcpy(buf, msg, len);
|
||||
buf[len] = '\0';
|
||||
printf("Received (%d bytes) '%s'\n", len, buf);
|
||||
|
||||
@@ -87,7 +87,7 @@ endpoint_t endpoint[2];
|
||||
static void reporter(void *user_data, int reason, bert_results_t *results)
|
||||
{
|
||||
endpoint_t *s;
|
||||
|
||||
|
||||
s = (endpoint_t *) user_data;
|
||||
switch (reason)
|
||||
{
|
||||
@@ -100,7 +100,7 @@ static void reporter(void *user_data, int reason, bert_results_t *results)
|
||||
memcpy(&s->latest_results, results, sizeof(s->latest_results));
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr,
|
||||
fprintf(stderr,
|
||||
"V.22bis rx %p BERT report %s\n",
|
||||
user_data,
|
||||
bert_event_to_str(reason));
|
||||
@@ -271,7 +271,7 @@ int main(int argc, char *argv[])
|
||||
int rbs_pattern;
|
||||
int guard_tone_option;
|
||||
int opt;
|
||||
|
||||
|
||||
channel_codec = MUNGE_CODEC_NONE;
|
||||
rbs_pattern = 0;
|
||||
test_bps = 2400;
|
||||
@@ -373,7 +373,7 @@ int main(int argc, char *argv[])
|
||||
bert_set_report(&endpoint[i].bert_rx, 10000, reporter, &endpoint[i]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if defined(ENABLE_GUI)
|
||||
if (use_gui)
|
||||
{
|
||||
@@ -420,7 +420,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
#if 1
|
||||
both_ways_line_model(model,
|
||||
both_ways_line_model(model,
|
||||
model_amp[0],
|
||||
amp[0],
|
||||
model_amp[1],
|
||||
|
||||
@@ -327,7 +327,7 @@ int main(int argc, char *argv[])
|
||||
int rbs_pattern;
|
||||
int opt;
|
||||
logging_state_t *logging;
|
||||
|
||||
|
||||
channel_codec = MUNGE_CODEC_NONE;
|
||||
rbs_pattern = 0;
|
||||
test_bps = 9600;
|
||||
@@ -551,7 +551,7 @@ int main(int argc, char *argv[])
|
||||
fprintf(stderr, "Final result %ddBm0/%ddBm0, %d bits, %d bad bits, %d resyncs\n", signal_level, noise_level, bert_results.total_bits, bert_results.bad_bits, bert_results.resyncs);
|
||||
fprintf(stderr, "Last report %ddBm0/%ddBm0, %d bits, %d bad bits, %d resyncs\n", signal_level, noise_level, latest_results.total_bits, latest_results.bad_bits, latest_results.resyncs);
|
||||
one_way_line_model_release(line_model);
|
||||
|
||||
|
||||
if (signal_level > -43)
|
||||
{
|
||||
printf("Tests failed.\n");
|
||||
|
||||
@@ -57,7 +57,7 @@ int out_octets_to_date = 0;
|
||||
static void frame_handler(void *user_data, const uint8_t *buf, int len)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
||||
if ((ret = write((intptr_t) user_data, buf, len)) != len)
|
||||
fprintf(stderr, "Write error %d/%d\n", ret, errno);
|
||||
out_octets_to_date += len;
|
||||
@@ -198,7 +198,7 @@ int main(int argc, char *argv[])
|
||||
fprintf(stderr, "Error opening file '%s'.\n", decompressed_file);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
|
||||
time(&now);
|
||||
state_b = v42bis_init(NULL, 3, 512, 6, frame_handler, (void *) (intptr_t) v42bis_fd, 512, data_handler, (void *) (intptr_t) out_fd, 512);
|
||||
span_log_set_level(v42bis_get_logging_state(state_b), SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_FLOW);
|
||||
|
||||
@@ -77,7 +77,7 @@ static int select_modulation(int mask)
|
||||
static void handler(void *user_data, v8_parms_t *result)
|
||||
{
|
||||
const char *s;
|
||||
|
||||
|
||||
s = (const char *) user_data;
|
||||
|
||||
printf("%s ", s);
|
||||
@@ -362,7 +362,7 @@ static int non_v8_calls_v8_tests(SNDFILE *outhandle)
|
||||
for (i = 0; i < samples; i++)
|
||||
out_amp[2*i] = amp[i];
|
||||
/*endfor*/
|
||||
|
||||
|
||||
samples = v8_tx(v8_answerer, amp, SAMPLES_PER_CHUNK);
|
||||
if (samples < SAMPLES_PER_CHUNK)
|
||||
{
|
||||
@@ -472,7 +472,7 @@ static int v8_calls_non_v8_tests(SNDFILE *outhandle)
|
||||
for (i = 0; i < samples; i++)
|
||||
out_amp[2*i] = amp[i];
|
||||
/*endfor*/
|
||||
|
||||
|
||||
samples = modem_connect_tones_tx(non_v8_answerer_tx, amp, SAMPLES_PER_CHUNK);
|
||||
if (samples < SAMPLES_PER_CHUNK)
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
static void vec_copyf_dumb(float z[], const float x[], int n)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
z[i] = x[i];
|
||||
}
|
||||
@@ -97,7 +97,7 @@ static int test_vec_copyf(void)
|
||||
static void vec_negatef_dumb(float z[], const float x[], int n)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
z[i] = -x[i];
|
||||
}
|
||||
@@ -157,7 +157,7 @@ static int test_vec_negatef(void)
|
||||
static void vec_zerof_dumb(float z[], int n)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
z[i] = 0.0f;
|
||||
}
|
||||
@@ -215,7 +215,7 @@ static int test_vec_zerof(void)
|
||||
static void vec_setf_dumb(float z[], float x, int n)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
z[i] = x;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ static int32_t vec_min_maxi16_dumb(const int16_t x[], int n, int16_t out[])
|
||||
int16_t max;
|
||||
int16_t temp;
|
||||
int32_t z;
|
||||
|
||||
|
||||
max = INT16_MIN;
|
||||
min = INT16_MAX;
|
||||
for (i = 0; i < n; i++)
|
||||
@@ -103,7 +103,7 @@ static int32_t vec_min_maxi16_dumb(const int16_t x[], int n, int16_t out[])
|
||||
return max;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
|
||||
static int test_vec_min_maxi16(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
Reference in new issue
Block a user