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 |
36 #define CLOCKS_PER_SEC 1000 /* Runtime statistics */ | 37 #define CLOCKS_PER_SEC 1000 /* Runtime statistics */ |
37 #endif | 38 #endif |
| 39 #endif |
38 | 40 |
39 using namespace std; | 41 using namespace std; |
40 | 42 |
41 int main(int argc, char* argv[]) { | 43 int main(int argc, char* argv[]) { |
42 char inname[100], outname[100], bottleneck_file[100], vadfile[100]; | 44 char inname[100], outname[100], bottleneck_file[100], vadfile[100]; |
43 FILE* inp, *outp, * f_bn = NULL, * vadp = NULL, *bandwidthp; | 45 FILE* inp, *outp, * f_bn = NULL, * vadp = NULL, *bandwidthp; |
44 int framecnt, endfile; | 46 int framecnt, endfile; |
45 | 47 |
46 size_t i; | 48 size_t i; |
47 int errtype, VADusage = 0, packetLossPercent = 0; | 49 int errtype, VADusage = 0, packetLossPercent = 0; |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
938 fprintf(stderr, " transcoding rate %.0f kbps", | 940 fprintf(stderr, " transcoding rate %.0f kbps", |
939 (double)numTransCodingBytes * 8.0 * (sampFreqKHz) / totalsmpls); | 941 (double)numTransCodingBytes * 8.0 * (sampFreqKHz) / totalsmpls); |
940 } | 942 } |
941 | 943 |
942 fclose(inp); | 944 fclose(inp); |
943 fclose(outp); | 945 fclose(outp); |
944 WebRtcIsac_Free(ISAC_main_inst); | 946 WebRtcIsac_Free(ISAC_main_inst); |
945 | 947 |
946 exit(0); | 948 exit(0); |
947 } | 949 } |
OLD | NEW |