| Index: webrtc/modules/audio_processing/test/audioproc_float.cc
 | 
| diff --git a/webrtc/modules/audio_processing/test/audioproc_float.cc b/webrtc/modules/audio_processing/test/audioproc_float.cc
 | 
| index 9f1abc430d88747d161c8ad260e151614a769311..1c013d558eae5675cd8c513ff4f153978963a647 100644
 | 
| --- a/webrtc/modules/audio_processing/test/audioproc_float.cc
 | 
| +++ b/webrtc/modules/audio_processing/test/audioproc_float.cc
 | 
| @@ -8,11 +8,11 @@
 | 
|   *  be found in the AUTHORS file in the root of the source tree.
 | 
|   */
 | 
|  
 | 
| +#include <string.h>
 | 
| +
 | 
|  #include <iostream>
 | 
|  #include <memory>
 | 
|  
 | 
| -#include <string.h>
 | 
| -
 | 
|  #include "gflags/gflags.h"
 | 
|  #include "webrtc/modules/audio_processing/include/audio_processing.h"
 | 
|  #include "webrtc/modules/audio_processing/test/aec_dump_based_simulator.h"
 | 
| @@ -158,6 +158,15 @@ DEFINE_int32(stream_delay,
 | 
|  DEFINE_int32(stream_drift_samples,
 | 
|               kParameterNotSpecifiedValue,
 | 
|               "Specify the number of stream drift samples to use");
 | 
| +DEFINE_int32(initial_mic_level,
 | 
| +            100,
 | 
| +            "Initial mic level (0-255)");
 | 
| +DEFINE_bool(simulate_mic_gain,
 | 
| +            false,
 | 
| +            "Simulate adjustable microphone analog gain");
 | 
| +DEFINE_int32(simulated_mic_kind,
 | 
| +             kParameterNotSpecifiedValue,
 | 
| +             "Specify which microphone kind to use for microphone simulation");
 | 
|  DEFINE_bool(performance_report, false, "Report the APM performance ");
 | 
|  DEFINE_bool(verbose, false, "Produce verbose output");
 | 
|  DEFINE_bool(bitexactness_report,
 | 
| @@ -264,6 +273,9 @@ SimulationSettings CreateSettings() {
 | 
|                          &settings.stream_drift_samples);
 | 
|    SetSettingIfSpecified(FLAGS_custom_call_order_file,
 | 
|                          &settings.custom_call_order_filename);
 | 
| +  settings.initial_mic_level = FLAGS_initial_mic_level;
 | 
| +  settings.simulate_mic_gain = FLAGS_simulate_mic_gain;
 | 
| +  SetSettingIfSpecified(FLAGS_simulated_mic_kind, &settings.simulated_mic_kind);
 | 
|    settings.report_performance = FLAGS_performance_report;
 | 
|    settings.use_verbose_logging = FLAGS_verbose;
 | 
|    settings.report_bitexactness = FLAGS_bitexactness_report;
 | 
| @@ -380,6 +392,20 @@ void PerformBasicParameterSanityChecks(const SimulationSettings& settings) {
 | 
|        "Error: --custom_call_order_file cannot be used when operating on an "
 | 
|        "aecdump\n");
 | 
|  
 | 
| +  ReportConditionalErrorAndExit(
 | 
| +      (settings.initial_mic_level < 0 || settings.initial_mic_level > 255),
 | 
| +      "Error: --initial_mic_level must be specified between 0 and 255.\n");
 | 
| +
 | 
| +  ReportConditionalErrorAndExit(
 | 
| +      settings.simulated_mic_kind && !settings.simulate_mic_gain,
 | 
| +      "Error: --simulated_mic_kind cannot be specified when mic simulation is "
 | 
| +      "disabled\n");
 | 
| +
 | 
| +  ReportConditionalErrorAndExit(
 | 
| +      !settings.simulated_mic_kind && settings.simulate_mic_gain,
 | 
| +      "Error: --simulated_mic_kind must be specified when mic simulation is "
 | 
| +      "enabled\n");
 | 
| +
 | 
|    auto valid_wav_name = [](const std::string& wav_file_name) {
 | 
|      if (wav_file_name.size() < 5) {
 | 
|        return false;
 | 
| 
 |