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

Unified Diff: webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.cc

Issue 1228843002: Update audio code to use size_t more correctly, (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Review comments 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.cc
diff --git a/webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.cc b/webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.cc
index 1c76d761e925ed39362c77d14777c816748eff73..57397e14a3812ed6b5522b7d5b569134097a677e 100644
--- a/webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.cc
+++ b/webrtc/modules/audio_coding/neteq/tools/neteq_performance_test.cc
@@ -101,19 +101,19 @@ int64_t NetEqPerformanceTest::Run(int runtime_ms,
// Get output audio, but don't do anything with it.
static const int kMaxChannels = 1;
- static const int kMaxSamplesPerMs = 48000 / 1000;
+ static const size_t kMaxSamplesPerMs = 48000 / 1000;
static const int kOutputBlockSizeMs = 10;
- static const int kOutDataLen =
+ static const size_t kOutDataLen =
kOutputBlockSizeMs * kMaxSamplesPerMs * kMaxChannels;
int16_t out_data[kOutDataLen];
int num_channels;
- int samples_per_channel;
+ size_t samples_per_channel;
int error = neteq->GetAudio(kOutDataLen, out_data, &samples_per_channel,
&num_channels, NULL);
if (error != NetEq::kOK)
return -1;
- assert(samples_per_channel == kSampRateHz * 10 / 1000);
+ assert(samples_per_channel == static_cast<size_t>(kSampRateHz * 10 / 1000));
time_now_ms += kOutputBlockSizeMs;
if (time_now_ms >= runtime_ms / 2 && !drift_flipped) {

Powered by Google App Engine
This is Rietveld 408576698