* FrameCombiner is simpler. No additional channel pointers for buffers.
* Improve consistency in using views in downstream classes.
* Deprecate older methods (some have upstream dependencies).
* Use samples per channel instead of sample rate where the former is
really what's needed.
Bug: chromium:335805780
Change-Id: I0dde8ed7a5a187bbddd18d3b6c649aa0865e6d4a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352582
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42575}
This simplifies the following steps:
* FrameCombiner infers the sample rate from channel size
* Sends the inferred sample rate to FixedDigitalLevelEstimator
and Limiter.
* Those classes then convert the sample rate to channel size.
Along the way perform checks that the derived channel size value
is a legal value (which has already been done by FrameCombiner).
To:
* FrameCombiner sends channel size to FixedDigitalLevelEstimator and
Limiter.
Bug: chromium:335805780
Change-Id: I6d2953ba5ee99771f3ff5bf4f4a049a8a29b5577
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352581
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42480}
Hypothetical scenario: short weak speech at start of call, then high
noise. The digital adaptive AGC2 would pick a high gain, and then
continue to apply it on the noise. Unless the noise is detected by the
noise estimator, the gain would never be reduced.
This CL addresses the issue by sending limiter gain info to the
adaptive digital AGC2.
Bug: webrtc:7494
Change-Id: Idf5c2686af0f5e5bad981d39a95b8efc9ffb9d64
Reviewed-on: https://webrtc-review.googlesource.com/102641
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24922}
When FixedGainController::SetGain() is called first on a large value (e.g., 40 dB)
and afterwards on a smaller one (e.g., 0 dB), the limiter used by FixedGainController
takes time (about 10-20 seconds) to converge. During that period, the audio is not
audible and the volume slowly increases.
Even if switching from 40 dB to 0 dB is unlikely, this behavior can be corrected by
resetting the limiter every time that FixedGainController::SetGain() is called.
This eliminates the undesired effect described above even when the transient is short.
Bug: webrtc:7494
Change-Id: I419b8986d2181448b4671cdbbd1c256dfb460216
Reviewed-on: https://webrtc-review.googlesource.com/94902
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24451}
This CL adds the Level Estimator of the new gain controller. The Level
Estimator divides a 10ms input frame in kSubFramesInFrame=20 sub
frames. We take the maximal sample values in every sub frame. We then
apply attack/decay smoothing. This is the final level estimate.
The results will be used with InterpolatedGainCurve (see this CL
https://webrtc-review.googlesource.com/c/src/+/51920). For every level
estimate value, we look up a gain with
InterpolatedGainCurve::LookUpGainToApply. This gain is then applied to
the signal.
Bug: webrtc:7949
Change-Id: I2b4b3894a3e945d3dd916ce516c79abacb2b18b1
Reviewed-on: https://webrtc-review.googlesource.com/52381
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22054}