| Index: webrtc/modules/audio_processing/intelligibility/intelligibility_proc.cc
|
| diff --git a/webrtc/modules/audio_processing/intelligibility/intelligibility_proc.cc b/webrtc/modules/audio_processing/intelligibility/intelligibility_proc.cc
|
| index 9f7d84e701af6b0a9f303866ae999e6dbec8c613..fbf6dd68f56fba62a33e6855285c273f5a8bedca 100644
|
| --- a/webrtc/modules/audio_processing/intelligibility/intelligibility_proc.cc
|
| +++ b/webrtc/modules/audio_processing/intelligibility/intelligibility_proc.cc
|
| @@ -33,9 +33,11 @@
|
| using std::complex;
|
|
|
| namespace webrtc {
|
| +namespace {
|
|
|
| -using webrtc::RealFourier;
|
| -using webrtc::IntelligibilityEnhancer;
|
| +bool ValidateClearWindow(const char* flagname, int32_t value) {
|
| + return value >= 0;
|
| +}
|
|
|
| DEFINE_int32(clear_type,
|
| webrtc::intelligibility::VarianceArray::kStepInfinite,
|
| @@ -44,6 +46,8 @@ DEFINE_double(clear_alpha, 0.9, "Variance decay factor for clear data.");
|
| DEFINE_int32(clear_window,
|
| 475,
|
| "Window size for windowed variance for clear data.");
|
| +const bool clear_window_dummy =
|
| + google::RegisterFlagValidator(&FLAGS_clear_window, &ValidateClearWindow);
|
| DEFINE_int32(sample_rate,
|
| 16000,
|
| "Audio sample rate used in the input and output files.");
|
| @@ -64,7 +68,7 @@ DEFINE_string(out_file,
|
| "play through aplay immediately.");
|
|
|
| // Constant IntelligibilityEnhancer constructor parameters.
|
| -const int kErbResolution = 2;
|
| +const size_t kErbResolution = 2;
|
| const int kNumChannels = 1;
|
|
|
| // void function for gtest
|
| @@ -107,8 +111,9 @@ void void_main(int argc, char* argv[]) {
|
|
|
| IntelligibilityEnhancer enh(
|
| kErbResolution, FLAGS_sample_rate, kNumChannels, FLAGS_clear_type,
|
| - static_cast<float>(FLAGS_clear_alpha), FLAGS_clear_window, FLAGS_ana_rate,
|
| - FLAGS_var_rate, FLAGS_gain_limit);
|
| + static_cast<float>(FLAGS_clear_alpha),
|
| + static_cast<size_t>(FLAGS_clear_window), FLAGS_ana_rate, FLAGS_var_rate,
|
| + FLAGS_gain_limit);
|
|
|
| // Slice the input into smaller chunks, as the APM would do, and feed them
|
| // through the enhancer.
|
| @@ -137,6 +142,7 @@ void void_main(int argc, char* argv[]) {
|
| }
|
| }
|
|
|
| +} // namespace
|
| } // namespace webrtc
|
|
|
| int main(int argc, char* argv[]) {
|
|
|