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

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: Rebase onto cleanup change 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 EXPECT_EQ(kNumPlc, stats.decoded_plc); 284 EXPECT_EQ(kNumPlc, stats.decoded_plc);
285 EXPECT_EQ(kNumPlcCng, stats.decoded_plc_cng); 285 EXPECT_EQ(kNumPlcCng, stats.decoded_plc_cng);
286 } 286 }
287 287
288 TEST_F(AudioCodingModuleTestOldApi, VerifyOutputFrame) { 288 TEST_F(AudioCodingModuleTestOldApi, VerifyOutputFrame) {
289 AudioFrame audio_frame; 289 AudioFrame audio_frame;
290 const int kSampleRateHz = 32000; 290 const int kSampleRateHz = 32000;
291 EXPECT_EQ(0, acm_->PlayoutData10Ms(kSampleRateHz, &audio_frame)); 291 EXPECT_EQ(0, acm_->PlayoutData10Ms(kSampleRateHz, &audio_frame));
292 EXPECT_EQ(id_, audio_frame.id_); 292 EXPECT_EQ(id_, audio_frame.id_);
293 EXPECT_EQ(0u, audio_frame.timestamp_); 293 EXPECT_EQ(0u, audio_frame.timestamp_);
294 EXPECT_GT(audio_frame.num_channels_, 0); 294 EXPECT_GT(audio_frame.num_channels_, 0u);
295 EXPECT_EQ(static_cast<size_t>(kSampleRateHz / 100), 295 EXPECT_EQ(static_cast<size_t>(kSampleRateHz / 100),
296 audio_frame.samples_per_channel_); 296 audio_frame.samples_per_channel_);
297 EXPECT_EQ(kSampleRateHz, audio_frame.sample_rate_hz_); 297 EXPECT_EQ(kSampleRateHz, audio_frame.sample_rate_hz_);
298 } 298 }
299 299
300 TEST_F(AudioCodingModuleTestOldApi, FailOnZeroDesiredFrequency) { 300 TEST_F(AudioCodingModuleTestOldApi, FailOnZeroDesiredFrequency) {
301 AudioFrame audio_frame; 301 AudioFrame audio_frame;
302 EXPECT_EQ(-1, acm_->PlayoutData10Ms(0, &audio_frame)); 302 EXPECT_EQ(-1, acm_->PlayoutData10Ms(0, &audio_frame));
303 } 303 }
304 304
(...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after
1747 Run(16000, 8000, 1000); 1747 Run(16000, 8000, 1000);
1748 } 1748 }
1749 1749
1750 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { 1750 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) {
1751 Run(8000, 16000, 1000); 1751 Run(8000, 16000, 1000);
1752 } 1752 }
1753 1753
1754 #endif 1754 #endif
1755 1755
1756 } // namespace webrtc 1756 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698