| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "webrtc/test/gtest.h" |
| 13 #include "webrtc/modules/audio_coding/codecs/isac/main/include/isac.h" | 13 #include "webrtc/modules/audio_coding/codecs/isac/main/include/isac.h" |
| 14 #include "webrtc/test/testsupport/fileutils.h" | 14 #include "webrtc/test/testsupport/fileutils.h" |
| 15 | 15 |
| 16 struct WebRtcISACStruct; | 16 struct WebRtcISACStruct; |
| 17 | 17 |
| 18 namespace webrtc { | 18 namespace webrtc { |
| 19 | 19 |
| 20 // Number of samples in a 60 ms, sampled at 32 kHz. | 20 // Number of samples in a 60 ms, sampled at 32 kHz. |
| 21 const int kIsacNumberOfSamples = 320 * 6; | 21 const int kIsacNumberOfSamples = 320 * 6; |
| 22 // Maximum number of bytes in output bitstream. | 22 // Maximum number of bytes in output bitstream. |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // Call to update bandwidth estimator with real data. | 102 // Call to update bandwidth estimator with real data. |
| 103 EXPECT_EQ(0, WebRtcIsac_UpdateBwEstimate(isac_codec_, bitstream_, | 103 EXPECT_EQ(0, WebRtcIsac_UpdateBwEstimate(isac_codec_, bitstream_, |
| 104 static_cast<size_t>(encoded_bytes), | 104 static_cast<size_t>(encoded_bytes), |
| 105 1, 12345, 56789)); | 105 1, 12345, 56789)); |
| 106 | 106 |
| 107 // Free memory. | 107 // Free memory. |
| 108 EXPECT_EQ(0, WebRtcIsac_Free(isac_codec_)); | 108 EXPECT_EQ(0, WebRtcIsac_Free(isac_codec_)); |
| 109 } | 109 } |
| 110 | 110 |
| 111 } // namespace webrtc | 111 } // namespace webrtc |
| OLD | NEW |