Index: webrtc/common_audio/signal_processing/auto_correlation.c |
diff --git a/webrtc/common_audio/signal_processing/auto_correlation.c b/webrtc/common_audio/signal_processing/auto_correlation.c |
index 405a08ecaff527f329e66abd49fbf2155d636e7c..8d6c879ca77986ffdc30a0a28a7c23f3e6bc4346 100644 |
--- a/webrtc/common_audio/signal_processing/auto_correlation.c |
+++ b/webrtc/common_audio/signal_processing/auto_correlation.c |
@@ -11,20 +11,18 @@ |
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" |
int WebRtcSpl_AutoCorrelation(const int16_t* in_vector, |
- int in_vector_length, |
- int order, |
+ size_t in_vector_length, |
+ size_t order, |
int32_t* result, |
int* scale) { |
int32_t sum = 0; |
- int i = 0, j = 0; |
+ size_t i = 0, j = 0; |
int16_t smax = 0; |
int scaling = 0; |
if (order > in_vector_length) { |
Andrew MacDonald
2015/07/22 19:54:58
assert this instead and return a size_t?
|
/* Undefined */ |
return -1; |
- } else if (order < 0) { |
- order = in_vector_length; |
} |
// Find the maximum absolute value of the samples. |
@@ -64,5 +62,5 @@ int WebRtcSpl_AutoCorrelation(const int16_t* in_vector, |
} |
*scale = scaling; |
- return order + 1; |
+ return (int)(order + 1); |
} |