Index: webrtc/tools/agc/test_utils.cc |
diff --git a/webrtc/tools/agc/test_utils.cc b/webrtc/tools/agc/test_utils.cc |
index 3a26cb9ac79a45fc39ac969f33f3ec50f40e9b98..81819c598e38aa7784a5eac20e7ab544506f007d 100644 |
--- a/webrtc/tools/agc/test_utils.cc |
+++ b/webrtc/tools/agc/test_utils.cc |
@@ -27,11 +27,12 @@ float Db2Linear(float db) { |
} |
void ApplyGainLinear(float gain, float last_gain, AudioFrame* frame) { |
- const int frame_length = frame->samples_per_channel_ * frame->num_channels_; |
+ const size_t frame_length = |
+ frame->samples_per_channel_ * frame->num_channels_; |
// Smooth the transition between gain levels across the frame. |
float smoothed_gain = last_gain; |
float gain_step = (gain - last_gain) / (frame_length - 1); |
- for (int i = 0; i < frame_length; ++i) { |
+ for (size_t i = 0; i < frame_length; ++i) { |
smoothed_gain += gain_step; |
float sample = std::floor(frame->data_[i] * smoothed_gain + 0.5); |
sample = std::max(std::min(32767.0f, sample), -32768.0f); |