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

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

Issue 3014683002: Revert of Remove various IDs (Closed)
Patch Set: 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(0, nullptr, rtc::CheckedDivExact(sample_rate_hz, 100), 56 frame->UpdateFrame(-1, 0, nullptr,
57 rtc::CheckedDivExact(sample_rate_hz, 100),
57 sample_rate_hz, AudioFrame::kNormalSpeech, 58 sample_rate_hz, AudioFrame::kNormalSpeech,
58 AudioFrame::kVadActive, number_of_channels); 59 AudioFrame::kVadActive, number_of_channels);
59 } 60 }
60 } 61 }
61 } // namespace 62 } // namespace
62 63
63 TEST(FrameCombiner, BasicApiCallsLimiter) { 64 TEST(FrameCombiner, BasicApiCallsLimiter) {
64 FrameCombiner combiner(true); 65 FrameCombiner combiner(true);
65 for (const int rate : {8000, 16000, 32000, 48000}) { 66 for (const int rate : {8000, 16000, 32000, 48000}) {
66 for (const int number_of_channels : {1, 2}) { 67 for (const int number_of_channels : {1, 2}) {
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 rtc::ArrayView<const int16_t>(frame1.data(), number_of_samples), 197 rtc::ArrayView<const int16_t>(frame1.data(), number_of_samples),
197 rtc::ArrayView<const int16_t>(audio_frame_for_mixing.data(), 198 rtc::ArrayView<const int16_t>(audio_frame_for_mixing.data(),
198 number_of_samples)); 199 number_of_samples));
199 } 200 }
200 RTC_DCHECK_LT(cumulative_change, 10); 201 RTC_DCHECK_LT(cumulative_change, 10);
201 } 202 }
202 } 203 }
203 } 204 }
204 } 205 }
205 } // namespace webrtc 206 } // 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