Chromium Code Reviews| Index: webrtc/modules/audio_coding/neteq/normal.cc |
| diff --git a/webrtc/modules/audio_coding/neteq/normal.cc b/webrtc/modules/audio_coding/neteq/normal.cc |
| index bf455c974c33c6ef0f42580822cb43d7f13e1723..a0ca7a50c7b4686cdb0a943bb701479dcea13410 100644 |
| --- a/webrtc/modules/audio_coding/neteq/normal.cc |
| +++ b/webrtc/modules/audio_coding/neteq/normal.cc |
| @@ -45,7 +45,7 @@ int Normal::Process(const int16_t* input, |
| output->PushBackInterleaved(input, length); |
| int16_t* signal = &(*output)[0][0]; |
| - const unsigned fs_mult = fs_hz_ / 8000; |
| + const size_t fs_mult = fs_hz_ / 8000; |
|
hlundin-webrtc
2015/08/10 11:30:01
not size_t
|
| assert(fs_mult > 0); |
| // fs_shift = log2(fs_mult), rounded down. |
| // Note that |fs_shift| is not "exact" for 48 kHz. |
| @@ -73,11 +73,10 @@ int Normal::Process(const int16_t* input, |
| int16_t* signal = &(*output)[channel_ix][0]; |
| size_t length_per_channel = length / output->Channels(); |
| // Find largest absolute value in new data. |
| - int16_t decoded_max = WebRtcSpl_MaxAbsValueW16( |
| - signal, static_cast<int>(length_per_channel)); |
| + int16_t decoded_max = |
| + WebRtcSpl_MaxAbsValueW16(signal, length_per_channel); |
| // Adjust muting factor if needed (to BGN level). |
| - int energy_length = std::min(static_cast<int>(fs_mult * 64), |
| - static_cast<int>(length_per_channel)); |
| + size_t energy_length = std::min(fs_mult * 64, length_per_channel); |
| int scaling = 6 + fs_shift |
| - WebRtcSpl_NormW32(decoded_max * decoded_max); |
| scaling = std::max(scaling, 0); // |scaling| should always be >= 0. |
| @@ -144,7 +143,7 @@ int Normal::Process(const int16_t* input, |
| } |
| } else if (last_mode == kModeRfc3389Cng) { |
| assert(output->Channels() == 1); // Not adapted for multi-channel yet. |
| - static const int kCngLength = 32; |
| + static const size_t kCngLength = 32; |
| int16_t cng_output[kCngLength]; |
| // Reset mute factor and start up fresh. |
| external_mute_factor_array[0] = 16384; |