| Index: webrtc/common_audio/window_generator.cc
|
| diff --git a/webrtc/common_audio/window_generator.cc b/webrtc/common_audio/window_generator.cc
|
| index 1d61368c196d581d59c22f86f7e2e88a7b069dd3..ae6cbc9d849d49dfcf2c1965f6785be2ec1a7c8d 100644
|
| --- a/webrtc/common_audio/window_generator.cc
|
| +++ b/webrtc/common_audio/window_generator.cc
|
| @@ -46,20 +46,20 @@ void WindowGenerator::Hanning(int length, float* window) {
|
| }
|
| }
|
|
|
| -void WindowGenerator::KaiserBesselDerived(float alpha, int length,
|
| +void WindowGenerator::KaiserBesselDerived(float alpha, size_t length,
|
| float* window) {
|
| - CHECK_GT(length, 1);
|
| + CHECK_GT(length, 1U);
|
| CHECK(window != nullptr);
|
|
|
| - const int half = (length + 1) / 2;
|
| + const size_t half = (length + 1) / 2;
|
| float sum = 0.0f;
|
|
|
| - for (int i = 0; i <= half; ++i) {
|
| + for (size_t i = 0; i <= half; ++i) {
|
| complex<float> r = (4.0f * i) / length - 1.0f;
|
| sum += I0(static_cast<float>(M_PI) * alpha * sqrt(1.0f - r * r)).real();
|
| window[i] = sum;
|
| }
|
| - for (int i = length - 1; i >= half; --i) {
|
| + for (size_t i = length - 1; i >= half; --i) {
|
| window[length - i - 1] = sqrtf(window[length - i - 1] / sum);
|
| window[i] = window[length - i - 1];
|
| }
|
|
|