webrtc/modules/audio_processing/test
Alessio Bazzica fcf1af3049 APM: add AudioProcessingImpl::capture_::applied_input_volume(_changed)
The `recommended_stream_analog_level()` getter is used to retrieve
both the applied and the recommended input volume. This behavior is
error-prone since the caller must know what is returned based on
the point in the code (namely, before/after the AGC has changed
the last applied input volume into a recommended level).

This CL is a first step to make clarity on which input volume is
handled in different parts of APM. Next in the pipeline: make
`recommended_stream_analog_level()` a trivial getter that always
returns the recommended level.

Main changes:
- When `recommended_stream_analog_level()` is called but
  `set_stream_analog_level()` is not called, APM logs an error
  and returns a fall-back volume (which should not be applied
  since, when `set_stream_analog_level()` is not called, no
  external input volume is expected to be present
- When APM is used without calling the `*_stream_analog_level()`
  methods (e.g., when the caller does not provide any input volume),
  the recorded AEC dumps won't store `Stream::applied_input_level`

Other changes:
- Removed `AudioProcessingImpl::capture_::prev_analog_mic_level`
- Removed redundant code in `GainController2` around detecting
  input volume changes (already done by APM)
- Adapted the `audioproc_f` and `unpack_aecdump` tools
- Data dumps clean-up: the applied and the recommended input
  volumes are now recorded in an AGC implementation agnostic way

Bug: webrtc:7494, b/241923537
Change-Id: I3cb4a731fd9f3dc19bf6ac679b7ed8c969ea283b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271544
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Hanna Silen <silen@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38054}
2022-09-09 17:36:05 +00:00
..
android/apmtest
conversational_speech Adopt absl::string_view in modules/audio_processing/ 2022-08-16 13:49:14 +00:00
py_quality_assessment Adopt absl::string_view in modules/audio_processing/ 2022-08-16 13:49:14 +00:00
aec_dump_based_simulator.cc APM: add AudioProcessingImpl::capture_::applied_input_volume(_changed) 2022-09-09 17:36:05 +00:00
aec_dump_based_simulator.h Add more refined control over dumping of data and the aecdump content 2021-02-06 00:36:10 +00:00
api_call_statistics.cc Adopt absl::string_view in modules/audio_processing/ 2022-08-16 13:49:14 +00:00
api_call_statistics.h Adopt absl::string_view in modules/audio_processing/ 2022-08-16 13:49:14 +00:00
apmtest.m
audio_buffer_tools.cc Add refined handling of the internal scaling of the audio in APM 2021-03-15 19:12:02 +00:00
audio_buffer_tools.h Add refined handling of the internal scaling of the audio in APM 2021-03-15 19:12:02 +00:00
audio_processing_builder_for_testing.cc Move rtc::make_ref_counted to api/ 2022-06-15 09:47:38 +00:00
audio_processing_builder_for_testing.h APM fuzzer: add SetConfig() to test builder 2021-10-18 14:53:37 +00:00
audio_processing_simulator.cc APM: add AudioProcessingImpl::capture_::applied_input_volume(_changed) 2022-09-09 17:36:05 +00:00
audio_processing_simulator.h APM: add AudioProcessingImpl::capture_::applied_input_volume(_changed) 2022-09-09 17:36:05 +00:00
audioproc_float_impl.cc APM: refactor emulated input volume for capture level adjustment 2022-09-09 16:38:26 +00:00
audioproc_float_impl.h Use backticks not vertical bars to denote variables in comments for /modules/audio_processing 2021-08-09 21:49:02 +00:00
bitexactness_tools.cc Prepare to rename RTC_NOTREACHED to RTC_DCHECK_NOTREACHED 2021-11-15 21:44:59 +00:00
bitexactness_tools.h
debug_dump_replayer.cc APM: add AudioProcessingImpl::capture_::applied_input_volume(_changed) 2022-09-09 17:36:05 +00:00
debug_dump_replayer.h Adopt absl::string_view in modules/audio_processing/ 2022-08-16 13:49:14 +00:00
debug_dump_test.cc Adopt absl::string_view in modules/audio_processing/ 2022-08-16 13:49:14 +00:00
echo_canceller_test_tools.cc AEC3: Make RenderSignalAnalyzer multi-channel 2019-09-13 06:07:09 +00:00
echo_canceller_test_tools.h AEC3: Add support in the echo subtractor for handling multiple channels 2019-10-05 07:45:47 +00:00
echo_canceller_test_tools_unittest.cc AEC3: Make RenderSignalAnalyzer multi-channel 2019-09-13 06:07:09 +00:00
echo_control_mock.h Enabling a safe fall-back functionality for overruns in the runtime settings 2021-03-03 12:06:54 +00:00
fake_recording_device.cc Prepare to rename RTC_NOTREACHED to RTC_DCHECK_NOTREACHED 2021-11-15 21:44:59 +00:00
fake_recording_device.h Remove top-level const from parameters in function declarations. 2022-01-26 11:05:25 +00:00
fake_recording_device_unittest.cc Use backticks not vertical bars to denote variables in comments for /modules/audio_processing 2021-08-09 21:49:02 +00:00
performance_timer.cc
performance_timer.h Use backticks not vertical bars to denote variables in comments for /modules/audio_processing 2021-08-09 21:49:02 +00:00
protobuf_utils.cc Use std::make_unique instead of absl::make_unique. 2019-09-17 15:47:29 +00:00
protobuf_utils.h audioproc_f: input AEC dump as string, output audio to vector 2019-08-12 09:17:36 +00:00
runtime_setting_util.cc Reland "Add ability to state whether the APM output will be used" 2020-08-18 12:29:32 +00:00
runtime_setting_util.h Store RuntimeSetting in Aec Dumps. 2018-09-10 11:40:28 +00:00
simulator_buffers.cc Remove more traces of keyboard mic support from APM 2022-02-04 14:27:51 +00:00
simulator_buffers.h
test_utils.cc Adopt absl::string_view in modules/audio_processing/ 2022-08-16 13:49:14 +00:00
test_utils.h Adopt absl::string_view in modules/audio_processing/ 2022-08-16 13:49:14 +00:00
unittest.proto Base ApmTest.Process on AudioProcessingStats.output_rms_dbfs 2018-12-18 16:45:03 +00:00
wav_based_simulator.cc Adopt absl::string_view in modules/audio_processing/ 2022-08-16 13:49:14 +00:00
wav_based_simulator.h Adopt absl::string_view in modules/audio_processing/ 2022-08-16 13:49:14 +00:00