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}
We add 2 metrics for measuring applied digital gain to
AgcManagerDirect. We also add an applied gain and an estimated noise
metric to Agc2.
Chromium histogram CL is
https://chromium-review.googlesource.com/c/chromium/src/+/1170833
Bug: webrtc:7494
Change-Id: Ie40873f9e43bc7d34d8f5473cd73bd47eb84e855
Reviewed-on: https://webrtc-review.googlesource.com/93468
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24290}
The FixedGainController is used in two places.
One is the AudioMixer. There it's used to limit the audio level after
adding streams. The other is GainController2, where it's placed after
steps that could boost the audio level outside the allowed range.
We log metrics from the FGC. To avoid confusion, this CL makes the two
use cases log to different histograms.
Chromium histogram CL is
https://chromium-review.googlesource.com/c/chromium/src/+/1170833
Bug: webrtc:7494
Change-Id: I1abe60fd8e96556f144d2ee576254b15beca1174
Reviewed-on: https://webrtc-review.googlesource.com/93464
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24284}
Agc2 applies a digital gain to the nearend signal.
When the analog level changes, the digital gain calculation is no
longer valid. Therefore Agc2 should be notified to analog gain
changes.
This CL also allow audioproc_f to chain AGC1 and AGC2. In a dependent
CL we will allow using AGC1 for analog gain and AGC2 for digital
gain.
Bug: webrtc:7494
Change-Id: Id75b3728fbf2de1d84b7fba005e4670c7a2985d9
Reviewed-on: https://webrtc-review.googlesource.com/89387
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24231}
This clarifies dependencies and makes it easier to customize builds
for different binaries.
Also adds BUILD files in aec/ and aecm/.
Moves unit tests to their own target, which subjects them to Chromium
Clang style checks.
The CL contains a fix for a thusly induced warning.
Bug: webrtc:9488
Change-Id: I77b680b42a4dccc5f025005e0890f60b4eaf2961
Reviewed-on: https://webrtc-review.googlesource.com/87304
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23887}
This CL does the following:
1. Adds a new AdaptiveModeLevelEstimatorAgc implementation of the Agc
interface. The new implementation differs from webrtc::Agc by
1. using the AGC2 speech level estimator in
GetRmsErrorDb. webrtc::Agc implements its own with help of
webrtc::LoudnessHistogram.
2. Doesn't forget its past at every GetRmsErrorDb call.
2. Makes AgcManagerDirect use AdaptiveModeLevelEstimatorAgc instead of
webrtc::Agc if the use_agc2_level_estimation flag is set.
Bug: webrtc:7494
Change-Id: I8df3f52e322d433eb5ce5297f4236af2f1877b04
Reviewed-on: https://webrtc-review.googlesource.com/86603
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23875}
This clarifies the dependencies of utility/ a lot (spoiler:
there are very few) and makes it easier to separate the build
targets for aecm and aec2.
Bug: webrtc:9488
Change-Id: If916f86e80c19d1b650d0908fbe8343ea7c47bd7
Reviewed-on: https://webrtc-review.googlesource.com/87141
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23860}
1. Adds support for Reset calls in AGC2. The AGC will be reset during
analog gain changes.
2. Allows AdaptiveModeLevelEstimator to return estimates > 0. This can
happen if the signal gain is too high. It's needed for letting the
analog AGC know that the gain is too high.
Bug: webrtc:7494
Change-Id: I38def17c21cc01c36aaea79a2401d8c2f289407b
Reviewed-on: https://webrtc-review.googlesource.com/79360
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23805}
* Move 'VadWithLevel' to AGC2 where it belongs.
* Remove the vectors from VadWithLevel. They were there to make it work
with modules/audio_processing/vad, which we don't need any longer.
* Remove the vector handling from AGC2. It was spread out across
AdaptiveDigitalGainApplier, AdaptiveAGC and their unit tests.
* Hack the RNN VAD into VadWithLevel. The main issue is the resampling.
Bug: webrtc:9076
Change-Id: I13056c985d0ec41269735150caf4aaeb6ff9281e
Reviewed-on: https://webrtc-review.googlesource.com/77364
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23688}
Running clang-format with chromium's style guide.
The goal is n-fold:
* providing consistency and readability (that's what code guidelines are for)
* preventing noise with presubmit checks and git cl format
* building on the previous point: making it easier to automatically fix format issues
* you name it
Please consider using git-hyper-blame to ignore this commit.
Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
This is a kitchen-sink header, some pieces should be moved to
byteorder.h, the rest likely deleted.
Delete most includes of basictypes.h. In leaf headers,
include stddef.h and stdint.h explicitly where needed.
Bug: webrtc:6853
Change-Id: Ibc809936a8f94d418e4eb650da1e89c1b9142073
Reviewed-on: https://webrtc-review.googlesource.com/77721
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23333}
This CL finalizes the feature extraction part for the RNN VAD adding
a class that combines a high-pass filter, LP residual computation,
pitch estimation and spectral features extraction.
This CL also includes a minor refactoring of the pitch estimation
library.
Bug: webrtc:9076
Change-Id: I918b9e143bc6dd2bf508a891446067258a68a777
Reviewed-on: https://webrtc-review.googlesource.com/75504
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23235}
This CL defines SpectralFeaturesExtractor which is responsible for
computing the spectral features used as input for the RNN.
Bug: webrtc:9076
Change-Id: I5e1396b89eca9c13bb268e8419a16436a9c3450f
Reviewed-on: https://webrtc-review.googlesource.com/73760
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23206}
During pitch search in the RNN VAD, we calculate auto
correlation. Before this CL, we computed kNumInvertedLags12kHz=147 dot
products of vectors with kBufSize12kHz-kMaxPitch12kHz=240
elements. This was the most time consuming step of the new VAD.
This CL makes the computation happen in frequency domain. Profiling
shows a 3x speed increase. In future, we can try using a more efficient
FFT and to reduce the FFT length to some of e.g. 400, 405, 432.
# For minimal Clang plugin check change.
TBR: kwiberg@webrtc.org
Bug: webrtc:9076
Change-Id: I688251a415869d53175a37f390f441d4e035d954
Reviewed-on: https://webrtc-review.googlesource.com/73366
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23171}
This CL adds helper functions to be used for the spectral features
computation. Namely, it includes the following:
- band boundaries (frequency to FFT coeffcient index)
- band energy coefficients
- log band energy coefficients
- fixed size DCT table and computation
Bug: webrtc:9076
Change-Id: I03a8799b226d986bc1e37cefd0c3039f94b5592a
Reviewed-on: https://webrtc-review.googlesource.com/73687
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23170}
BandAnalysisFft class that wraps the FFT library, makes it easy to change
FFT library, applies windowing function and owns the FFT input buffer.
Bug: webrtc:9076
Change-Id: I9e7ed587ae263b906e04a66bf8c06eaae64daf19
Reviewed-on: https://webrtc-review.googlesource.com/72900
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23150}
Adding a build target for the bi-qaud filter to make it available for
the RNN VAD of AGC2. Also adding a unit test to test the computation
both in-place and not in-place while comparing the produced output to
that of scipy.signal.
Bug: webrtc:9076
Change-Id: I16176a477ee4b81bb1e090c4906c3a9948ad2772
Reviewed-on: https://webrtc-review.googlesource.com/74220
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23141}
RNN implementation for the AGC2 VAD that includes a fully connected
layer and a gated recurrent unit layer.
Bug: webrtc:9076
Change-Id: Ibb8b0b4e9213f09eb9dbe118bbdc94d7e8e4f91b
Reviewed-on: https://webrtc-review.googlesource.com/72060
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23101}
Functions to estimate pitch period and gain.
Bug: webrtc:9076
Change-Id: Icfe9430dcae11bdb96165c5bfe6e2b1d3bf848ab
Reviewed-on: https://webrtc-review.googlesource.com/70382
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23066}
If the adaptive gain is too low, we raise it slowly and only during
speech.
The CL gives better behavior at the start of a call. If the gain is too
high, the fixed-digital limits it. The gain is also quickly reduced by
the AdaptiveGainApplier.
Bug: webrtc:7494
Change-Id: I683f1e3e463cddec2d91f6c7f15c73e744430034
Reviewed-on: https://webrtc-review.googlesource.com/71484
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23053}
Functions to estimate the inverse filter via LPC and compute the LP
residual applying the inverse filter.
This CL also includes test utilities, in particular BinaryFileReader,
used to read chunks of data and optionally cast them on the fly, and
Create*Reader() functions to read resource files available at test
time.
Bug: webrtc:9076
Change-Id: Ia4793b8ad6a63cb3089ed11ddad89d1aa0b840f6
Reviewed-on: https://webrtc-review.googlesource.com/70244
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22946}
Adding a data structure to cache the results of pair-wise comparisons
between items stored in a ring buffer. This is used to avoid recomputing
the pair-wise comparison every time that a new item is added in a ring
buffer.
Bug: webrtc:9076
Change-Id: I88fb67a80bd3fd8497764dc7ae7e0a577c06b20f
Reviewed-on: https://webrtc-review.googlesource.com/70162
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22942}
Ring buffer template for a finite number of arrays of given type and size.
Bug: webrtc:9076
Change-Id: Ia6c2065b0013f4a00f693966641f9aebe09f6f5c
Reviewed-on: https://webrtc-review.googlesource.com/70161
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22939}
The SequenceBuffer class template implements a linear buffer with a Push
operation that is used to add a fixed size chunk of new samples into the
buffer. Its properties are its size and the size of the chunks that are
pushed. It is used to implement the pitch buffer in the RNN VAD feature
extractor, for which a ring buffer would be a painful choice.
Bug: webrtc:9076
Change-Id: I4767bf06d5a414dbed724a96ea4186ef013a1e30
Reviewed-on: https://webrtc-review.googlesource.com/70204
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22919}
This reverts commit 8628f5bb7c.
Reason for revert: iOS buildbot failing
Original change's description:
> AGC2 RNN VAD: initial build targets
>
> rnn_vad_tool is an executable that reads a wav file of any sample rate
> compatible with 10 ms frames that are resampled and, when the VAD is
> fully landed, will process the resampled frames to compute the VAD
> probability.
>
> To avoid mac, win and ios trybot failures, to_be_removed.h/.cc have
> been added and will be removed as soon as the :lib target includes
> code that leads to a non-empty static lib file on those platforms.
>
> Bug: webrtc:9076
> Change-Id: I810c08acfa1adf2029e3baac2adda3045ae5214a
> Reviewed-on: https://webrtc-review.googlesource.com/70202
> Reviewed-by: Alex Loiko <aleloi@webrtc.org>
> Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22898}
TBR=alessiob@webrtc.org,aleloi@webrtc.org
Change-Id: Ic6014dde78b0ef371804c52608145ba8acdd9c97
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9076
Reviewed-on: https://webrtc-review.googlesource.com/70144
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22899}
rnn_vad_tool is an executable that reads a wav file of any sample rate
compatible with 10 ms frames that are resampled and, when the VAD is
fully landed, will process the resampled frames to compute the VAD
probability.
To avoid mac, win and ios trybot failures, to_be_removed.h/.cc have
been added and will be removed as soon as the :lib target includes
code that leads to a non-empty static lib file on those platforms.
Bug: webrtc:9076
Change-Id: I810c08acfa1adf2029e3baac2adda3045ae5214a
Reviewed-on: https://webrtc-review.googlesource.com/70202
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22898}
Added a new sub-module 'GainApplier'. The build target is
'modules/audio_processing/agc2:gain_applier'. A small refactoring
makes the GainApplier used in adaptive-digital AGC2.
The AGC2 now multiplies samples with a gain in 3 places. It's the
GainApplier, the GainCurveApplier, and the FixedGainController. The
GainApplier is used in AdaptiveDigitalGainApplier and will be used as
a pre-amplifier.
Bug: webrtc:9138
Change-Id: Ibc4c0ea109c6757f159d4adb6e3d8614179c9bc6
Reviewed-on: https://webrtc-review.googlesource.com/69321
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22849}
AGC2 component that computes and applies the digital gain.
The gain is computed from an estimated speech and noise level.
This component decides how fast the gain can change and what it
should be.
Bug: webrtc:7494
Change-Id: If55b6e5c765f958e433730cd9e3b2b93c14a7910
Reviewed-on: https://webrtc-review.googlesource.com/64985
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22741}
We put back the old noise estimator from LevelController. We add a few
new unit tests. We also re-arrange the code so that it fits with how
it is used in AGC2. The differences are:
1. The NoiseLevelEstimator is now fully self-contained.
2. The NoiseLevelEstimator is responsible for calling SignalClassifier
and computing the signal energy. Previously the signal type and
energy were used in several places. It made sense to compute the
values independently of the noise calculation.
3. Re-initialization doesn't have to be done by the caller.
4. The interface is AudioFrameView instead of AudioBuffer.
# Bots are green, nothing should break internal stuff
NOTRY=True
Bug: webrtc:7494
Change-Id: I442bdbbeb3796eb2518e96000aec9dc5a039ae6d
Reviewed-on: https://webrtc-review.googlesource.com/66380
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22738}
Another submodule of the Automatic Gain Controller 2. It refines the
biased estimate of the Adaptive Mode Level Estimator. It works by
generating a delayed stream of peak levels. The delayed peaks are
compared to the level estimate.
Bug: webrtc:7494
Change-Id: If4c2c19088d1ca73fb93511dad4e1c8ccabcaf03
Reviewed-on: https://webrtc-review.googlesource.com/65461
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22732}
We update the configuration settings for AGC2. We also update their
effects. Now, 'gain_controller2.enable=true' means 'first run Adaptive
AGC2; then run AGC2 limiter'.
Previously, only the AGC2 limiter was implemented. To run that, one
had to set both 'gain_controller2.enable=true' and
'gain_controller2.enable_limiter=true'.
This setting also enables adaptive AGC2 in the test tool 'audioproc_f'.
Bug: webrtc:7494
Change-Id: I0d5dfe443f2cdc0ecf3aa4054442dab6276d284d
Reviewed-on: https://webrtc-review.googlesource.com/64990
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22669}
The level estimator (AdaptiveModeLevelEstimator) produces a biased
estimate of the speech level. In our model, we use another module
(the SaturationProtector) to compute the bias. This CL contains the
estimator and a stub of the saturation protector.
Bug: webrtc:7494
Change-Id: I0df736d0346063f544fa680b4cc84177ea548545
Reviewed-on: https://webrtc-review.googlesource.com/64820
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22641}
This CL defines the control flow of the adaptive AGC. It also defines
method and class stubs.
Contents:
1. Divide the 'agc2' build target into 'fixed_digital' and
'adaptive_digital'.
1. Update the dependencies of everything that depended on 'agc2'.
2. Define the sub-modules of the adaptive digital AGC 2. They are:
1. Level Estimator - it gets the energy and a speech probability
and updates a speech level estimate.
2. Noise Estimator - it gets an immutable view of the speech frame
and updates the noise level estimate
3. Gain applier - it gets the speech frame, the current speech and
noise estimates, and the speech probability. It finds a gain to
apply and applies it.
4. AdaptiveAgc - sets up and controls the sub-modules described
above.
Bug: webrtc:7494
Change-Id: Ib7ccd8924e94eead0bc5f935b5d8a12e06e24fd1
Reviewed-on: https://webrtc-review.googlesource.com/64440
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22628}
We had the following pattern:
if (case_A) metric = METRIC_A;
if (case_B) metric = METRIC_B;
RTC_HISTOGRAM_COUNTS_10000(metric, value);
That's wrong, because once the logging macro runs once, it will use
the same histogram no matter what the first argument is. The macro
expands into roughly
static Histogram* histogram_ptr = nullptr;
if (histogram_ptr == nullptr) {
// Look up the histogram and put in histogram_ptr
}
// Add data through the histogram pointer.
We change the logging to use macros with string literals. We add a
macro for every of the 4 possible invocations. The macros will expand
to one static pointer each.
Bug: webrtc:8925
Change-Id: Ic7e4a6299eff31dd5988047edfcedce7d369e5ce
Reviewed-on: https://webrtc-review.googlesource.com/64724
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22606}
And fix typo in UMA metric.
We have this pattern in the FrameCombiner component of the AudioMixer:
if (number_of_streams <= 1) {
// Copy or fill with zeros.
return;
}
// Mix and limit
LogMixingStats(/* args */);
When there is only one remote stream, info about active streams and
sample rate is not logged. This CL moves the call to log stats before
the 'return'.
Bug: webrtc:8925
Change-Id: I7b54f61f628273631909dafbfafa21e155e18d4a
Reviewed-on: https://webrtc-review.googlesource.com/62860
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22493}
We want to know how the AudioMixer is used and how FixedGainController
behaves.
The WebRTC.Audio.Agc2.FixedDigitalGainCurveRegion.* metrics measures
how often the input level hits different regions of the Fixed Gain
Controller gain curve (when the limiter is enabled). They also measure
how long the metrics stay in different regions. They are related to
WebRTC.Audio.ApmCaptureOutputLevelPeakRms, but the new metrics measure
the level before any processing done in APM.
The AudioMixer mixes incoming audio streams. Their number should be
mostly constant, and often some of them could be muted. The metrics
WebRTC.Audio.AudioMixer.NumIncomingStreams,
WebRTC.Audio.AudioMixer.NumIncomingActiveStreams log the number of
incoming stream and how many are not muted. We currently don't have
any stats related to that.
The metric WebRTC.Audio.AudioMixer.MixingRate logs the rate selected
for mixing. The rate can sometimes be inferred from
WebRTC.Audio.Encoder.CodecType. But that metric measures encoding and
not decoding, and codecs don't always map to rates.
See also accompanying Chromium CL
https://chromium-review.googlesource.com/c/chromium/src/+/939473
Bug: webrtc:8925
Change-Id: Ib1405877fc1b39e5d2f0ceccba04434813f20b0d
Reviewed-on: https://webrtc-review.googlesource.com/57740
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22443}