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 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1554 | 1554 |
1555 int NetEQTest_encode(int coder, | 1555 int NetEQTest_encode(int coder, |
1556 int16_t* indata, | 1556 int16_t* indata, |
1557 int frameLen, | 1557 int frameLen, |
1558 unsigned char* encoded, | 1558 unsigned char* encoded, |
1559 int sampleRate, | 1559 int sampleRate, |
1560 int* vad, | 1560 int* vad, |
1561 int useVAD, | 1561 int useVAD, |
1562 int bitrate, | 1562 int bitrate, |
1563 int numChannels) { | 1563 int numChannels) { |
1564 int cdlen = 0; | 1564 short cdlen = 0; |
1565 int16_t* tempdata; | 1565 int16_t* tempdata; |
1566 static int first_cng = 1; | 1566 static int first_cng = 1; |
1567 int16_t tempLen; | 1567 int16_t tempLen; |
1568 | 1568 |
1569 *vad = 1; | 1569 *vad = 1; |
1570 | 1570 |
1571 // check VAD first | 1571 // check VAD first |
1572 if (useVAD) { | 1572 if (useVAD) { |
1573 *vad = 0; | 1573 *vad = 0; |
1574 | 1574 |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1832 memmove(ptrL + stride, ptrL, ptrR - ptrL); | 1832 memmove(ptrL + stride, ptrL, ptrR - ptrL); |
1833 | 1833 |
1834 // copy from temp to left pointer | 1834 // copy from temp to left pointer |
1835 memcpy(ptrL, temp, stride); | 1835 memcpy(ptrL, temp, stride); |
1836 | 1836 |
1837 // advance pointers | 1837 // advance pointers |
1838 ptrL += stride * 2; | 1838 ptrL += stride * 2; |
1839 ptrR += stride; | 1839 ptrR += stride; |
1840 } | 1840 } |
1841 } | 1841 } |
OLD | NEW |