| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 for (auto rate : {8000, 16000, 32000, 48000}) { | 677 for (auto rate : {8000, 16000, 32000, 48000}) { |
| 678 for (auto variant : variants) { | 678 for (auto variant : variants) { |
| 679 SCOPED_TRACE(ProduceDebugText(rate, static_cast<int>(variant))); | 679 SCOPED_TRACE(ProduceDebugText(rate, static_cast<int>(variant))); |
| 680 EchoCanceller3Tester(rate).RunEchoLeakageVerificationTest(variant); | 680 EchoCanceller3Tester(rate).RunEchoLeakageVerificationTest(variant); |
| 681 } | 681 } |
| 682 } | 682 } |
| 683 } | 683 } |
| 684 | 684 |
| 685 TEST(EchoCanceller3, ConfigValidation) { | 685 TEST(EchoCanceller3, ConfigValidation) { |
| 686 AudioProcessing::Config::EchoCanceller3 config; | 686 AudioProcessing::Config::EchoCanceller3 config; |
| 687 | |
| 688 config.echo_decay = 0.f; | |
| 689 EXPECT_TRUE(EchoCanceller3::Validate(config)); | 687 EXPECT_TRUE(EchoCanceller3::Validate(config)); |
| 690 config.echo_decay = 0.9f; | |
| 691 EXPECT_TRUE(EchoCanceller3::Validate(config)); | |
| 692 config.echo_decay = -0.1f; | |
| 693 EXPECT_FALSE(EchoCanceller3::Validate(config)); | |
| 694 config.echo_decay = 1.0f; | |
| 695 EXPECT_FALSE(EchoCanceller3::Validate(config)); | |
| 696 config.echo_decay = 1.1f; | |
| 697 EXPECT_FALSE(EchoCanceller3::Validate(config)); | |
| 698 } | 688 } |
| 699 | 689 |
| 700 #if RTC_DCHECK_IS_ON && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) | 690 #if RTC_DCHECK_IS_ON && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) |
| 701 | 691 |
| 702 TEST(EchoCanceller3InputCheck, WrongCaptureNumBandsCheckVerification) { | 692 TEST(EchoCanceller3InputCheck, WrongCaptureNumBandsCheckVerification) { |
| 703 for (auto rate : {8000, 16000, 32000, 48000}) { | 693 for (auto rate : {8000, 16000, 32000, 48000}) { |
| 704 SCOPED_TRACE(ProduceDebugText(rate)); | 694 SCOPED_TRACE(ProduceDebugText(rate)); |
| 705 EchoCanceller3Tester(rate).RunProcessCaptureNumBandsCheckVerification(); | 695 EchoCanceller3Tester(rate).RunProcessCaptureNumBandsCheckVerification(); |
| 706 } | 696 } |
| 707 } | 697 } |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 TEST(EchoCanceller3InputCheck, DISABLED_WrongSampleRate) { | 746 TEST(EchoCanceller3InputCheck, DISABLED_WrongSampleRate) { |
| 757 ApmDataDumper data_dumper(0); | 747 ApmDataDumper data_dumper(0); |
| 758 EXPECT_DEATH( | 748 EXPECT_DEATH( |
| 759 EchoCanceller3(AudioProcessing::Config::EchoCanceller3(), 8001, false), | 749 EchoCanceller3(AudioProcessing::Config::EchoCanceller3(), 8001, false), |
| 760 ""); | 750 ""); |
| 761 } | 751 } |
| 762 | 752 |
| 763 #endif | 753 #endif |
| 764 | 754 |
| 765 } // namespace webrtc | 755 } // namespace webrtc |
| OLD | NEW |