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 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
855 | 855 |
856 TEST_F(ApmTest, ChannelsInt16Interface) { | 856 TEST_F(ApmTest, ChannelsInt16Interface) { |
857 // Testing number of invalid and valid channels. | 857 // Testing number of invalid and valid channels. |
858 Init(16000, 16000, 16000, 4, 4, 4, false); | 858 Init(16000, 16000, 16000, 4, 4, 4, false); |
859 | 859 |
860 TestChangingChannelsInt16Interface(0, apm_->kBadNumberChannelsError); | 860 TestChangingChannelsInt16Interface(0, apm_->kBadNumberChannelsError); |
861 | 861 |
862 for (size_t i = 1; i < 4; i++) { | 862 for (size_t i = 1; i < 4; i++) { |
863 TestChangingChannelsInt16Interface(i, kNoErr); | 863 TestChangingChannelsInt16Interface(i, kNoErr); |
864 EXPECT_EQ(i, apm_->num_input_channels()); | 864 EXPECT_EQ(i, apm_->num_input_channels()); |
865 // We always force the number of reverse channels used for processing to 1. | |
peah-webrtc
2017/05/19 08:07:47
The changes in this CL breaks this test.
As this
| |
866 EXPECT_EQ(1u, apm_->num_reverse_channels()); | |
867 } | 865 } |
868 } | 866 } |
869 | 867 |
870 TEST_F(ApmTest, Channels) { | 868 TEST_F(ApmTest, Channels) { |
871 // Testing number of invalid and valid channels. | 869 // Testing number of invalid and valid channels. |
872 Init(16000, 16000, 16000, 4, 4, 4, false); | 870 Init(16000, 16000, 16000, 4, 4, 4, false); |
873 | 871 |
874 TestChangingForwardChannels(0, 1, apm_->kBadNumberChannelsError); | 872 TestChangingForwardChannels(0, 1, apm_->kBadNumberChannelsError); |
875 TestChangingReverseChannels(0, apm_->kBadNumberChannelsError); | 873 TestChangingReverseChannels(0, apm_->kBadNumberChannelsError); |
876 | 874 |
(...skipping 2001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2878 // TODO(peah): Remove the testing for | 2876 // TODO(peah): Remove the testing for |
2879 // apm->capture_nonlocked_.level_controller_enabled once the value in config_ | 2877 // apm->capture_nonlocked_.level_controller_enabled once the value in config_ |
2880 // is instead used to activate the level controller. | 2878 // is instead used to activate the level controller. |
2881 EXPECT_FALSE(apm->capture_nonlocked_.level_controller_enabled); | 2879 EXPECT_FALSE(apm->capture_nonlocked_.level_controller_enabled); |
2882 EXPECT_NEAR(kTargetLcPeakLeveldBFS, | 2880 EXPECT_NEAR(kTargetLcPeakLeveldBFS, |
2883 apm->config_.level_controller.initial_peak_level_dbfs, | 2881 apm->config_.level_controller.initial_peak_level_dbfs, |
2884 std::numeric_limits<float>::epsilon()); | 2882 std::numeric_limits<float>::epsilon()); |
2885 } | 2883 } |
2886 | 2884 |
2887 } // namespace webrtc | 2885 } // namespace webrtc |
OLD | NEW |