Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Side by Side Diff: webrtc/tools/agc/agc_manager_unittest.cc

Issue 1230503003: Update a ton of audio code to use size_t more correctly and in general reduce (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/tools/agc/agc_manager.cc ('k') | webrtc/tools/agc/test_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « webrtc/tools/agc/agc_manager.cc ('k') | webrtc/tools/agc/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698