Another round of tweaks for spandsp. There should be no functional changes,

although quite a few things have changed in the test suite
This commit is contained in:
Steve Underwood committed 2011-07-02 21:16:52 +08:00
1 parent d30e82e226
commit 4a7bbf4ec6
77 files changed
+966 -357

No files matched your search

+14 -14
View File
@@ -26,7 +26,7 @@
/*! \file */
#if defined(HAVE_CONFIG_H)
#include <config.h>
#include "config.h"
#endif
#include <inttypes.h>
@@ -69,7 +69,7 @@
#define OUTPUT_TIFF_FILE_NAME "tsb85.tif"
#define OUTPUT_FILE_NAME_WAVE "tsb85.wav"
#define OUTPUT_WAVE_FILE_NAME "tsb85.wav"
#define SAMPLES_PER_CHUNK 160
@@ -220,9 +220,9 @@ static int phase_d_handler(t30_state_t *s, void *user_data, int result)
snprintf(tag, sizeof(tag), "%c: Phase D", i);
printf("%c: Phase D handler on channel %c - (0x%X) %s\n", i, i, result, t30_frametype(result));
log_transfer_statistics(s, tag);
log_tx_parameters(s, tag);
log_rx_parameters(s, tag);
fax_log_transfer_statistics(s, tag);
fax_log_tx_parameters(s, tag);
fax_log_rx_parameters(s, tag);
if (use_receiver_not_ready)
t30_set_receiver_not_ready(s, 3);
@@ -262,9 +262,9 @@ static void phase_e_handler(t30_state_t *s, void *user_data, int result)
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));
log_transfer_statistics(s, tag);
log_tx_parameters(s, tag);
log_rx_parameters(s, tag);
fax_log_transfer_statistics(s, tag);
fax_log_tx_parameters(s, tag);
fax_log_rx_parameters(s, tag);
}
/*- End of function --------------------------------------------------------*/
@@ -869,7 +869,7 @@ static int next_step(faxtester_state_t *s)
else if (strcasecmp((const char *) tag, "TXFILE") == 0)
{
sprintf(next_tx_file, "%s/%s", image_path, (const char *) value);
printf("Push '%s'\n", next_tx_file);
printf("Push '%s'\n", next_tx_file);
}
return 0;
}
@@ -1066,9 +1066,9 @@ static void exchange(faxtester_state_t *s)
if (log_audio)
{
if ((out_handle = sf_open_telephony_write(OUTPUT_FILE_NAME_WAVE, 2)) == NULL)
if ((out_handle = sf_open_telephony_write(OUTPUT_WAVE_FILE_NAME, 2)) == NULL)
{
fprintf(stderr, " Cannot create audio file '%s'\n", OUTPUT_FILE_NAME_WAVE);
fprintf(stderr, " Cannot create audio file '%s'\n", OUTPUT_WAVE_FILE_NAME);
printf("Test failed\n");
exit(2);
}
@@ -1116,7 +1116,7 @@ static void exchange(faxtester_state_t *s)
span_log_bump_samples(&s->logging, len);
len = faxtester_tx(s, amp, 160);
len = faxtester_tx(s, amp, SAMPLES_PER_CHUNK);
if (fax_rx(fax, amp, len))
break;
/*endif*/
@@ -1134,9 +1134,9 @@ static void exchange(faxtester_state_t *s)
/*endfor*/
if (log_audio)
{
if (sf_close(out_handle))
if (sf_close_telephony(out_handle))
{
fprintf(stderr, " Cannot close audio file '%s'\n", OUTPUT_FILE_NAME_WAVE);
fprintf(stderr, " Cannot close audio file '%s'\n", OUTPUT_WAVE_FILE_NAME);
printf("Test failed\n");
exit(2);
}