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

Side by Side Diff: webrtc/modules/audio_processing/audio_processing_impl_locking_unittest.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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 } 470 }
471 } 471 }
472 } 472 }
473 473
474 // Populates an audioframe frame of AudioFrame type with random data. 474 // Populates an audioframe frame of AudioFrame type with random data.
475 void PopulateAudioFrame(AudioFrame* frame, 475 void PopulateAudioFrame(AudioFrame* frame,
476 int16_t amplitude, 476 int16_t amplitude,
477 RandomGenerator* rand_gen) { 477 RandomGenerator* rand_gen) {
478 ASSERT_GT(amplitude, 0); 478 ASSERT_GT(amplitude, 0);
479 ASSERT_LE(amplitude, 32767); 479 ASSERT_LE(amplitude, 32767);
480 for (int ch = 0; ch < frame->num_channels_; ch++) { 480 for (size_t ch = 0; ch < frame->num_channels_; ch++) {
481 for (size_t k = 0; k < frame->samples_per_channel_; k++) { 481 for (size_t k = 0; k < frame->samples_per_channel_; k++) {
482 // Store random 16 bit number between -(amplitude+1) and 482 // Store random 16 bit number between -(amplitude+1) and
483 // amplitude. 483 // amplitude.
484 frame->data_[k * ch] = 484 frame->data_[k * ch] =
485 rand_gen->RandInt(2 * amplitude + 1) - amplitude - 1; 485 rand_gen->RandInt(2 * amplitude + 1) - amplitude - 1;
486 } 486 }
487 } 487 }
488 } 488 }
489 489
490 AudioProcessingImplLockTest::AudioProcessingImplLockTest() 490 AudioProcessingImplLockTest::AudioProcessingImplLockTest()
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 DISABLED_AudioProcessingImplLockExtensive, 1124 DISABLED_AudioProcessingImplLockExtensive,
1125 AudioProcessingImplLockTest, 1125 AudioProcessingImplLockTest,
1126 ::testing::ValuesIn(TestConfig::GenerateExtensiveTestConfigs())); 1126 ::testing::ValuesIn(TestConfig::GenerateExtensiveTestConfigs()));
1127 1127
1128 INSTANTIATE_TEST_CASE_P( 1128 INSTANTIATE_TEST_CASE_P(
1129 AudioProcessingImplLockBrief, 1129 AudioProcessingImplLockBrief,
1130 AudioProcessingImplLockTest, 1130 AudioProcessingImplLockTest,
1131 ::testing::ValuesIn(TestConfig::GenerateBriefTestConfigs())); 1131 ::testing::ValuesIn(TestConfig::GenerateBriefTestConfigs()));
1132 1132
1133 } // namespace webrtc 1133 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl.cc ('k') | webrtc/modules/audio_processing/beamformer/complex_matrix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698