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

Side by Side Diff: webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc

Issue 1316523002: Convert channel counts to size_t. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Fix compile Created 4 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 EXPECT_EQ(kNumPlc, stats.decoded_plc); 293 EXPECT_EQ(kNumPlc, stats.decoded_plc);
294 EXPECT_EQ(kNumPlcCng, stats.decoded_plc_cng); 294 EXPECT_EQ(kNumPlcCng, stats.decoded_plc_cng);
295 } 295 }
296 296
297 TEST_F(AudioCodingModuleTestOldApi, VerifyOutputFrame) { 297 TEST_F(AudioCodingModuleTestOldApi, VerifyOutputFrame) {
298 AudioFrame audio_frame; 298 AudioFrame audio_frame;
299 const int kSampleRateHz = 32000; 299 const int kSampleRateHz = 32000;
300 EXPECT_EQ(0, acm_->PlayoutData10Ms(kSampleRateHz, &audio_frame)); 300 EXPECT_EQ(0, acm_->PlayoutData10Ms(kSampleRateHz, &audio_frame));
301 EXPECT_EQ(id_, audio_frame.id_); 301 EXPECT_EQ(id_, audio_frame.id_);
302 EXPECT_EQ(0u, audio_frame.timestamp_); 302 EXPECT_EQ(0u, audio_frame.timestamp_);
303 EXPECT_GT(audio_frame.num_channels_, 0); 303 EXPECT_GT(audio_frame.num_channels_, 0u);
304 EXPECT_EQ(static_cast<size_t>(kSampleRateHz / 100), 304 EXPECT_EQ(static_cast<size_t>(kSampleRateHz / 100),
305 audio_frame.samples_per_channel_); 305 audio_frame.samples_per_channel_);
306 EXPECT_EQ(kSampleRateHz, audio_frame.sample_rate_hz_); 306 EXPECT_EQ(kSampleRateHz, audio_frame.sample_rate_hz_);
307 } 307 }
308 308
309 TEST_F(AudioCodingModuleTestOldApi, FailOnZeroDesiredFrequency) { 309 TEST_F(AudioCodingModuleTestOldApi, FailOnZeroDesiredFrequency) {
310 AudioFrame audio_frame; 310 AudioFrame audio_frame;
311 EXPECT_EQ(-1, acm_->PlayoutData10Ms(0, &audio_frame)); 311 EXPECT_EQ(-1, acm_->PlayoutData10Ms(0, &audio_frame));
312 } 312 }
313 313
(...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after
1780 Run(16000, 8000, 1000); 1780 Run(16000, 8000, 1000);
1781 } 1781 }
1782 1782
1783 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { 1783 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) {
1784 Run(8000, 16000, 1000); 1784 Run(8000, 16000, 1000);
1785 } 1785 }
1786 1786
1787 #endif 1787 #endif
1788 1788
1789 } // namespace webrtc 1789 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/acm2/audio_coding_module_impl.cc ('k') | webrtc/modules/audio_coding/acm2/codec_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698