Chromium Code Reviews| 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 a91480d2655233e4ed0c3f239ea5e9eff52c7280..e94e7e4c6fb9160163a0b5e49f568271874743fc 100644 |
| --- a/webrtc/modules/audio_processing/test/audioproc_float.cc |
| +++ b/webrtc/modules/audio_processing/test/audioproc_float.cc |
| @@ -40,6 +40,7 @@ DEFINE_string(i, "", "Forward stream input wav filename"); |
| DEFINE_string(o, "", "Forward stream output wav filename"); |
| DEFINE_string(ri, "", "Reverse stream input wav filename"); |
| DEFINE_string(ro, "", "Reverse stream output wav filename"); |
| +DEFINE_string(artificial_nearend, "", "Artificial nearend wav filename"); |
| DEFINE_int32(output_num_channels, |
| kParameterNotSpecifiedValue, |
| "Number of forward stream output channels"); |
| @@ -208,6 +209,8 @@ SimulationSettings CreateSettings() { |
| SetSettingIfSpecified(FLAGS_o, &settings.output_filename); |
| SetSettingIfSpecified(FLAGS_ri, &settings.reverse_input_filename); |
| SetSettingIfSpecified(FLAGS_ro, &settings.reverse_output_filename); |
| + SetSettingIfSpecified(FLAGS_artificial_nearend, |
| + &settings.artificial_nearend_filename); |
| SetSettingIfSpecified(FLAGS_output_num_channels, |
| &settings.output_num_channels); |
| SetSettingIfSpecified(FLAGS_reverse_output_num_channels, |
| @@ -277,6 +280,10 @@ void PerformBasicParameterSanityChecks(const SimulationSettings& settings) { |
| "Error: The aec dump cannot be specified " |
| "together with input wav files!\n"); |
| + ReportConditionalErrorAndExit(!!settings.artificial_nearend_filename, |
| + "Error: The artificial nearend cannot be " |
| + "specified together with input wav files!\n"); |
| + |
| ReportConditionalErrorAndExit(!settings.input_filename, |
| "Error: When operating at wav files, the " |
| "input wav filename must be " |
| @@ -389,6 +396,11 @@ void PerformBasicParameterSanityChecks(const SimulationSettings& settings) { |
| settings.reverse_output_filename && |
| (!valid_wav_name(*settings.reverse_output_filename)), |
| "Error: --ro must be a valid .wav file name.\n"); |
| + |
| + ReportConditionalErrorAndExit( |
| + settings.artificial_nearend_filename && |
| + (!valid_wav_name(*settings.artificial_nearend_filename)), |
|
hlundin-webrtc
2016/12/09 07:48:26
Skip the outer parentheses.
peah-webrtc
2016/12/09 08:07:51
Done.
|
| + "Error: --artifical_nearend must be a valid .wav file name.\n"); |
| } |
| } // namespace |