Chromium Code Reviews| 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 7d5de7d92a54b2fed4065ccee72a7990ce03d4a2..146899457e2141e272e0d046dcaa3dfe0e1af632 100644 |
| --- a/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h |
| +++ b/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h |
| @@ -12,6 +12,7 @@ |
| #define WEBRTC_MODULES_AUDIO_PROCESSING_INTELLIGIBILITY_INTELLIGIBILITY_UTILS_H_ |
| #include <complex> |
| +#include <vector> |
| #include "webrtc/base/scoped_ptr.h" |
| @@ -27,22 +28,16 @@ class PowerEstimator { |
| PowerEstimator(size_t freqs, float decay); |
| // Add a new data point to the series. |
| + void Step(const float* data); |
| void Step(const std::complex<float>* data); |
| // The current power array. |
| - const float* Power(); |
| + const float* power() { return &power_[0]; }; |
|
hlundin-webrtc
2016/02/15 13:05:12
Why not return a const std::vector<float>&?
aluebs-webrtc
2016/02/19 03:56:31
Done.
|
| private: |
| - // TODO(ekmeyerson): Switch the following running means |
| - // and histories from rtc::scoped_ptr to std::vector. |
| - rtc::scoped_ptr<std::complex<float>[]> running_mean_sq_; |
| - |
| - // The current magnitude array. |
| - rtc::scoped_ptr<float[]> magnitude_; |
| // The current power array. |
| - rtc::scoped_ptr<float[]> power_; |
| + std::vector<float> power_; |
| - const size_t num_freqs_; |
| const float decay_; |
| }; |