Bump to WebRTC M120 release

Some API deprecation -- ExperimentalAgc and ExperimentalNs are gone.
We're continuing to carry iSAC even though it's gone upstream, but maybe
we'll want to drop that soon.
This commit is contained in:
Arun Raghavan
2023-12-12 10:42:58 -05:00
parent 9a202fb8c2
commit c6abf6cd3f
479 changed files with 20900 additions and 11996 deletions

View File

@ -101,8 +101,18 @@ void RmsLevel::AnalyzeMuted(size_t length) {
}
int RmsLevel::Average() {
int rms = (sample_count_ == 0) ? RmsLevel::kMinLevelDb
: ComputeRms(sum_square_ / sample_count_);
const bool have_samples = (sample_count_ != 0);
int rms = have_samples ? ComputeRms(sum_square_ / sample_count_)
: RmsLevel::kMinLevelDb;
// To ensure that kMinLevelDb represents digital silence (muted audio
// sources) we'll check here if the sum_square is actually 0. If it's not
// we'll bump up the return value to `kInaudibleButNotMuted`.
// https://datatracker.ietf.org/doc/html/rfc6464
if (have_samples && rms == RmsLevel::kMinLevelDb && sum_square_ != 0.0f) {
rms = kInaudibleButNotMuted;
}
Reset();
return rms;
}