Stereo in APM fuzzer.
Add support for stereo in APM fuzzer.
Bug: webrtc:9413
Change-Id: Ie4b19037bd4613c050b03ad0bacf0f44f9feccd3
Reviewed-on: https://webrtc-review.googlesource.com/87221
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23854}
diff --git a/test/fuzzers/audio_processing_configs_fuzzer.cc b/test/fuzzers/audio_processing_configs_fuzzer.cc
index 5295181..4900c0f 100644
--- a/test/fuzzers/audio_processing_configs_fuzzer.cc
+++ b/test/fuzzers/audio_processing_configs_fuzzer.cc
@@ -90,7 +90,9 @@
fuzz_data->ReadByteArray(kSizeOfConfigSegment - fuzz_data->BytesRead()));
// Filter out incompatible settings that lead to CHECK failures.
- if (use_aecm && use_aec) {
+ if ((use_aecm && use_aec) || // These settings cause CHECK failure.
+ (use_aecm && aec3 && use_ns) // These settings trigger webrtc:9489.
+ ) {
return nullptr;
}
diff --git a/test/fuzzers/audio_processing_fuzzer_helper.cc b/test/fuzzers/audio_processing_fuzzer_helper.cc
index 0fa1bad..a1e25b5 100644
--- a/test/fuzzers/audio_processing_fuzzer_helper.cc
+++ b/test/fuzzers/audio_processing_fuzzer_helper.cc
@@ -80,7 +80,7 @@
const auto output_rate =
static_cast<size_t>(fuzz_data->SelectOneOf(rate_kinds));
- const bool num_channels = fuzz_data->ReadOrDefaultValue(true) ? 2 : 1;
+ const int num_channels = fuzz_data->ReadOrDefaultValue(true) ? 2 : 1;
const uint8_t stream_delay = fuzz_data->ReadOrDefaultValue<uint8_t>(0);
// API call needed for AEC-2 and AEC-m to run.
@@ -121,6 +121,7 @@
// codeways.
static_cast<void>(apm->GetStatistics());
static_cast<void>(apm->GetStatistics(true));
+ static_cast<void>(apm->UpdateHistogramsOnCallEnd());
RTC_DCHECK_NE(apm_return_code, AudioProcessing::kBadDataLengthError);
}