From 1f5de53a8c62ed418b8bf22513368fb5bb571e41 Mon Sep 17 00:00:00 2001 From: Sam Zackrisson Date: Wed, 4 Jul 2018 11:40:15 +0200 Subject: [PATCH] Fuzz key presses in APM This calls webrtc::AudioProcessing::set_stream_key_pressed, which opens up a lot of code paths in the transient suppressor. The change breaks historical fuzzer test cases. Bug: webrtc:9413 Change-Id: I1f593a98286c7e7c0fc6751d16df40ad813dbd70 Reviewed-on: https://webrtc-review.googlesource.com/86950 Reviewed-by: Alex Loiko Commit-Queue: Sam Zackrisson Cr-Commit-Position: refs/heads/master@{#23840} --- test/fuzzers/audio_processing_fuzzer_helper.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/fuzzers/audio_processing_fuzzer_helper.cc b/test/fuzzers/audio_processing_fuzzer_helper.cc index b07e177539..0fa1bad775 100644 --- a/test/fuzzers/audio_processing_fuzzer_helper.cc +++ b/test/fuzzers/audio_processing_fuzzer_helper.cc @@ -86,6 +86,9 @@ void FuzzAudioProcessing(test::FuzzDataHelper* fuzz_data, // API call needed for AEC-2 and AEC-m to run. apm->set_stream_delay_ms(stream_delay); + const bool key_pressed = fuzz_data->ReadOrDefaultValue(true); + apm->set_stream_key_pressed(key_pressed); + // Make the APM call depending on capture/render mode and float / // fix interface. const bool is_capture = fuzz_data->ReadOrDefaultValue(true);