| 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 } else { | 191 } else { |
| 192 SwitchingSamplingRate(testNr, 80); | 192 SwitchingSamplingRate(testNr, 80); |
| 193 } | 193 } |
| 194 } | 194 } |
| 195 | 195 |
| 196 void ISACTest::Run10ms() { | 196 void ISACTest::Run10ms() { |
| 197 AudioFrame audioFrame; | 197 AudioFrame audioFrame; |
| 198 EXPECT_GT(_inFileA.Read10MsData(audioFrame), 0); | 198 EXPECT_GT(_inFileA.Read10MsData(audioFrame), 0); |
| 199 EXPECT_GE(_acmA->Add10MsData(audioFrame), 0); | 199 EXPECT_GE(_acmA->Add10MsData(audioFrame), 0); |
| 200 EXPECT_GE(_acmB->Add10MsData(audioFrame), 0); | 200 EXPECT_GE(_acmB->Add10MsData(audioFrame), 0); |
| 201 EXPECT_EQ(0, _acmA->PlayoutData10Ms(32000, &audioFrame)); | 201 bool muted; |
| 202 EXPECT_EQ(0, _acmA->PlayoutData10Ms(32000, &audioFrame, &muted)); |
| 203 ASSERT_FALSE(muted); |
| 202 _outFileA.Write10MsData(audioFrame); | 204 _outFileA.Write10MsData(audioFrame); |
| 203 EXPECT_EQ(0, _acmB->PlayoutData10Ms(32000, &audioFrame)); | 205 EXPECT_EQ(0, _acmB->PlayoutData10Ms(32000, &audioFrame, &muted)); |
| 206 ASSERT_FALSE(muted); |
| 204 _outFileB.Write10MsData(audioFrame); | 207 _outFileB.Write10MsData(audioFrame); |
| 205 } | 208 } |
| 206 | 209 |
| 207 void ISACTest::EncodeDecode(int testNr, ACMTestISACConfig& wbISACConfig, | 210 void ISACTest::EncodeDecode(int testNr, ACMTestISACConfig& wbISACConfig, |
| 208 ACMTestISACConfig& swbISACConfig) { | 211 ACMTestISACConfig& swbISACConfig) { |
| 209 // Files in Side A and B | 212 // Files in Side A and B |
| 210 _inFileA.Open(file_name_swb_, 32000, "rb", true); | 213 _inFileA.Open(file_name_swb_, 32000, "rb", true); |
| 211 _inFileB.Open(file_name_swb_, 32000, "rb", true); | 214 _inFileB.Open(file_name_swb_, 32000, "rb", true); |
| 212 | 215 |
| 213 std::string file_name_out; | 216 std::string file_name_out; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 numSendCodecChanged++; | 336 numSendCodecChanged++; |
| 334 } | 337 } |
| 335 } | 338 } |
| 336 _outFileA.Close(); | 339 _outFileA.Close(); |
| 337 _outFileB.Close(); | 340 _outFileB.Close(); |
| 338 _inFileA.Close(); | 341 _inFileA.Close(); |
| 339 _inFileB.Close(); | 342 _inFileB.Close(); |
| 340 } | 343 } |
| 341 | 344 |
| 342 } // namespace webrtc | 345 } // namespace webrtc |
| OLD | NEW |