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

Side by Side Diff: modules/audio_mixer/frame_combiner_unittest.cc

Issue 3019543002: Remove various IDs (Closed)
Patch Set: rebase+build error Created 3 years, 2 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 | « modules/audio_mixer/frame_combiner.cc ('k') | modules/include/module_common_types.h » ('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) 2017 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2017 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 ss << "wave frequency: " << wave_frequency << " ,"; 46 ss << "wave frequency: " << wave_frequency << " ,";
47 return ss.str(); 47 return ss.str();
48 } 48 }
49 49
50 AudioFrame frame1; 50 AudioFrame frame1;
51 AudioFrame frame2; 51 AudioFrame frame2;
52 AudioFrame audio_frame_for_mixing; 52 AudioFrame audio_frame_for_mixing;
53 53
54 void SetUpFrames(int sample_rate_hz, int number_of_channels) { 54 void SetUpFrames(int sample_rate_hz, int number_of_channels) {
55 for (auto* frame : {&frame1, &frame2}) { 55 for (auto* frame : {&frame1, &frame2}) {
56 frame->UpdateFrame(-1, 0, nullptr, 56 frame->UpdateFrame(0, nullptr, rtc::CheckedDivExact(sample_rate_hz, 100),
57 rtc::CheckedDivExact(sample_rate_hz, 100),
58 sample_rate_hz, AudioFrame::kNormalSpeech, 57 sample_rate_hz, AudioFrame::kNormalSpeech,
59 AudioFrame::kVadActive, number_of_channels); 58 AudioFrame::kVadActive, number_of_channels);
60 } 59 }
61 } 60 }
62 } // namespace 61 } // namespace
63 62
64 TEST(FrameCombiner, BasicApiCallsLimiter) { 63 TEST(FrameCombiner, BasicApiCallsLimiter) {
65 FrameCombiner combiner(true); 64 FrameCombiner combiner(true);
66 for (const int rate : {8000, 16000, 32000, 48000}) { 65 for (const int rate : {8000, 16000, 32000, 48000}) {
67 for (const int number_of_channels : {1, 2}) { 66 for (const int number_of_channels : {1, 2}) {
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 rtc::ArrayView<const int16_t>(frame1.data(), number_of_samples), 196 rtc::ArrayView<const int16_t>(frame1.data(), number_of_samples),
198 rtc::ArrayView<const int16_t>(audio_frame_for_mixing.data(), 197 rtc::ArrayView<const int16_t>(audio_frame_for_mixing.data(),
199 number_of_samples)); 198 number_of_samples));
200 } 199 }
201 RTC_DCHECK_LT(cumulative_change, 10); 200 RTC_DCHECK_LT(cumulative_change, 10);
202 } 201 }
203 } 202 }
204 } 203 }
205 } 204 }
206 } // namespace webrtc 205 } // namespace webrtc
OLDNEW
« no previous file with comments | « modules/audio_mixer/frame_combiner.cc ('k') | modules/include/module_common_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698