AgcManagerDirectTestHelper simplified and API contract compliant

Main changes:
- `AgcManagerDirectTestHelper::FirstProcess()` replaced by
  `CallAgcSequence()`, which is API contract compliant
- `ExpectCheckVolumeAndReset()`, `SetVolumeAndProcess()` and
  `ExpectInitialize() `removed
- TODOs added for the next batch of improvements
- `AgcManagerDirectTestHelper::mock_agc` now using `NiceMock`
- `AgcManagerDirect::(AnalyzePre)Process()` now receives a
  const ref
- `AnalyzePreProcess(const float* const*,size_t )` removed

Bug: webrtc:7494
Change-Id: Ie5bbaa590586dd806b30494fb00ca9c742c241e2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273490
Reviewed-by: Hanna Silen <silen@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38056}
This commit is contained in:
Alessio Bazzica
2022-09-06 17:36:26 +02:00
committed by WebRTC LUCI CQ
parent 533e461228
commit e56e3650f2
4 changed files with 156 additions and 140 deletions

View File

@ -1161,7 +1161,7 @@ int AudioProcessingImpl::ProcessCaptureStreamLocked() {
}
if (submodules_.agc_manager) {
submodules_.agc_manager->AnalyzePreProcess(capture_buffer);
submodules_.agc_manager->AnalyzePreProcess(*capture_buffer);
}
if (submodule_states_.CaptureMultiBandSubModulesActive() &&
@ -1234,7 +1234,7 @@ int AudioProcessingImpl::ProcessCaptureStreamLocked() {
}
if (submodules_.agc_manager) {
submodules_.agc_manager->Process(capture_buffer);
submodules_.agc_manager->Process(*capture_buffer);
absl::optional<int> new_digital_gain =
submodules_.agc_manager->GetDigitalComressionGain();