| 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 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 using ::testing::Mock; | 26 using ::testing::Mock; |
| 27 using ::testing::Return; | 27 using ::testing::Return; |
| 28 using ::testing::SetArgPointee; | 28 using ::testing::SetArgPointee; |
| 29 using ::testing::SetArgReferee; | 29 using ::testing::SetArgReferee; |
| 30 | 30 |
| 31 namespace webrtc { | 31 namespace webrtc { |
| 32 namespace { | 32 namespace { |
| 33 | 33 |
| 34 const int kSampleRateHz = 32000; | 34 const int kSampleRateHz = 32000; |
| 35 const int kNumChannels = 1; | 35 const int kNumChannels = 1; |
| 36 const int kSamplesPerChannel = kSampleRateHz / 100; | 36 const size_t kSamplesPerChannel = static_cast<size_t>(kSampleRateHz / 100); |
| 37 const float kAboveClippedThreshold = 0.2f; | 37 const float kAboveClippedThreshold = 0.2f; |
| 38 | 38 |
| 39 } // namespace | 39 } // namespace |
| 40 | 40 |
| 41 class AgcManagerUnitTest : public ::testing::Test { | 41 class AgcManagerUnitTest : public ::testing::Test { |
| 42 protected: | 42 protected: |
| 43 AgcManagerUnitTest() | 43 AgcManagerUnitTest() |
| 44 : media_(), | 44 : media_(), |
| 45 volume_(), | 45 volume_(), |
| 46 agc_(new MockAgc), | 46 agc_(new MockAgc), |
| (...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 SetVolumeAndProcess(128u); | 732 SetVolumeAndProcess(128u); |
| 733 EXPECT_CALL(*agc_, GetRmsErrorDb(_)) | 733 EXPECT_CALL(*agc_, GetRmsErrorDb(_)) |
| 734 .WillRepeatedly(DoAll(SetArgPointee<0>(30), Return(true))); | 734 .WillRepeatedly(DoAll(SetArgPointee<0>(30), Return(true))); |
| 735 EXPECT_CALL(volume_, GetMicVolume(_)) | 735 EXPECT_CALL(volume_, GetMicVolume(_)) |
| 736 .WillRepeatedly(DoAll(SetArgReferee<0>(0), Return(0))); | 736 .WillRepeatedly(DoAll(SetArgReferee<0>(0), Return(0))); |
| 737 EXPECT_CALL(volume_, SetMicVolume(_)).Times(0); | 737 EXPECT_CALL(volume_, SetMicVolume(_)).Times(0); |
| 738 PostProcCallback(10); | 738 PostProcCallback(10); |
| 739 } | 739 } |
| 740 | 740 |
| 741 } // namespace webrtc | 741 } // namespace webrtc |
| OLD | NEW |