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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user