| 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 15 matching lines...) Expand all Loading... |
| 26 /* Defines */ | 26 /* Defines */ |
| 27 #define SEED_FILE "randseed.txt" /* Used when running decoder on garbage data */ | 27 #define SEED_FILE "randseed.txt" /* Used when running decoder on garbage data */ |
| 28 #define MAX_FRAMESAMPLES 960 /* max number of samples per frame | 28 #define MAX_FRAMESAMPLES 960 /* max number of samples per frame |
| 29 (= 60 ms frame & 16 kHz) or | 29 (= 60 ms frame & 16 kHz) or |
| 30 (= 30 ms frame & 32 kHz) */ | 30 (= 30 ms frame & 32 kHz) */ |
| 31 #define FRAMESAMPLES_10ms 160 /* number of samples per 10ms frame */ | 31 #define FRAMESAMPLES_10ms 160 /* number of samples per 10ms frame */ |
| 32 #define SWBFRAMESAMPLES_10ms 320 | 32 #define SWBFRAMESAMPLES_10ms 320 |
| 33 //#define FS 16000 /* sampling frequency (Hz) */ | 33 //#define FS 16000 /* sampling frequency (Hz) */ |
| 34 | 34 |
| 35 #ifdef WIN32 | 35 #ifdef WIN32 |
| 36 #ifndef CLOCKS_PER_SEC | |
| 37 #define CLOCKS_PER_SEC 1000 /* Runtime statistics */ | 36 #define CLOCKS_PER_SEC 1000 /* Runtime statistics */ |
| 38 #endif | 37 #endif |
| 39 #endif | |
| 40 | 38 |
| 41 using namespace std; | 39 using namespace std; |
| 42 | 40 |
| 43 int main(int argc, char* argv[]) { | 41 int main(int argc, char* argv[]) { |
| 44 char inname[100], outname[100], bottleneck_file[100], vadfile[100]; | 42 char inname[100], outname[100], bottleneck_file[100], vadfile[100]; |
| 45 FILE* inp, *outp, * f_bn = NULL, * vadp = NULL, *bandwidthp; | 43 FILE* inp, *outp, * f_bn = NULL, * vadp = NULL, *bandwidthp; |
| 46 int framecnt, endfile; | 44 int framecnt, endfile; |
| 47 | 45 |
| 48 size_t i; | 46 size_t i; |
| 49 int errtype, VADusage = 0, packetLossPercent = 0; | 47 int errtype, VADusage = 0, packetLossPercent = 0; |
| (...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 fprintf(stderr, " transcoding rate %.0f kbps", | 938 fprintf(stderr, " transcoding rate %.0f kbps", |
| 941 (double)numTransCodingBytes * 8.0 * (sampFreqKHz) / totalsmpls); | 939 (double)numTransCodingBytes * 8.0 * (sampFreqKHz) / totalsmpls); |
| 942 } | 940 } |
| 943 | 941 |
| 944 fclose(inp); | 942 fclose(inp); |
| 945 fclose(outp); | 943 fclose(outp); |
| 946 WebRtcIsac_Free(ISAC_main_inst); | 944 WebRtcIsac_Free(ISAC_main_inst); |
| 947 | 945 |
| 948 exit(0); | 946 exit(0); |
| 949 } | 947 } |
| OLD | NEW |