| Index: webrtc/modules/audio_coding/main/acm2/acm_resampler.cc
|
| diff --git a/webrtc/modules/audio_coding/main/acm2/acm_resampler.cc b/webrtc/modules/audio_coding/main/acm2/acm_resampler.cc
|
| index 2650725331b94e5db5e110836704d11082657ec6..13c8f9d5e8639231e9816b4873b00f24687b1e5a 100644
|
| --- a/webrtc/modules/audio_coding/main/acm2/acm_resampler.cc
|
| +++ b/webrtc/modules/audio_coding/main/acm2/acm_resampler.cc
|
| @@ -28,11 +28,10 @@ ACMResampler::~ACMResampler() {
|
| int ACMResampler::Resample10Msec(const int16_t* in_audio,
|
| int in_freq_hz,
|
| int out_freq_hz,
|
| - int num_audio_channels,
|
| + size_t num_audio_channels,
|
| size_t out_capacity_samples,
|
| int16_t* out_audio) {
|
| - size_t in_length = static_cast<size_t>(in_freq_hz * num_audio_channels / 100);
|
| - int out_length = out_freq_hz * num_audio_channels / 100;
|
| + size_t in_length = in_freq_hz * num_audio_channels / 100;
|
| if (in_freq_hz == out_freq_hz) {
|
| if (out_capacity_samples < in_length) {
|
| assert(false);
|
| @@ -49,7 +48,7 @@ int ACMResampler::Resample10Msec(const int16_t* in_audio,
|
| return -1;
|
| }
|
|
|
| - out_length =
|
| + int out_length =
|
| resampler_.Resample(in_audio, in_length, out_audio, out_capacity_samples);
|
| if (out_length == -1) {
|
| LOG_FERR4(LS_ERROR,
|
| @@ -61,7 +60,7 @@ int ACMResampler::Resample10Msec(const int16_t* in_audio,
|
| return -1;
|
| }
|
|
|
| - return out_length / num_audio_channels;
|
| + return static_cast<int>(out_length / num_audio_channels);
|
| }
|
|
|
| } // namespace acm2
|
|
|