Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(354)

Unified Diff: webrtc/modules/audio_processing/test/audioproc_float.cc

Issue 2562593003: Add an optional artificial nearend signal for aecdump call recreation (Closed)
Patch Set: Changed DCHECK to CHECK Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/audio_processing/test/audio_processing_simulator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..edc775986f74183960f0dca71cf9999a00c9d32d 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),
+ "Error: --artifical_nearend must be a valid .wav file name.\n");
}
} // namespace
« no previous file with comments | « webrtc/modules/audio_processing/test/audio_processing_simulator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698