| Index: webrtc/modules/audio_coding/codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc
|
| diff --git a/webrtc/modules/audio_coding/codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc b/webrtc/modules/audio_coding/codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc
|
| index a734bb0643bcf1e5c5c8b37f1ca9cd938ef57e27..b2d904ece0913eedf43475210c1c3ee6ea8c4ddc 100644
|
| --- a/webrtc/modules/audio_coding/codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc
|
| +++ b/webrtc/modules/audio_coding/codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc
|
| @@ -42,7 +42,7 @@ using namespace std;
|
|
|
| int main(int argc, char* argv[]) {
|
| char inname[100], outname[100], bottleneck_file[100], vadfile[100];
|
| - FILE* inp, *outp, * f_bn = NULL, * vadp = NULL, *bandwidthp;
|
| + FILE *inp, *outp, *f_bn = nullptr, *vadp = nullptr, *bandwidthp;
|
| int framecnt, endfile;
|
|
|
| size_t i;
|
| @@ -83,7 +83,7 @@ int main(int argc, char* argv[]) {
|
| int totalsmpls = 0;
|
|
|
| /* If use GNS file */
|
| - FILE* fp_gns = NULL;
|
| + FILE* fp_gns = nullptr;
|
| char gns_file[100];
|
| size_t maxStreamLen30 = 0;
|
| size_t maxStreamLen60 = 0;
|
| @@ -95,13 +95,13 @@ int main(int argc, char* argv[]) {
|
| int32_t rateTransCoding = 0;
|
| uint8_t streamDataTransCoding[1200];
|
| size_t streamLenTransCoding = 0;
|
| - FILE* transCodingFile = NULL;
|
| - FILE* transcodingBitstream = NULL;
|
| + FILE* transCodingFile = nullptr;
|
| + FILE* transcodingBitstream = nullptr;
|
| size_t numTransCodingBytes = 0;
|
|
|
| /* only one structure used for ISAC encoder */
|
| - ISACStruct* ISAC_main_inst = NULL;
|
| - ISACStruct* decoderTransCoding = NULL;
|
| + ISACStruct* ISAC_main_inst = nullptr;
|
| + ISACStruct* decoderTransCoding = nullptr;
|
|
|
| BottleNeckModel BN_data;
|
|
|
| @@ -185,7 +185,7 @@ int main(int argc, char* argv[]) {
|
| CodingMode = 0;
|
| testNum = 0;
|
| useAssign = 0;
|
| - // logFile = NULL;
|
| + // logFile = null;
|
| char transCodingFileName[500];
|
| int16_t totFileLoop = 0;
|
| int16_t numFileLoop = 0;
|
| @@ -300,7 +300,7 @@ int main(int argc, char* argv[]) {
|
| }
|
| } else {
|
| plFile = fopen(argv[i + 1], "rb");
|
| - if (plFile == NULL) {
|
| + if (plFile == nullptr) {
|
| printf("\n couldn't open the frameloss file: %s\n", argv[i + 1]);
|
| exit(0);
|
| }
|
| @@ -312,7 +312,7 @@ int main(int argc, char* argv[]) {
|
|
|
| /* Random packetlosses */
|
| if (!strcmp("-rnd", argv[i])) {
|
| - srand((unsigned int)time(NULL));
|
| + srand((unsigned int)time(nullptr));
|
| printf("Random pattern in lossed packets \n");
|
| }
|
|
|
| @@ -320,7 +320,7 @@ int main(int argc, char* argv[]) {
|
| if (!strcmp("-G", argv[i])) {
|
| sscanf(argv[i + 1], "%s", gns_file);
|
| fp_gns = fopen(gns_file, "rb");
|
| - if (fp_gns == NULL) {
|
| + if (fp_gns == nullptr) {
|
| printf("Cannot read file %s.\n", gns_file);
|
| exit(0);
|
| }
|
| @@ -335,7 +335,7 @@ int main(int argc, char* argv[]) {
|
| if (bottleneck == 0) {
|
| sscanf(argv[i], "%s", bottleneck_file);
|
| f_bn = fopen(bottleneck_file, "rb");
|
| - if (f_bn == NULL) {
|
| + if (f_bn == nullptr) {
|
| printf("Error No value provided for BottleNeck and cannot read file "
|
| "%s.\n", bottleneck_file);
|
| exit(0);
|
| @@ -412,27 +412,27 @@ int main(int argc, char* argv[]) {
|
| sscanf(argv[argc - 1], "%s", outname);
|
| printf("\nInput file: %s\n", inname);
|
| printf("Output file: %s\n\n", outname);
|
| - if ((inp = fopen(inname, "rb")) == NULL) {
|
| + if ((inp = fopen(inname, "rb")) == nullptr) {
|
| printf(" Error iSAC Cannot read file %s.\n", inname);
|
| cout << flush;
|
| exit(1);
|
| }
|
|
|
| - if ((outp = fopen(outname, "wb")) == NULL) {
|
| + if ((outp = fopen(outname, "wb")) == nullptr) {
|
| printf(" Error iSAC Cannot write file %s.\n", outname);
|
| cout << flush;
|
| getc(stdin);
|
| exit(1);
|
| }
|
| if (VADusage) {
|
| - if ((vadp = fopen(vadfile, "rb")) == NULL) {
|
| + if ((vadp = fopen(vadfile, "rb")) == nullptr) {
|
| printf(" Error iSAC Cannot read file %s.\n", vadfile);
|
| cout << flush;
|
| exit(1);
|
| }
|
| }
|
|
|
| - if ((bandwidthp = fopen("bwe.pcm", "wb")) == NULL) {
|
| + if ((bandwidthp = fopen("bwe.pcm", "wb")) == nullptr) {
|
| printf(" Error iSAC Cannot read file %s.\n", "bwe.pcm");
|
| cout << flush;
|
| exit(1);
|
| @@ -480,14 +480,14 @@ int main(int argc, char* argv[]) {
|
| sampFreqKHz >= 32 ? 32000 : 16000);
|
| WebRtcIsac_DecoderInit(decoderTransCoding);
|
| transCodingFile = fopen(transCodingFileName, "wb");
|
| - if (transCodingFile == NULL) {
|
| + if (transCodingFile == nullptr) {
|
| printf("Could not open %s to output trans-coding.\n",
|
| transCodingFileName);
|
| exit(0);
|
| }
|
| strcat(transCodingFileName, ".bit");
|
| transcodingBitstream = fopen(transCodingFileName, "wb");
|
| - if (transcodingBitstream == NULL) {
|
| + if (transcodingBitstream == nullptr) {
|
| printf("Could not open %s to write the bit-stream of transcoder.\n",
|
| transCodingFileName);
|
| exit(0);
|
| @@ -588,7 +588,7 @@ int main(int argc, char* argv[]) {
|
| }
|
|
|
| if (testNum == 7) {
|
| - srand((unsigned int)time(NULL));
|
| + srand((unsigned int)time(nullptr));
|
| }
|
|
|
| /* iSAC encoding */
|
| @@ -672,7 +672,7 @@ int main(int argc, char* argv[]) {
|
| }
|
|
|
| /* read next bottleneck rate */
|
| - if (f_bn != NULL) {
|
| + if (f_bn != nullptr) {
|
| if (fscanf(f_bn, "%d", &bottleneck) == EOF) {
|
| /* Set pointer to beginning of file */
|
| fseek(f_bn, 0L, SEEK_SET);
|
| @@ -736,7 +736,7 @@ int main(int argc, char* argv[]) {
|
| }
|
|
|
| if (testNum == 6) {
|
| - srand((unsigned int)time(NULL));
|
| + srand((unsigned int)time(nullptr));
|
| for (i = 0; i < stream_len; i++) {
|
| streamdata[i] = rand();
|
| }
|
| @@ -870,7 +870,7 @@ int main(int argc, char* argv[]) {
|
| // if (testNum == 10)
|
| // {
|
| // /* Test to run decoder with garbage data */
|
| - // if ((seedfile = fopen(SEED_FILE, "a+t")) == NULL) {
|
| + // 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");
|
|
|