| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 91 |
| 92 // THE SECOND CLIENT STARTS IN SUPER-WIDEBAND | 92 // THE SECOND CLIENT STARTS IN SUPER-WIDEBAND |
| 93 encoderSampRate[1] = 32000; | 93 encoderSampRate[1] = 32000; |
| 94 OPEN_FILE_RB(inFile[1], fileNameSWB); | 94 OPEN_FILE_RB(inFile[1], fileNameSWB); |
| 95 | 95 |
| 96 strcpy(myFlag, "-I"); | 96 strcpy(myFlag, "-I"); |
| 97 short codingMode = readSwitch(argc, argv, myFlag); | 97 short codingMode = readSwitch(argc, argv, myFlag); |
| 98 | 98 |
| 99 for(clientCntr = 0; clientCntr < NUM_CLIENTS; clientCntr++) | 99 for(clientCntr = 0; clientCntr < NUM_CLIENTS; clientCntr++) |
| 100 { | 100 { |
| 101 codecInstance[clientCntr] = NULL; | 101 codecInstance[clientCntr] = nullptr; |
| 102 | 102 |
| 103 printf("\n"); | 103 printf("\n"); |
| 104 printf("Client %d\n", clientCntr + 1); | 104 printf("Client %d\n", clientCntr + 1); |
| 105 printf("---------\n"); | 105 printf("---------\n"); |
| 106 printf("Starting %s", | 106 printf("Starting %s", |
| 107 (encoderSampRate[clientCntr] == 16000) | 107 (encoderSampRate[clientCntr] == 16000) |
| 108 ? "wideband":"super-wideband"); | 108 ? "wideband":"super-wideband"); |
| 109 | 109 |
| 110 // Open output File Name | 110 // Open output File Name |
| 111 OPEN_FILE_WB(outFile[clientCntr], outFileName[clientCntr]); | 111 OPEN_FILE_WB(outFile[clientCntr], outFileName[clientCntr]); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 128 // coding-mode | 128 // coding-mode |
| 129 printf("Encoding Mode.................... %s\n", | 129 printf("Encoding Mode.................... %s\n", |
| 130 (codingMode == 1)? "Channel-Independent (Instantaneous)":"Adaptive"); | 130 (codingMode == 1)? "Channel-Independent (Instantaneous)":"Adaptive"); |
| 131 | 131 |
| 132 lenEncodedInBytes[clientCntr] = 0; | 132 lenEncodedInBytes[clientCntr] = 0; |
| 133 lenAudioIn10ms[clientCntr] = 0; | 133 lenAudioIn10ms[clientCntr] = 0; |
| 134 lenEncodedInBytesTmp[clientCntr] = 0; | 134 lenEncodedInBytesTmp[clientCntr] = 0; |
| 135 lenAudioIn10msTmp[clientCntr] = 0; | 135 lenAudioIn10msTmp[clientCntr] = 0; |
| 136 | 136 |
| 137 packetData[clientCntr] = (BottleNeckModel*)new(BottleNeckModel); | 137 packetData[clientCntr] = (BottleNeckModel*)new(BottleNeckModel); |
| 138 if(packetData[clientCntr] == NULL) | 138 if (packetData[clientCntr] == nullptr) { |
| 139 { | |
| 140 printf("Could not allocate memory for packetData \n"); | 139 printf("Could not allocate memory for packetData \n"); |
| 141 return -1; | 140 return -1; |
| 142 } | 141 } |
| 143 memset(packetData[clientCntr], 0, sizeof(BottleNeckModel)); | 142 memset(packetData[clientCntr], 0, sizeof(BottleNeckModel)); |
| 144 memset(resamplerState[clientCntr], 0, sizeof(int32_t) * 8); | 143 memset(resamplerState[clientCntr], 0, sizeof(int32_t) * 8); |
| 145 } | 144 } |
| 146 | 145 |
| 147 for(clientCntr = 0; clientCntr < NUM_CLIENTS; clientCntr++) | 146 for(clientCntr = 0; clientCntr < NUM_CLIENTS; clientCntr++) |
| 148 { | 147 { |
| 149 // Create | 148 // Create |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 return -1; | 448 return -1; |
| 450 } | 449 } |
| 451 } | 450 } |
| 452 num10ms[senderIdx] = 0; | 451 num10ms[senderIdx] = 0; |
| 453 } | 452 } |
| 454 //} | 453 //} |
| 455 //} | 454 //} |
| 456 } | 455 } |
| 457 } | 456 } |
| 458 } | 457 } |
| OLD | NEW |