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

Side by Side Diff: webrtc/modules/audio_coding/main/acm2/audio_coding_module_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, 4 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 EXPECT_EQ(kNumPlcCng, stats.decoded_plc_cng); 265 EXPECT_EQ(kNumPlcCng, stats.decoded_plc_cng);
266 } 266 }
267 267
268 TEST_F(AudioCodingModuleTest, VerifyOutputFrame) { 268 TEST_F(AudioCodingModuleTest, VerifyOutputFrame) {
269 CreateAcm(); 269 CreateAcm();
270 AudioFrame audio_frame; 270 AudioFrame audio_frame;
271 const int kSampleRateHz = 32000; 271 const int kSampleRateHz = 32000;
272 EXPECT_TRUE(acm_->Get10MsAudio(&audio_frame)); 272 EXPECT_TRUE(acm_->Get10MsAudio(&audio_frame));
273 EXPECT_EQ(0u, audio_frame.timestamp_); 273 EXPECT_EQ(0u, audio_frame.timestamp_);
274 EXPECT_GT(audio_frame.num_channels_, 0); 274 EXPECT_GT(audio_frame.num_channels_, 0);
275 EXPECT_EQ(kSampleRateHz / 100, audio_frame.samples_per_channel_); 275 EXPECT_EQ(static_cast<size_t>(kSampleRateHz / 100),
276 audio_frame.samples_per_channel_);
276 EXPECT_EQ(kSampleRateHz, audio_frame.sample_rate_hz_); 277 EXPECT_EQ(kSampleRateHz, audio_frame.sample_rate_hz_);
277 } 278 }
278 279
279 // A multi-threaded test for ACM. This base class is using the PCM16b 16 kHz 280 // A multi-threaded test for ACM. This base class is using the PCM16b 16 kHz
280 // codec, while the derive class AcmIsacMtTest is using iSAC. 281 // codec, while the derive class AcmIsacMtTest is using iSAC.
281 class AudioCodingModuleMtTest : public AudioCodingModuleTest { 282 class AudioCodingModuleMtTest : public AudioCodingModuleTest {
282 protected: 283 protected:
283 static const int kNumPackets = 500; 284 static const int kNumPackets = 500;
284 static const int kNumPullCalls = 500; 285 static const int kNumPullCalls = 500;
285 286
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 "d781cce1ab986b618d0da87226cdde30", 964 "d781cce1ab986b618d0da87226cdde30",
964 "1a1fe04dd12e755949987c8d729fb3e0", 965 "1a1fe04dd12e755949987c8d729fb3e0",
965 "d781cce1ab986b618d0da87226cdde30"), 966 "d781cce1ab986b618d0da87226cdde30"),
966 50, 967 50,
967 test::AcmReceiveTest::kStereoOutput); 968 test::AcmReceiveTest::kStereoOutput);
968 } 969 }
969 970
970 #endif 971 #endif
971 972
972 } // namespace webrtc 973 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698