Index: webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h |
diff --git a/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h b/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h |
index fa0e974ad976b0d87221c5bea13dd02a8de5da66..4ac11671474dcde823379be25990532684a499ea 100644 |
--- a/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h |
+++ b/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h |
@@ -36,10 +36,12 @@ std::complex<float> zerofudge(std::complex<float> c); |
// mean |mean| with added |data|. |
std::complex<float> NewMean(std::complex<float> mean, |
std::complex<float> data, |
- int count); |
+ size_t count); |
// Updates |mean| with added |data|; |
-void AddToMean(std::complex<float> data, int count, std::complex<float>* mean); |
+void AddToMean(std::complex<float> data, |
+ size_t count, |
+ std::complex<float>* mean); |
// Internal helper for computing the variances of a stream of arrays. |
// The result is an array of variances per position: the i-th variance |
@@ -70,7 +72,7 @@ class VarianceArray { |
// |window_size| is the number of samples for kStepWindowed and |
// the number of blocks for kStepBlocked. |decay| is the forgetting factor |
// for kStepDecaying. |
- VarianceArray(int freqs, StepType type, int window_size, float decay); |
+ VarianceArray(size_t freqs, StepType type, size_t window_size, float decay); |
// Add a new data point to the series and compute the new variances. |
// TODO(bercic) |skip_fudge| is a flag for kStepWindowed and kStepDecaying, |
@@ -119,11 +121,11 @@ class VarianceArray { |
rtc::scoped_ptr<float[]> variance_; |
rtc::scoped_ptr<float[]> conj_sum_; |
- const int num_freqs_; |
- const int window_size_; |
+ const size_t num_freqs_; |
+ const size_t window_size_; |
const float decay_; |
- int history_cursor_; |
- int count_; |
+ size_t history_cursor_; |
+ size_t count_; |
float array_mean_; |
bool buffer_full_; |
void (VarianceArray::*step_func_)(const std::complex<float>*, bool); |
@@ -134,7 +136,7 @@ class VarianceArray { |
// constrained by a limit on the magnitude of the changes. |
class GainApplier { |
public: |
- GainApplier(int freqs, float change_limit); |
+ GainApplier(size_t freqs, float change_limit); |
// Copy |in_block| to |out_block|, multiplied by the current set of gains, |
// and step the current set of gains towards the target set. |
@@ -145,7 +147,7 @@ class GainApplier { |
float* target() const { return target_.get(); } |
private: |
- const int num_freqs_; |
+ const size_t num_freqs_; |
const float change_limit_; |
rtc::scoped_ptr<float[]> target_; |
rtc::scoped_ptr<float[]> current_; |