Index: webrtc/modules/audio_coding/neteq/dtmf_tone_generator.cc |
diff --git a/webrtc/modules/audio_coding/neteq/dtmf_tone_generator.cc b/webrtc/modules/audio_coding/neteq/dtmf_tone_generator.cc |
index 45601c04d42c2cd1191ab2f64f44ce969a5d2fb3..f4d5190c615ab2c0ecd3eddd007b6c1301522ce8 100644 |
--- a/webrtc/modules/audio_coding/neteq/dtmf_tone_generator.cc |
+++ b/webrtc/modules/audio_coding/neteq/dtmf_tone_generator.cc |
@@ -149,18 +149,18 @@ void DtmfToneGenerator::Reset() { |
} |
// Generate num_samples of DTMF signal and write to |output|. |
-int DtmfToneGenerator::Generate(int num_samples, |
+int DtmfToneGenerator::Generate(size_t num_samples, |
AudioMultiVector* output) { |
if (!initialized_) { |
return kNotInitialized; |
} |
- if (num_samples < 0 || !output) { |
+ if (!output) { |
return kParameterError; |
} |
output->AssertSize(num_samples); |
- for (int i = 0; i < num_samples; ++i) { |
+ for (size_t i = 0; i < num_samples; ++i) { |
// Use recursion formula y[n] = a * y[n - 1] - y[n - 2]. |
int16_t temp_val_low = ((coeff1_ * sample_history1_[1] + 8192) >> 14) |
- sample_history1_[0]; |
@@ -186,7 +186,7 @@ int DtmfToneGenerator::Generate(int num_samples, |
output->CopyChannel(0, channel); |
} |
- return num_samples; |
+ return static_cast<int>(num_samples); |
} |
bool DtmfToneGenerator::initialized() const { |