Manual cleanups following clang-formatting.

This primarily addresses two things:
* Tab characters still present, mostly in comments
* printfs split across multiple lines in a suboptimal way

Along the way this fixes a few spelling errors and other minor changes.

BUG=none
R=kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/52689004

Cr-Commit-Position: refs/heads/master@{#9406}
This commit is contained in:
Peter Kasting
2015-06-09 17:26:40 -07:00
parent 83ad33a8ae
commit 2a10087d5e
4 changed files with 271 additions and 387 deletions

View File

@ -33,7 +33,7 @@
#include <time.h>
#define CLOCKS_PER_SEC 1000
// FILE *histfile, *ratefile;
// FILE *histfile, *ratefile;
/* function for reading audio data from PCM file */
int readframe(int16_t* data, FILE* inp, int length) {
@ -106,7 +106,7 @@ int main(int argc, char* argv[]) {
uint16_t streamdata[600];
int16_t speechType[1];
// int16_t *iSACstruct;
// int16_t* iSACstruct;
char version_number[20];
int mode = -1, tmp, nbTest = 0; /*,sss;*/
@ -147,37 +147,23 @@ int main(int argc, char* argv[]) {
printf("./kenny.exe [-I] bottleneck_value infile outfile \n\n");
printf("with:\n");
printf(
"[-I] : if -I option is specified, the coder "
"will use\n");
printf(
" an instantaneous Bottleneck value. If "
"not, it\n");
printf(
" will be an adaptive Bottleneck "
"value.\n\n");
printf(
"bottleneck_value : the value of the bottleneck provided "
"either\n");
printf(
" as a fixed value (e.g. 25000) or\n");
printf(
" read from a file (e.g. "
"bottleneck.txt)\n\n");
printf("[-m] mode : Mode (encoder - decoder):\n");
printf(
" : 0 - float - float \n");
printf(
" : 1 - float - fix \n");
printf(
" : 2 - fix - float \n");
printf(" : 3 - fix - fix \n");
printf("[-PLC] : Test PLC packetlosses\n");
printf(
"[-NB] num : Test NB interfaces, num=1 encNB, num=2 "
"decNB\n");
printf("infile : Normal speech input file\n\n");
printf("outfile : Speech output file\n\n");
printf("[-I] : If -I option is specified, the coder will use\n");
printf(" an instantaneous Bottleneck value. If not, it\n");
printf(" will be an adaptive Bottleneck value.\n\n");
printf("bottleneck_value: The value of the bottleneck provided either\n");
printf(" as a fixed value (e.g. 25000) or\n");
printf(" read from a file (e.g. bottleneck.txt)\n\n");
printf("[-m] mode : Mode (encoder - decoder):\n");
printf(" 0 - float - float\n");
printf(" 1 - float - fix\n");
printf(" 2 - fix - float\n");
printf(" 3 - fix - fix\n\n");
printf("[-PLC] : Test PLC packetlosses\n\n");
printf("[-NB] num : Test NB interfaces:\n");
printf(" 1 - encNB\n");
printf(" 2 - decNB\n\n");
printf("infile : Normal speech input file\n\n");
printf("outfile : Speech output file\n\n");
printf("Example usage:\n\n");
printf("./kenny.exe -I bottleneck.txt -m 1 speechIn.pcm speechOut.pcm\n\n");
exit(0);
@ -240,12 +226,12 @@ int main(int argc, char* argv[]) {
fscanf(f_bn, "%d", &bottleneck);
}
/* Bottleneck is a cosine function
* Matlab code for writing the bottleneck file:
* BottleNeck_10ms = 20e3 + 10e3 * cos((0:5999)/5999*2*pi);
* fid = fopen('bottleneck.txt', 'wb');
* fprintf(fid, '%d\n', BottleNeck_10ms); fclose(fid);
*/
/* Bottleneck is a cosine function
* Matlab code for writing the bottleneck file:
* BottleNeck_10ms = 20e3 + 10e3 * cos((0:5999)/5999*2*pi);
* fid = fopen('bottleneck.txt', 'wb');
* fprintf(fid, '%d\n', BottleNeck_10ms); fclose(fid);
*/
}
} else {
printf("\nfixed bottleneck rate of %d bits/s\n\n", bottleneck);
@ -284,9 +270,6 @@ int main(int argc, char* argv[]) {
/* Initialize the ISAC and BN structs */
WebRtcIsac_create(&ISAC_main_inst);
/* WebRtcIsacfix_AssignSize(&sss);
iSACstruct=malloc(sss);
WebRtcIsacfix_Assign(&ISACFIX_main_inst,iSACstruct);*/
WebRtcIsacfix_Create(&ISACFIX_main_inst);
BN_data.send_time = 0;
@ -311,7 +294,7 @@ int main(int argc, char* argv[]) {
/* exit if returned with error */
errtype = WebRtcIsac_GetErrorCode(ISAC_main_inst);
printf("\n\n Error in initialization: %d.\n\n", errtype);
// exit(EXIT_FAILURE);
// exit(EXIT_FAILURE);
}
}
@ -328,7 +311,7 @@ int main(int argc, char* argv[]) {
/* exit if returned with error */
errtype = WebRtcIsac_GetErrorCode(ISAC_main_inst);
printf("\n\n Error in initialization: %d.\n\n", errtype);
// exit(EXIT_FAILURE);
// exit(EXIT_FAILURE);
}
}
@ -424,22 +407,23 @@ int main(int argc, char* argv[]) {
/* exit if returned with error */
errtype = WebRtcIsac_GetErrorCode(ISAC_main_inst);
printf("\n\nError in encoder: %d.\n\n", errtype);
// exit(EXIT_FAILURE);
// exit(EXIT_FAILURE);
}
} else if (mode == 2 || mode == 3) {
/* iSAC encoding */
if (nbTest != 1)
if (nbTest != 1) {
stream_len = WebRtcIsacfix_Encode(ISACFIX_main_inst, shortdata,
(uint8_t*)streamdata);
else
} else {
stream_len =
WebRtcIsacfix_EncodeNb(ISACFIX_main_inst, shortdata, streamdata);
}
if (stream_len < 0) {
/* exit if returned with error */
errtype = WebRtcIsacfix_GetErrorCode(ISACFIX_main_inst);
printf("\n\nError in encoder: %d.\n\n", errtype);
// exit(EXIT_FAILURE);
// exit(EXIT_FAILURE);
}
}
@ -608,8 +592,8 @@ int main(int argc, char* argv[]) {
}
#ifdef _DEBUG
printf("\n\ntotal bits = %d bits", totalbits);
printf("\nmeasured average bitrate = %0.3f kbits/s",
printf("\n\ntotal bits = %d bits", totalbits);
printf("\nmeasured average bitrate = %0.3f kbits/s",
(double)totalbits * (FS / 1000) / totalsmpls);
printf("\n");
#endif /* _DEBUG */
@ -628,8 +612,8 @@ int main(int argc, char* argv[]) {
WebRtcIsac_Free(ISAC_main_inst);
WebRtcIsacfix_Free(ISACFIX_main_inst);
// fclose(histfile);
// fclose(ratefile);
// fclose(histfile);
// fclose(ratefile);
return 0;
}

View File

@ -23,15 +23,13 @@
#include "utility.h"
/* Defines */
#define SEED_FILE \
"randseed.txt" /* Used when running decoder on garbage data */
#define MAX_FRAMESAMPLES \
960 /* max number of samples per frame \
(= 60 ms frame & 16 kHz) or \
(= 30 ms frame & 32 kHz) */
#define FRAMESAMPLES_10ms 160 /* number of samples per 10ms frame */
#define SEED_FILE "randseed.txt" /* Used when running decoder on garbage data */
#define MAX_FRAMESAMPLES 960 /* max number of samples per frame
(= 60 ms frame & 16 kHz) or
(= 30 ms frame & 32 kHz) */
#define FRAMESAMPLES_10ms 160 /* number of samples per 10ms frame */
#define SWBFRAMESAMPLES_10ms 320
//#define FS 16000 /* sampling frequency (Hz) */
//#define FS 16000 /* sampling frequency (Hz) */
#ifdef WIN32
#define CLOCKS_PER_SEC 1000 /* Runtime statistics */
@ -121,80 +119,56 @@ int main(int argc, char* argv[]) {
printf("Usage:\n\n");
printf("./kenny.exe [-I] bottleneck_value infile outfile \n\n");
printf("with:\n");
printf(
"[-FS num] : sampling frequency in kHz, valid values are 16 & "
"32,\n");
printf(" with 16 as default.\n");
printf(
"[-I] : if -I option is specified, the coder will use\n");
printf(
" an instantaneous Bottleneck value. If not, it\n");
printf(" will be an adaptive Bottleneck value.\n\n");
printf("[-assign] : Use Assign API.\n");
printf("[-B num] : the value of the bottleneck provided either\n");
printf(
" as a fixed value in bits/sec (e.g. 25000) or\n");
printf(" read from a file (e.g. bottleneck.txt)\n\n");
printf(
"[-INITRATE num] : Set a new value for initial rate. Note! Only used "
"in \n");
printf(" adaptive mode.\n\n");
printf(
"[-FL num] : Set (initial) frame length in msec. Valid length "
"are \n");
printf(" 30 and 60 msec.\n\n");
printf(
"[-FIXED_FL] : Frame length will be fixed to initial value.\n\n");
printf(
"[-MAX num] : Set the limit for the payload size of iSAC in "
"bytes. \n");
printf(" Minimum 100 maximum 400.\n\n");
printf(
"[-MAXRATE num] : Set the maxrate for iSAC in bits per second. \n");
printf(" Minimum 32000, maximum 53400.\n\n");
printf(
"[-F num] : if -F option is specified, the test function\n");
printf(
" will run the iSAC API fault scenario specified by "
"the\n");
printf(" supplied number.\n");
printf(
" F 1 - Call encoder prior to init encoder call\n");
printf(
" F 2 - Call decoder prior to init decoder call\n");
printf(" F 3 - Call decoder prior to encoder call\n");
printf(
" F 4 - Call decoder with a too short coded "
"sequence\n");
printf(
" F 5 - Call decoder with a too long coded "
"sequence\n");
printf(" F 6 - Call decoder with random bit stream\n");
printf(
" F 7 - Call init encoder/decoder at random during "
"a call\n");
printf(
" F 8 - Call encoder/decoder without having "
"allocated memory \n");
printf(" for encoder/decoder instance\n");
printf(" F 9 - Call decodeB without calling decodeA\n");
printf(" F 10 - Call decodeB with garbage data\n");
printf("[-PL num] : if -PL option is specified \n");
printf(
"[-T rate file] : test trans-coding with target bottleneck 'rate' "
"bits/sec\n");
printf(" the output file is written to 'file'\n");
printf(
"[-LOOP num] : number of times to repeat coding the input file "
"for stress testing\n");
// printf("[-CE num] : Test of APIs used by Conference Engine.\n");
// printf(" CE 1 - getNewBitstream, getBWE \n");
// printf(" (CE 2 - RESERVED for transcoding)\n");
// printf(" CE 3 - getSendBWE, setSendBWE. \n\n");
// printf("-L filename : write the logging info into file
printf("[-FS num] : sampling frequency in kHz, valid values are\n");
printf(" 16 & 32, with 16 as default.\n");
printf("[-I] : if -I option is specified, the coder will use\n");
printf(" an instantaneous Bottleneck value. If not, it\n");
printf(" will be an adaptive Bottleneck value.\n");
printf("[-assign] : Use Assign API.\n");
printf("[-B num] : the value of the bottleneck provided either\n");
printf(" as a fixed value in bits/sec (e.g. 25000) or\n");
printf(" read from a file (e.g. bottleneck.txt)\n");
printf("[-INITRATE num] : Set a new value for initial rate. Note! Only\n");
printf(" used in adaptive mode.\n");
printf("[-FL num] : Set (initial) frame length in msec. Valid\n");
printf(" lengths are 30 and 60 msec.\n");
printf("[-FIXED_FL] : Frame length will be fixed to initial value.\n");
printf("[-MAX num] : Set the limit for the payload size of iSAC\n");
printf(" in bytes. Minimum 100 maximum 400.\n");
printf("[-MAXRATE num] : Set the maxrate for iSAC in bits per second.\n");
printf(" Minimum 32000, maximum 53400.\n");
printf("[-F num] : if -F option is specified, the test function\n");
printf(" will run the iSAC API fault scenario\n");
printf(" specified by the supplied number.\n");
printf(" F 1 - Call encoder prior to init encoder call\n");
printf(" F 2 - Call decoder prior to init decoder call\n");
printf(" F 3 - Call decoder prior to encoder call\n");
printf(" F 4 - Call decoder with a too short coded\n");
printf(" sequence\n");
printf(" F 5 - Call decoder with a too long coded\n");
printf(" sequence\n");
printf(" F 6 - Call decoder with random bit stream\n");
printf(" F 7 - Call init encoder/decoder at random\n");
printf(" during a call\n");
printf(" F 8 - Call encoder/decoder without having\n");
printf(" allocated memory for encoder/decoder\n");
printf(" instance\n");
printf(" F 9 - Call decodeB without calling decodeA\n");
printf(" F 10 - Call decodeB with garbage data\n");
printf("[-PL num] : if -PL option is specified \n");
printf("[-T rate file] : test trans-coding with target bottleneck\n");
printf(" 'rate' bits/sec\n");
printf(" the output file is written to 'file'\n");
printf("[-LOOP num] : number of times to repeat coding the input\n");
printf(" file for stress testing\n");
// printf("[-CE num] : Test of APIs used by Conference Engine.\n");
// printf(" CE 1 - getNewBitstream, getBWE \n");
// printf(" (CE 2 - RESERVED for transcoding)\n");
// printf(" CE 3 - getSendBWE, setSendBWE. \n");
// printf("-L filename : write the logging info into file
// (appending)\n");
printf("infile : Normal speech input file\n\n");
printf("outfile : Speech output file\n\n");
printf("infile : Normal speech input file\n");
printf("outfile : Speech output file\n");
exit(0);
}
@ -252,10 +226,8 @@ int main(int argc, char* argv[]) {
rateBPS = atoi(argv[i + 1]);
setControlBWE = 1;
if ((rateBPS < 10000) || (rateBPS > 32000)) {
printf(
"\n%d is not a initial rate. Valid values are in the range 10000 "
"to 32000.\n",
rateBPS);
printf("\n%d is not a initial rate. Valid values are in the range "
"10000 to 32000.\n", rateBPS);
exit(0);
}
printf("New initial rate: %d\n", rateBPS);
@ -266,10 +238,8 @@ int main(int argc, char* argv[]) {
if (!strcmp("-FL", argv[i])) {
framesize = atoi(argv[i + 1]);
if ((framesize != 30) && (framesize != 60)) {
printf(
"\n%d is not a valid frame length. Valid length are 30 and 60 "
"msec.\n",
framesize);
printf("\n%d is not a valid frame length. Valid length are 30 and 60 "
"msec.\n", framesize);
exit(0);
}
setControlBWE = 1;
@ -303,10 +273,8 @@ int main(int argc, char* argv[]) {
testNum = atoi(argv[i + 1]);
printf("Fault test: %d\n", testNum);
if (testNum < 1 || testNum > 10) {
printf(
"\n%d is not a valid Fault Scenario number. Valid Fault Scenarios "
"are numbered 1-10.\n",
testNum);
printf("\n%d is not a valid Fault Scenario number. Valid Fault "
"Scenarios are numbered 1-10.\n", testNum);
exit(0);
}
i++;
@ -364,10 +332,8 @@ int main(int argc, char* argv[]) {
sscanf(argv[i], "%s", bottleneck_file);
f_bn = fopen(bottleneck_file, "rb");
if (f_bn == NULL) {
printf(
"Error No value provided for BottleNeck and cannot read file "
"%s.\n",
bottleneck_file);
printf("Error No value provided for BottleNeck and cannot read file "
"%s.\n", bottleneck_file);
exit(0);
} else {
printf("reading bottleneck rates from file %s\n\n", bottleneck_file);
@ -379,12 +345,12 @@ int main(int argc, char* argv[]) {
}
}
/* Bottleneck is a cosine function
* Matlab code for writing the bottleneck file:
* BottleNeck_10ms = 20e3 + 10e3 * cos((0:5999)/5999*2*pi);
* fid = fopen('bottleneck.txt', 'wb');
* fprintf(fid, '%d\n', BottleNeck_10ms); fclose(fid);
*/
/* Bottleneck is a cosine function
* Matlab code for writing the bottleneck file:
* BottleNeck_10ms = 20e3 + 10e3 * cos((0:5999)/5999*2*pi);
* fid = fopen('bottleneck.txt', 'wb');
* fprintf(fid, '%d\n', BottleNeck_10ms); fclose(fid);
*/
}
} else {
printf("\nfixed bottleneck rate of %d bits/s\n\n", bottleneck);
@ -651,8 +617,7 @@ int main(int argc, char* argv[]) {
int16_t indexStream;
uint8_t auxUW8;
/************************* Main Transcoding stream
* *******************************/
/******************** Main Transcoding stream ********************/
WebRtcIsac_GetDownLinkBwIndex(ISAC_main_inst, &bnIdxTC,
&jitterInfoTC);
streamLenTransCoding = WebRtcIsac_GetNewBitStream(
@ -895,28 +860,23 @@ int main(int argc, char* argv[]) {
framecnt++;
/* Error test number 10, garbage data */
// if(testNum == 10)
//{
// /* Test to run decoder with garbage data */
// if( (seedfile = fopen(SEED_FILE, "a+t") ) == NULL )
// {
// fprintf(stderr, "Error: Could not open file %s\n", SEED_FILE);
// }
// else
// {
// fprintf(seedfile, "ok\n\n");
// fclose(seedfile);
// }
//}
// if (testNum == 10)
// {
// /* Test to run decoder with garbage data */
// if ((seedfile = fopen(SEED_FILE, "a+t")) == NULL) {
// fprintf(stderr, "Error: Could not open file %s\n", SEED_FILE);
// } else {
// fprintf(seedfile, "ok\n\n");
// fclose(seedfile);
// }
// }
/* Error test number 10, garbage data */
// if(testNum == 10)
//{
// /* Test to run decoder with garbage data */
// for ( i = 0; i < stream_len; i++)
// {
// streamdata[i] = (short) (streamdata[i] + (short) rand());
// }
//}
// if (testNum == 10) {
// /* Test to run decoder with garbage data */
// for (i = 0; i < stream_len; i++) {
// streamdata[i] = (short) (streamdata[i] + (short) rand());
// }
// }
totalsmpls += declen;
totalbits += 8 * stream_len;

View File

@ -122,39 +122,30 @@ int main(int argc, char* argv[]) {
printf("\n\nWrong number of arguments or flag values.\n\n");
printf("Usage:\n\n");
printf("%s infile outfile -bn bottelneck [options] \n\n", argv[0]);
printf("%s infile outfile -bn bottleneck [options]\n\n", argv[0]);
printf("with:\n");
printf("-I................... indicates encoding in instantaneous mode.\n");
printf(
"-bn bottleneck....... the value of the bottleneck in bit/sec, e.g. "
"39742,\n");
printf(
" in instantaneous (channel-independent) "
"mode.\n\n");
printf("infile............... Normal speech input file\n\n");
printf("outfile.............. Speech output file\n\n");
printf("-I.............. indicates encoding in instantaneous mode.\n");
printf("-bn bottleneck.. the value of the bottleneck in bit/sec, e.g.\n");
printf(" 39742, in instantaneous (channel-independent)\n");
printf(" mode.\n\n");
printf("infile.......... Normal speech input file\n\n");
printf("outfile......... Speech output file\n\n");
printf("OPTIONS\n");
printf("-------\n");
printf(
"-fs sampFreq......... sampling frequency of codec 16 or 32 (default) "
"kHz.\n");
printf("-plim payloadLim..... payload limit in bytes,\n");
printf(" default is the maximum possible.\n");
printf("-rlim rateLim........ rate limit in bits/sec, \n");
printf(" default is the maimum possible.\n");
printf("-h file.............. record histogram and *append* to 'file'.\n");
printf(
"-ave file............ record average rate of 3 sec intervales and "
"*append* to 'file'.\n");
printf("-ploss............... packet-loss percentage.\n");
printf("-enc................. do only encoding and store the bit-stream\n");
printf(
"-dec................. the input file is a bit-stream, decode it.\n");
printf("\n");
printf("-fs sampFreq.... sampling frequency of codec 16 or 32 (default)\n");
printf(" kHz.\n");
printf("-plim payloadLim payload limit in bytes, default is the maximum\n");
printf(" possible.\n");
printf("-rlim rateLim... rate limit in bits/sec, default is the maximum\n");
printf(" possible.\n");
printf("-h file......... record histogram and *append* to 'file'.\n");
printf("-ave file....... record average rate of 3 sec intervales and\n");
printf(" *append* to 'file'.\n");
printf("-ploss.......... packet-loss percentage.\n");
printf("-enc............ do only encoding and store the bit-stream\n");
printf("-dec............ the input file is a bit-stream, decode it.\n\n");
printf("Example usage:\n\n");
printf("%s speechIn.pcm speechOut.pcm -B 40000 -fs 32 \n\n", argv[0]);
printf("%s speechIn.pcm speechOut.pcm -B 40000 -fs 32\n\n", argv[0]);
printf("structure size %d bytes\n", size);
exit(0);
@ -205,10 +196,8 @@ int main(int argc, char* argv[]) {
break;
}
default:
printf(
"A sampling frequency of %d kHz is not supported,\
valid values are 8 and 16.\n",
sampFreqKHz);
printf("A sampling frequency of %d kHz is not supported, valid values are"
" 8 and 16.\n", sampFreqKHz);
exit(-1);
}
payloadLimit = (int16_t)readParamInt(argc, argv, "-plim", 400);
@ -268,18 +257,17 @@ valid values are 8 and 16.\n",
return -1;
}
//{
// int32_t b1, b2;
// FILE* fileID = fopen("GetBNTest.txt", "w");
// b2 = 32100;
// while(b2 <= 52000)
// {
// WebRtcIsac_Control(ISAC_main_inst, b2, frameSize);
// WebRtcIsac_GetUplinkBw(ISAC_main_inst, &b1);
// fprintf(fileID, "%5d %5d\n", b2, b1);
// b2 += 10;
// }
//}
// {
// int32_t b1, b2;
// FILE* fileID = fopen("GetBNTest.txt", "w");
// b2 = 32100;
// while (b2 <= 52000) {
// WebRtcIsac_Control(ISAC_main_inst, b2, frameSize);
// WebRtcIsac_GetUplinkBw(ISAC_main_inst, &b1);
// fprintf(fileID, "%5d %5d\n", b2, b1);
// b2 += 10;
// }
// }
if (codingMode == 1) {
if (WebRtcIsac_Control(ISAC_main_inst, bottleneck, frameSize) < 0) {
@ -445,9 +433,9 @@ valid values are 8 and 16.\n",
rateRCU = ((double)totalBitsRCU * (sampFreqKHz)) / (double)totalsmpls;
printf("\n\n");
printf("Sampling Rate......................... %d kHz\n", sampFreqKHz);
printf("Payload Limit......................... %d bytes \n", payloadLimit);
printf("Rate Limit............................ %d bits/sec \n", rateLimit);
printf("Sampling Rate............... %d kHz\n", sampFreqKHz);
printf("Payload Limit............... %d bytes \n", payloadLimit);
printf("Rate Limit.................. %d bits/sec \n", rateLimit);
#ifdef WIN32
#ifdef HAVE_DEBUG_INFO
@ -463,24 +451,24 @@ valid values are 8 and 16.\n",
#endif // WIN32
printf("\n");
printf("Measured bit-rate..................... %0.3f kbps\n", rate);
printf("Measured RCU bit-ratre................ %0.3f kbps\n", rateRCU);
printf("Maximum bit-rate/payloadsize.......... %0.3f / %d\n",
printf("Measured bit-rate........... %0.3f kbps\n", rate);
printf("Measured RCU bit-ratre...... %0.3f kbps\n", rateRCU);
printf("Maximum bit-rate/payloadsize %0.3f / %d\n",
maxStreamLen * 8 / 0.03, maxStreamLen);
printf("Measured packet-loss.................. %0.1f%% \n",
printf("Measured packet-loss........ %0.1f%% \n",
100.0f * (float)lostPacketCntr / (float)packetCntr);
//#ifdef HAVE_DEBUG_INFO
// printf("Measured lower-band bit-rate.......... %0.3f kbps (%.0f%%)\n",
// #ifdef HAVE_DEBUG_INFO
// printf("Measured lower-band bit-rate %0.3f kbps (%.0f%%)\n",
// rateLB, (double)(rateLB) * 100. /(double)(rate));
// printf("Measured upper-band bit-rate.......... %0.3f kbps (%.0f%%)\n",
// printf("Measured upper-band bit-rate %0.3f kbps (%.0f%%)\n",
// rateUB, (double)(rateUB) * 100. /(double)(rate));
//
// printf("Maximum payload lower-band............ %d bytes (%0.3f kbps)\n",
// printf("Maximum payload lower-band.. %d bytes (%0.3f kbps)\n",
// debugInfo.maxPayloadLB, debugInfo.maxPayloadLB * 8.0 / 0.03);
// printf("Maximum payload upper-band............ %d bytes (%0.3f kbps)\n",
// printf("Maximum payload upper-band.. %d bytes (%0.3f kbps)\n",
// debugInfo.maxPayloadUB, debugInfo.maxPayloadUB * 8.0 / 0.03);
//#endif
// #endif
printf("\n");
@ -488,10 +476,9 @@ valid values are 8 and 16.\n",
#ifdef WIN32
runtime = (double)(clock() / (double)CLOCKS_PER_SEC - starttime);
length_file = ((double)framecnt * (double)declen / (sampFreqKHz * 1000));
printf("Length of speech file................ %.1f s\n", length_file);
printf(
"Time to run iSAC..................... %.2f s (%.2f %% of realtime)\n\n",
runtime, (100 * runtime / length_file));
printf("Length of speech file....... %.1f s\n", length_file);
printf("Time to run iSAC............ %.2f s (%.2f %% of realtime)\n\n",
runtime, (100 * runtime / length_file));
#endif
printf("\n\n_______________________________________________\n");